From afa24856b4b9bc00315b3e47745187d33c471406 Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Thu, 15 Feb 2018 17:40:02 -0500 Subject: [PATCH] built-ins/Array/*: make all indentation consistent (depth & character) (#1415) --- test/built-ins/Array/15.4.5-1.js | 4 +- test/built-ins/Array/15.4.5.1-5-1.js | 4 +- test/built-ins/Array/15.4.5.1-5-2.js | 4 +- test/built-ins/Array/S15.4.1_A1.1_T2.js | 4 +- test/built-ins/Array/S15.4.1_A1.2_T1.js | 4 +- test/built-ins/Array/S15.4.1_A2.1_T1.js | 4 +- test/built-ins/Array/S15.4.1_A2.2_T1.js | 20 ++--- test/built-ins/Array/S15.4.1_A3.1_T1.js | 2 +- test/built-ins/Array/S15.4.2.1_A1.1_T1.js | 2 +- test/built-ins/Array/S15.4.2.1_A1.1_T2.js | 4 +- test/built-ins/Array/S15.4.2.1_A1.2_T1.js | 4 +- test/built-ins/Array/S15.4.2.1_A2.1_T1.js | 4 +- test/built-ins/Array/S15.4.2.1_A2.2_T1.js | 20 ++--- test/built-ins/Array/S15.4.5.1_A1.2_T2.js | 10 +-- test/built-ins/Array/S15.4.5.1_A2.1_T1.js | 24 +++--- test/built-ins/Array/S15.4.5.1_A2.2_T1.js | 12 +-- test/built-ins/Array/S15.4.5.1_A2.3_T1.js | 8 +- test/built-ins/Array/S15.4.5.2_A1_T1.js | 12 +-- test/built-ins/Array/S15.4.5.2_A1_T2.js | 8 +- test/built-ins/Array/S15.4.5.2_A2_T1.js | 10 +-- test/built-ins/Array/S15.4.5.2_A3_T1.js | 8 +- test/built-ins/Array/S15.4.5.2_A3_T2.js | 14 ++-- test/built-ins/Array/S15.4.5.2_A3_T3.js | 8 +- test/built-ins/Array/S15.4_A1.1_T10.js | 4 +- test/built-ins/Array/S15.4_A1.1_T4.js | 6 +- test/built-ins/Array/S15.4_A1.1_T5.js | 8 +- test/built-ins/Array/S15.4_A1.1_T6.js | 8 +- test/built-ins/Array/S15.4_A1.1_T7.js | 8 +- test/built-ins/Array/S15.4_A1.1_T8.js | 8 +- test/built-ins/Array/S15.4_A1.1_T9.js | 80 ++++++++++++++---- ...ay.from_forwards-length-for-array-likes.js | 4 +- .../from/calling-from-valid-1-noStrict.js | 2 +- .../from/calling-from-valid-1-onlyStrict.js | 2 +- .../Array/from/calling-from-valid-2.js | 2 +- .../Array/from/elements-added-after.js | 33 ++++---- .../Array/from/elements-deleted-after.js | 19 +++-- .../Array/from/elements-updated-after.js | 21 ++--- test/built-ins/Array/from/iter-cstm-ctor.js | 4 +- test/built-ins/Array/from/iter-map-fn-args.js | 14 +++- .../Array/from/iter-map-fn-return.js | 14 +++- .../Array/from/iter-map-fn-this-arg.js | 14 +++- .../Array/from/iter-map-fn-this-non-strict.js | 18 +++- .../Array/from/iter-map-fn-this-strict.js | 14 +++- .../Array/from/iter-set-elem-prop-err.js | 12 ++- .../Array/from/iter-set-elem-prop.js | 15 +++- .../Array/from/iter-set-length-err.js | 6 +- test/built-ins/Array/from/iter-set-length.js | 12 ++- .../Array/from/mapfn-throws-exception.js | 9 +- .../Array/from/source-array-boundary.js | 13 +-- .../Array/from/source-object-iterator-1.js | 38 +++++---- .../Array/from/source-object-iterator-2.js | 38 ++++----- .../Array/from/source-object-length.js | 12 +-- .../Array/from/source-object-missing.js | 10 +-- .../Array/from/source-object-without.js | 8 +- test/built-ins/Array/isArray/15.4.3.2-0-4.js | 10 +-- test/built-ins/Array/isArray/15.4.3.2-1-13.js | 2 +- test/built-ins/Array/isArray/15.4.3.2-1-7.js | 2 +- test/built-ins/Array/isArray/15.4.3.2-2-1.js | 2 +- test/built-ins/Array/isArray/15.4.3.2-2-2.js | 8 +- test/built-ins/Array/isArray/15.4.3.2-2-3.js | 6 +- test/built-ins/Array/length/15.4.5.1-3.d-1.js | 2 +- test/built-ins/Array/length/15.4.5.1-3.d-2.js | 2 +- test/built-ins/Array/length/15.4.5.1-3.d-3.js | 4 +- .../Array/length/S15.4.2.2_A2.2_T1.js | 6 +- .../Array/length/S15.4.2.2_A2.2_T2.js | 6 +- .../Array/length/S15.4.2.2_A2.2_T3.js | 6 +- .../Array/length/S15.4.5.1_A1.1_T1.js | 6 +- .../Array/length/S15.4.5.1_A1.1_T2.js | 8 +- .../Array/length/S15.4.5.1_A1.2_T1.js | 2 +- .../Array/length/S15.4.5.1_A1.2_T3.js | 2 +- .../Array/length/S15.4.5.1_A1.3_T2.js | 66 +++++++++++++-- .../built-ins/Array/length/S15.4.5.2_A3_T4.js | 2 +- .../concat/15.4.4.4-5-b-iii-3-b-1.js | 42 +++++----- .../prototype/concat/15.4.4.4-5-c-i-1.js | 44 +++++----- ...ncat_array-like-length-to-string-throws.js | 6 +- ..._array-like-primitive-non-number-length.js | 14 +++- ...ototype.concat_array-like-string-length.js | 7 +- ...type.concat_array-like-to-length-throws.js | 12 ++- .../Array.prototype.concat_array-like.js | 7 +- ...prototype.concat_holey-sloppy-arguments.js | 4 +- ...rray.prototype.concat_large-typed-array.js | 4 +- .../Array.prototype.concat_length-throws.js | 4 +- .../Array.prototype.concat_non-array.js | 4 +- ...rototype.concat_sloppy-arguments-throws.js | 8 +- ...type.concat_sloppy-arguments-with-dupes.js | 8 +- ...Array.prototype.concat_sloppy-arguments.js | 8 +- ...rray.prototype.concat_small-typed-array.js | 4 +- ...otype.concat_spreadable-boolean-wrapper.js | 2 +- ...ay.prototype.concat_spreadable-function.js | 4 +- ...ototype.concat_spreadable-getter-throws.js | 4 +- ...totype.concat_spreadable-number-wrapper.js | 2 +- ...ray.prototype.concat_spreadable-reg-exp.js | 2 +- ...ototype.concat_spreadable-sparse-object.js | 4 +- ...Array.prototype.concat_strict-arguments.js | 9 +- .../Array/prototype/concat/S15.4.4.4_A1_T1.js | 6 +- .../Array/prototype/concat/S15.4.4.4_A1_T2.js | 4 +- .../Array/prototype/concat/S15.4.4.4_A1_T3.js | 2 +- .../Array/prototype/concat/S15.4.4.4_A1_T4.js | 4 +- .../Array/prototype/concat/S15.4.4.4_A2_T1.js | 4 +- .../Array/prototype/concat/S15.4.4.4_A3_T1.js | 4 +- .../Array/prototype/concat/S15.4.4.4_A3_T2.js | 1 - .../Array/prototype/concat/S15.4.4.4_A3_T3.js | 1 - .../prototype/concat/create-non-array.js | 4 +- .../copyWithin/coerced-values-end.js | 18 ++-- .../copyWithin/coerced-values-start.js | 24 ++---- .../copyWithin/coerced-values-target.js | 24 ++---- .../prototype/copyWithin/negative-end.js | 24 ++---- .../copyWithin/negative-out-of-bounds-end.js | 30 +++---- .../negative-out-of-bounds-start.js | 24 ++---- .../negative-out-of-bounds-target.js | 12 +-- .../prototype/copyWithin/negative-start.js | 18 ++-- .../prototype/copyWithin/negative-target.js | 9 +- .../non-negative-out-of-bounds-end.js | 12 +-- ...negative-out-of-bounds-target-and-start.js | 45 ++++------ .../non-negative-target-and-start.js | 12 +-- .../non-negative-target-start-and-end.js | 15 ++-- .../copyWithin/return-abrupt-from-end.js | 1 - .../copyWithin/return-abrupt-from-start.js | 1 - .../prototype/copyWithin/undefined-end.js | 6 +- .../Array/prototype/every/15.4.4.16-1-4.js | 1 + .../Array/prototype/every/15.4.4.16-1-5.js | 1 + .../Array/prototype/every/15.4.4.16-1-6.js | 1 + .../Array/prototype/every/15.4.4.16-1-9.js | 2 +- .../Array/prototype/every/15.4.4.16-2-10.js | 8 +- .../Array/prototype/every/15.4.4.16-2-11.js | 2 +- .../Array/prototype/every/15.4.4.16-2-12.js | 17 ++-- .../Array/prototype/every/15.4.4.16-2-13.js | 10 +-- .../Array/prototype/every/15.4.4.16-2-14.js | 5 +- .../Array/prototype/every/15.4.4.16-2-17.js | 4 +- .../Array/prototype/every/15.4.4.16-2-19.js | 2 +- .../Array/prototype/every/15.4.4.16-2-3.js | 6 +- .../Array/prototype/every/15.4.4.16-2-4.js | 1 + .../Array/prototype/every/15.4.4.16-2-5.js | 8 +- .../Array/prototype/every/15.4.4.16-2-6.js | 6 +- .../Array/prototype/every/15.4.4.16-2-7.js | 6 +- .../Array/prototype/every/15.4.4.16-2-8.js | 10 ++- .../Array/prototype/every/15.4.4.16-2-9.js | 10 +-- .../Array/prototype/every/15.4.4.16-3-1.js | 5 +- .../Array/prototype/every/15.4.4.16-3-10.js | 5 +- .../Array/prototype/every/15.4.4.16-3-11.js | 7 +- .../Array/prototype/every/15.4.4.16-3-12.js | 7 +- .../Array/prototype/every/15.4.4.16-3-13.js | 7 +- .../Array/prototype/every/15.4.4.16-3-14.js | 19 +++-- .../Array/prototype/every/15.4.4.16-3-15.js | 7 +- .../Array/prototype/every/15.4.4.16-3-16.js | 7 +- .../Array/prototype/every/15.4.4.16-3-17.js | 7 +- .../Array/prototype/every/15.4.4.16-3-18.js | 6 +- .../Array/prototype/every/15.4.4.16-3-19.js | 20 ++--- .../Array/prototype/every/15.4.4.16-3-2.js | 6 +- .../Array/prototype/every/15.4.4.16-3-20.js | 8 +- .../Array/prototype/every/15.4.4.16-3-21.js | 28 +++---- .../Array/prototype/every/15.4.4.16-3-22.js | 44 +++++----- .../Array/prototype/every/15.4.4.16-3-23.js | 54 ++++++------ .../Array/prototype/every/15.4.4.16-3-24.js | 19 +++-- .../Array/prototype/every/15.4.4.16-3-25.js | 24 +++--- .../Array/prototype/every/15.4.4.16-3-29.js | 22 ++--- .../Array/prototype/every/15.4.4.16-3-3.js | 15 ++-- .../Array/prototype/every/15.4.4.16-3-4.js | 15 ++-- .../Array/prototype/every/15.4.4.16-3-5.js | 15 ++-- .../Array/prototype/every/15.4.4.16-3-6.js | 19 +++-- .../Array/prototype/every/15.4.4.16-3-7.js | 19 +++-- .../Array/prototype/every/15.4.4.16-3-8.js | 15 ++-- .../Array/prototype/every/15.4.4.16-3-9.js | 15 ++-- .../Array/prototype/every/15.4.4.16-4-1.js | 4 +- .../Array/prototype/every/15.4.4.16-4-10.js | 19 +++-- .../Array/prototype/every/15.4.4.16-4-11.js | 27 +++--- .../Array/prototype/every/15.4.4.16-4-12.js | 6 +- .../Array/prototype/every/15.4.4.16-4-15.js | 38 +++++---- .../Array/prototype/every/15.4.4.16-4-3.js | 4 +- .../Array/prototype/every/15.4.4.16-4-4.js | 4 +- .../Array/prototype/every/15.4.4.16-4-5.js | 4 +- .../Array/prototype/every/15.4.4.16-4-6.js | 4 +- .../Array/prototype/every/15.4.4.16-4-7.js | 4 +- .../Array/prototype/every/15.4.4.16-4-8.js | 23 ++--- .../Array/prototype/every/15.4.4.16-4-9.js | 31 +++---- .../Array/prototype/every/15.4.4.16-5-1-s.js | 14 ++-- .../Array/prototype/every/15.4.4.16-5-1.js | 10 +-- .../Array/prototype/every/15.4.4.16-5-10.js | 12 +-- .../Array/prototype/every/15.4.4.16-5-11.js | 12 +-- .../Array/prototype/every/15.4.4.16-5-12.js | 12 +-- .../Array/prototype/every/15.4.4.16-5-13.js | 12 +-- .../Array/prototype/every/15.4.4.16-5-14.js | 10 +-- .../Array/prototype/every/15.4.4.16-5-15.js | 12 +-- .../Array/prototype/every/15.4.4.16-5-16.js | 12 +-- .../Array/prototype/every/15.4.4.16-5-17.js | 10 +-- .../Array/prototype/every/15.4.4.16-5-18.js | 12 +-- .../Array/prototype/every/15.4.4.16-5-19.js | 18 ++-- .../Array/prototype/every/15.4.4.16-5-2.js | 17 ++-- .../Array/prototype/every/15.4.4.16-5-21.js | 10 +-- .../Array/prototype/every/15.4.4.16-5-22.js | 10 +-- .../Array/prototype/every/15.4.4.16-5-23.js | 10 +-- .../Array/prototype/every/15.4.4.16-5-24.js | 10 +-- .../Array/prototype/every/15.4.4.16-5-3.js | 17 ++-- .../Array/prototype/every/15.4.4.16-5-4.js | 21 ++--- .../Array/prototype/every/15.4.4.16-5-5.js | 21 ++--- .../Array/prototype/every/15.4.4.16-5-6.js | 19 +++-- .../Array/prototype/every/15.4.4.16-5-7.js | 10 +-- .../Array/prototype/every/15.4.4.16-5-9.js | 12 +-- .../Array/prototype/every/15.4.4.16-7-1.js | 20 ++--- .../Array/prototype/every/15.4.4.16-7-2.js | 18 ++-- .../Array/prototype/every/15.4.4.16-7-3.js | 18 ++-- .../Array/prototype/every/15.4.4.16-7-4.js | 18 ++-- .../Array/prototype/every/15.4.4.16-7-5.js | 22 ++--- .../Array/prototype/every/15.4.4.16-7-6.js | 24 +++--- .../Array/prototype/every/15.4.4.16-7-7.js | 18 ++-- .../Array/prototype/every/15.4.4.16-7-8.js | 16 ++-- .../Array/prototype/every/15.4.4.16-7-9.js | 30 ++++--- .../Array/prototype/every/15.4.4.16-7-b-1.js | 19 +++-- .../Array/prototype/every/15.4.4.16-7-b-10.js | 32 +++---- .../Array/prototype/every/15.4.4.16-7-b-11.js | 29 +++---- .../Array/prototype/every/15.4.4.16-7-b-12.js | 37 ++++---- .../Array/prototype/every/15.4.4.16-7-b-13.js | 32 +++---- .../Array/prototype/every/15.4.4.16-7-b-14.js | 27 +++--- .../Array/prototype/every/15.4.4.16-7-b-15.js | 42 +++++----- .../Array/prototype/every/15.4.4.16-7-b-16.js | 42 +++++----- .../Array/prototype/every/15.4.4.16-7-b-2.js | 30 +++---- .../Array/prototype/every/15.4.4.16-7-b-3.js | 30 ++++--- .../Array/prototype/every/15.4.4.16-7-b-4.js | 42 +++++----- .../Array/prototype/every/15.4.4.16-7-b-5.js | 40 ++++----- .../Array/prototype/every/15.4.4.16-7-b-6.js | 42 +++++----- .../Array/prototype/every/15.4.4.16-7-b-7.js | 40 ++++----- .../Array/prototype/every/15.4.4.16-7-b-8.js | 41 ++++----- .../Array/prototype/every/15.4.4.16-7-b-9.js | 39 ++++----- .../prototype/every/15.4.4.16-7-c-i-1.js | 22 +++-- .../prototype/every/15.4.4.16-7-c-i-10.js | 28 +++---- .../prototype/every/15.4.4.16-7-c-i-11.js | 39 +++++---- .../prototype/every/15.4.4.16-7-c-i-12.js | 30 +++---- .../prototype/every/15.4.4.16-7-c-i-13.js | 48 +++++------ .../prototype/every/15.4.4.16-7-c-i-14.js | 40 ++++----- .../prototype/every/15.4.4.16-7-c-i-15.js | 36 ++++---- .../prototype/every/15.4.4.16-7-c-i-16.js | 26 +++--- .../prototype/every/15.4.4.16-7-c-i-17.js | 22 ++--- .../prototype/every/15.4.4.16-7-c-i-18.js | 20 ++--- .../prototype/every/15.4.4.16-7-c-i-19.js | 24 +++--- .../prototype/every/15.4.4.16-7-c-i-2.js | 10 +-- .../prototype/every/15.4.4.16-7-c-i-20.js | 22 ++--- .../prototype/every/15.4.4.16-7-c-i-21.js | 28 +++---- .../prototype/every/15.4.4.16-7-c-i-22.js | 18 ++-- .../prototype/every/15.4.4.16-7-c-i-25.js | 16 ++-- .../prototype/every/15.4.4.16-7-c-i-26.js | 28 +++---- .../prototype/every/15.4.4.16-7-c-i-27.js | 28 +++---- .../prototype/every/15.4.4.16-7-c-i-28.js | 44 +++++----- .../prototype/every/15.4.4.16-7-c-i-29.js | 46 +++++----- .../prototype/every/15.4.4.16-7-c-i-3.js | 29 ++++--- .../prototype/every/15.4.4.16-7-c-i-30.js | 36 ++++---- .../prototype/every/15.4.4.16-7-c-i-31.js | 35 ++++---- .../prototype/every/15.4.4.16-7-c-i-4.js | 15 ++-- .../prototype/every/15.4.4.16-7-c-i-5.js | 46 +++++----- .../prototype/every/15.4.4.16-7-c-i-6.js | 22 ++--- .../prototype/every/15.4.4.16-7-c-i-7.js | 28 ++++--- .../prototype/every/15.4.4.16-7-c-i-8.js | 16 ++-- .../prototype/every/15.4.4.16-7-c-i-9.js | 31 +++---- .../prototype/every/15.4.4.16-7-c-ii-1.js | 12 +-- .../prototype/every/15.4.4.16-7-c-ii-10.js | 10 +-- .../prototype/every/15.4.4.16-7-c-ii-11.js | 10 +-- .../prototype/every/15.4.4.16-7-c-ii-12.js | 10 +-- .../prototype/every/15.4.4.16-7-c-ii-13.js | 10 +-- .../prototype/every/15.4.4.16-7-c-ii-16.js | 15 ++-- .../prototype/every/15.4.4.16-7-c-ii-17.js | 15 ++-- .../prototype/every/15.4.4.16-7-c-ii-18.js | 15 ++-- .../prototype/every/15.4.4.16-7-c-ii-19.js | 17 ++-- .../prototype/every/15.4.4.16-7-c-ii-2.js | 14 ++-- .../prototype/every/15.4.4.16-7-c-ii-20.js | 19 +++-- .../prototype/every/15.4.4.16-7-c-ii-21.js | 26 +++--- .../prototype/every/15.4.4.16-7-c-ii-22.js | 26 +++--- .../prototype/every/15.4.4.16-7-c-ii-23.js | 16 ++-- .../prototype/every/15.4.4.16-7-c-ii-3.js | 21 ++--- .../prototype/every/15.4.4.16-7-c-ii-4.js | 25 +++--- .../prototype/every/15.4.4.16-7-c-ii-5.js | 34 ++++---- .../prototype/every/15.4.4.16-7-c-ii-6.js | 23 ++--- .../prototype/every/15.4.4.16-7-c-ii-7.js | 25 +++--- .../prototype/every/15.4.4.16-7-c-ii-8.js | 18 ++-- .../prototype/every/15.4.4.16-7-c-ii-9.js | 10 +-- .../prototype/every/15.4.4.16-7-c-iii-1.js | 15 ++-- .../prototype/every/15.4.4.16-7-c-iii-10.js | 10 +-- .../prototype/every/15.4.4.16-7-c-iii-11.js | 10 +-- .../prototype/every/15.4.4.16-7-c-iii-12.js | 10 +-- .../prototype/every/15.4.4.16-7-c-iii-13.js | 10 +-- .../prototype/every/15.4.4.16-7-c-iii-14.js | 10 +-- .../prototype/every/15.4.4.16-7-c-iii-15.js | 10 +-- .../prototype/every/15.4.4.16-7-c-iii-16.js | 10 +-- .../prototype/every/15.4.4.16-7-c-iii-17.js | 10 +-- .../prototype/every/15.4.4.16-7-c-iii-18.js | 10 +-- .../prototype/every/15.4.4.16-7-c-iii-19.js | 10 +-- .../prototype/every/15.4.4.16-7-c-iii-2.js | 15 ++-- .../prototype/every/15.4.4.16-7-c-iii-20.js | 10 +-- .../prototype/every/15.4.4.16-7-c-iii-21.js | 10 +-- .../prototype/every/15.4.4.16-7-c-iii-22.js | 10 +-- .../prototype/every/15.4.4.16-7-c-iii-23.js | 10 +-- .../prototype/every/15.4.4.16-7-c-iii-24.js | 10 +-- .../prototype/every/15.4.4.16-7-c-iii-25.js | 10 +-- .../prototype/every/15.4.4.16-7-c-iii-27.js | 10 +-- .../prototype/every/15.4.4.16-7-c-iii-28.js | 56 +++++++------ .../prototype/every/15.4.4.16-7-c-iii-29.js | 10 +-- .../prototype/every/15.4.4.16-7-c-iii-3.js | 15 ++-- .../prototype/every/15.4.4.16-7-c-iii-4.js | 15 ++-- .../prototype/every/15.4.4.16-7-c-iii-5.js | 10 +-- .../prototype/every/15.4.4.16-7-c-iii-6.js | 10 +-- .../prototype/every/15.4.4.16-7-c-iii-7.js | 10 +-- .../prototype/every/15.4.4.16-7-c-iii-8.js | 10 +-- .../prototype/every/15.4.4.16-7-c-iii-9.js | 10 +-- .../Array/prototype/every/15.4.4.16-8-1.js | 4 +- .../Array/prototype/every/15.4.4.16-8-10.js | 25 +++--- .../Array/prototype/every/15.4.4.16-8-11.js | 15 ++-- .../Array/prototype/every/15.4.4.16-8-12.js | 12 +-- .../Array/prototype/every/15.4.4.16-8-13.js | 19 +++-- .../Array/prototype/every/15.4.4.16-8-2.js | 13 +-- .../Array/prototype/every/15.4.4.16-8-3.js | 13 +-- .../Array/prototype/every/15.4.4.16-8-4.js | 13 +-- .../Array/prototype/every/15.4.4.16-8-5.js | 13 +-- .../Array/prototype/every/15.4.4.16-8-6.js | 19 +++-- .../Array/prototype/every/15.4.4.16-8-7.js | 29 ++++--- .../Array/prototype/every/15.4.4.16-8-8.js | 39 ++++----- .../fill/fill-values-custom-start-and-end.js | 2 +- .../Array/prototype/fill/fill-values.js | 3 +- .../Array/prototype/filter/15.4.4.20-1-1.js | 2 +- .../Array/prototype/filter/15.4.4.20-1-10.js | 12 +-- .../Array/prototype/filter/15.4.4.20-1-11.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-1-12.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-1-13.js | 12 +-- .../Array/prototype/filter/15.4.4.20-1-14.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-1-15.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-1-2.js | 2 +- .../Array/prototype/filter/15.4.4.20-1-3.js | 12 +-- .../Array/prototype/filter/15.4.4.20-1-4.js | 16 ++-- .../Array/prototype/filter/15.4.4.20-1-5.js | 12 +-- .../Array/prototype/filter/15.4.4.20-1-6.js | 16 ++-- .../Array/prototype/filter/15.4.4.20-1-7.js | 8 +- .../Array/prototype/filter/15.4.4.20-1-8.js | 10 +-- .../Array/prototype/filter/15.4.4.20-1-9.js | 18 ++-- .../Array/prototype/filter/15.4.4.20-10-1.js | 12 +-- .../Array/prototype/filter/15.4.4.20-10-2.js | 18 ++-- .../Array/prototype/filter/15.4.4.20-10-3.js | 15 ++-- .../Array/prototype/filter/15.4.4.20-10-4.js | 19 +++-- .../Array/prototype/filter/15.4.4.20-2-1.js | 20 ++--- .../Array/prototype/filter/15.4.4.20-2-10.js | 34 ++++---- .../Array/prototype/filter/15.4.4.20-2-11.js | 29 +++---- .../Array/prototype/filter/15.4.4.20-2-12.js | 38 +++++---- .../Array/prototype/filter/15.4.4.20-2-13.js | 33 ++++---- .../Array/prototype/filter/15.4.4.20-2-14.js | 18 ++-- .../Array/prototype/filter/15.4.4.20-2-17.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-2-18.js | 10 +-- .../Array/prototype/filter/15.4.4.20-2-19.js | 20 ++--- .../Array/prototype/filter/15.4.4.20-2-2.js | 8 +- .../Array/prototype/filter/15.4.4.20-2-3.js | 26 +++--- .../Array/prototype/filter/15.4.4.20-2-4.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-2-5.js | 42 +++++----- .../Array/prototype/filter/15.4.4.20-2-6.js | 24 +++--- .../Array/prototype/filter/15.4.4.20-2-7.js | 28 +++---- .../Array/prototype/filter/15.4.4.20-2-8.js | 36 ++++---- .../Array/prototype/filter/15.4.4.20-2-9.js | 46 +++++----- .../Array/prototype/filter/15.4.4.20-3-1.js | 19 +++-- .../Array/prototype/filter/15.4.4.20-3-10.js | 18 ++-- .../Array/prototype/filter/15.4.4.20-3-11.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-3-12.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-3-13.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-3-14.js | 17 ++-- .../Array/prototype/filter/15.4.4.20-3-15.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-3-16.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-3-17.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-3-18.js | 18 ++-- .../Array/prototype/filter/15.4.4.20-3-19.js | 26 +++--- .../Array/prototype/filter/15.4.4.20-3-2.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-3-20.js | 26 +++--- .../Array/prototype/filter/15.4.4.20-3-21.js | 40 ++++----- .../Array/prototype/filter/15.4.4.20-3-22.js | 44 +++++----- .../Array/prototype/filter/15.4.4.20-3-23.js | 48 +++++------ .../Array/prototype/filter/15.4.4.20-3-24.js | 18 ++-- .../Array/prototype/filter/15.4.4.20-3-25.js | 18 ++-- .../Array/prototype/filter/15.4.4.20-3-3.js | 18 ++-- .../Array/prototype/filter/15.4.4.20-3-4.js | 18 ++-- .../Array/prototype/filter/15.4.4.20-3-5.js | 18 ++-- .../Array/prototype/filter/15.4.4.20-3-6.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-3-7.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-3-9.js | 18 ++-- .../Array/prototype/filter/15.4.4.20-4-1.js | 4 +- .../Array/prototype/filter/15.4.4.20-4-10.js | 19 +++-- .../Array/prototype/filter/15.4.4.20-4-11.js | 27 +++--- .../Array/prototype/filter/15.4.4.20-4-12.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-4-15.js | 38 +++++---- .../Array/prototype/filter/15.4.4.20-4-2.js | 4 +- .../Array/prototype/filter/15.4.4.20-4-3.js | 4 +- .../Array/prototype/filter/15.4.4.20-4-4.js | 4 +- .../Array/prototype/filter/15.4.4.20-4-5.js | 4 +- .../Array/prototype/filter/15.4.4.20-4-6.js | 4 +- .../Array/prototype/filter/15.4.4.20-4-7.js | 4 +- .../Array/prototype/filter/15.4.4.20-4-8.js | 23 ++--- .../Array/prototype/filter/15.4.4.20-4-9.js | 31 +++---- .../Array/prototype/filter/15.4.4.20-5-1-s.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-5-1.js | 16 ++-- .../Array/prototype/filter/15.4.4.20-5-10.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-5-11.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-5-12.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-5-13.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-5-14.js | 12 +-- .../Array/prototype/filter/15.4.4.20-5-15.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-5-16.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-5-17.js | 12 +-- .../Array/prototype/filter/15.4.4.20-5-18.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-5-19.js | 20 ++--- .../Array/prototype/filter/15.4.4.20-5-2.js | 19 +++-- .../Array/prototype/filter/15.4.4.20-5-21.js | 12 +-- .../Array/prototype/filter/15.4.4.20-5-22.js | 12 +-- .../Array/prototype/filter/15.4.4.20-5-23.js | 12 +-- .../Array/prototype/filter/15.4.4.20-5-24.js | 12 +-- .../Array/prototype/filter/15.4.4.20-5-27.js | 2 +- .../Array/prototype/filter/15.4.4.20-5-28.js | 2 +- .../Array/prototype/filter/15.4.4.20-5-29.js | 2 +- .../Array/prototype/filter/15.4.4.20-5-3.js | 19 +++-- .../Array/prototype/filter/15.4.4.20-5-30.js | 20 ++--- .../Array/prototype/filter/15.4.4.20-5-4.js | 21 ++--- .../Array/prototype/filter/15.4.4.20-5-5.js | 21 ++--- .../Array/prototype/filter/15.4.4.20-5-6.js | 19 +++-- .../Array/prototype/filter/15.4.4.20-5-7.js | 12 +-- .../Array/prototype/filter/15.4.4.20-5-9.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-6-1.js | 4 +- .../Array/prototype/filter/15.4.4.20-6-2.js | 13 +-- .../Array/prototype/filter/15.4.4.20-6-3.js | 13 +-- .../Array/prototype/filter/15.4.4.20-6-4.js | 13 +-- .../Array/prototype/filter/15.4.4.20-6-5.js | 13 +-- .../Array/prototype/filter/15.4.4.20-6-6.js | 19 +++-- .../Array/prototype/filter/15.4.4.20-6-7.js | 29 ++++--- .../Array/prototype/filter/15.4.4.20-6-8.js | 39 ++++----- .../Array/prototype/filter/15.4.4.20-9-1.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-9-2.js | 22 ++--- .../Array/prototype/filter/15.4.4.20-9-3.js | 22 ++--- .../Array/prototype/filter/15.4.4.20-9-4.js | 14 ++-- .../Array/prototype/filter/15.4.4.20-9-5.js | 18 ++-- .../Array/prototype/filter/15.4.4.20-9-6.js | 26 +++--- .../Array/prototype/filter/15.4.4.20-9-7.js | 20 ++--- .../Array/prototype/filter/15.4.4.20-9-8.js | 18 ++-- .../Array/prototype/filter/15.4.4.20-9-9.js | 32 +++---- .../Array/prototype/filter/15.4.4.20-9-b-1.js | 19 +++-- .../prototype/filter/15.4.4.20-9-b-10.js | 29 ++++--- .../prototype/filter/15.4.4.20-9-b-11.js | 26 +++--- .../prototype/filter/15.4.4.20-9-b-12.js | 31 ++++--- .../prototype/filter/15.4.4.20-9-b-13.js | 26 +++--- .../prototype/filter/15.4.4.20-9-b-14.js | 24 +++--- .../prototype/filter/15.4.4.20-9-b-15.js | 36 ++++---- .../prototype/filter/15.4.4.20-9-b-16.js | 36 ++++---- .../Array/prototype/filter/15.4.4.20-9-b-2.js | 24 +++--- .../Array/prototype/filter/15.4.4.20-9-b-3.js | 27 +++--- .../Array/prototype/filter/15.4.4.20-9-b-4.js | 36 ++++---- .../Array/prototype/filter/15.4.4.20-9-b-5.js | 34 ++++---- .../Array/prototype/filter/15.4.4.20-9-b-6.js | 36 ++++---- .../Array/prototype/filter/15.4.4.20-9-b-7.js | 34 ++++---- .../Array/prototype/filter/15.4.4.20-9-b-8.js | 42 +++++----- .../Array/prototype/filter/15.4.4.20-9-b-9.js | 36 ++++---- .../prototype/filter/15.4.4.20-9-c-i-1.js | 16 ++-- .../prototype/filter/15.4.4.20-9-c-i-10.js | 22 ++--- .../prototype/filter/15.4.4.20-9-c-i-11.js | 33 ++++---- .../prototype/filter/15.4.4.20-9-c-i-12.js | 24 +++--- .../prototype/filter/15.4.4.20-9-c-i-13.js | 42 +++++----- .../prototype/filter/15.4.4.20-9-c-i-14.js | 34 ++++---- .../prototype/filter/15.4.4.20-9-c-i-15.js | 30 +++---- .../prototype/filter/15.4.4.20-9-c-i-16.js | 20 ++--- .../prototype/filter/15.4.4.20-9-c-i-17.js | 20 +++-- .../prototype/filter/15.4.4.20-9-c-i-18.js | 18 ++-- .../prototype/filter/15.4.4.20-9-c-i-19.js | 22 ++--- .../prototype/filter/15.4.4.20-9-c-i-2.js | 12 +-- .../prototype/filter/15.4.4.20-9-c-i-20.js | 20 ++--- .../prototype/filter/15.4.4.20-9-c-i-21.js | 26 +++--- .../prototype/filter/15.4.4.20-9-c-i-22.js | 16 ++-- .../prototype/filter/15.4.4.20-9-c-i-25.js | 14 ++-- .../prototype/filter/15.4.4.20-9-c-i-26.js | 26 +++--- .../prototype/filter/15.4.4.20-9-c-i-27.js | 30 +++---- .../prototype/filter/15.4.4.20-9-c-i-28.js | 46 +++++----- .../prototype/filter/15.4.4.20-9-c-i-29.js | 48 ++++++----- .../prototype/filter/15.4.4.20-9-c-i-3.js | 23 ++--- .../prototype/filter/15.4.4.20-9-c-i-30.js | 36 ++++---- .../prototype/filter/15.4.4.20-9-c-i-31.js | 35 ++++---- .../prototype/filter/15.4.4.20-9-c-i-4.js | 10 +-- .../prototype/filter/15.4.4.20-9-c-i-5.js | 40 ++++----- .../prototype/filter/15.4.4.20-9-c-i-6.js | 20 ++--- .../prototype/filter/15.4.4.20-9-c-i-7.js | 22 ++--- .../prototype/filter/15.4.4.20-9-c-i-8.js | 10 +-- .../prototype/filter/15.4.4.20-9-c-i-9.js | 25 +++--- .../prototype/filter/15.4.4.20-9-c-ii-1.js | 23 ++--- .../prototype/filter/15.4.4.20-9-c-ii-10.js | 8 +- .../prototype/filter/15.4.4.20-9-c-ii-11.js | 8 +- .../prototype/filter/15.4.4.20-9-c-ii-12.js | 8 +- .../prototype/filter/15.4.4.20-9-c-ii-13.js | 8 +- .../prototype/filter/15.4.4.20-9-c-ii-16.js | 13 +-- .../prototype/filter/15.4.4.20-9-c-ii-17.js | 13 +-- .../prototype/filter/15.4.4.20-9-c-ii-18.js | 13 +-- .../prototype/filter/15.4.4.20-9-c-ii-19.js | 19 +++-- .../prototype/filter/15.4.4.20-9-c-ii-2.js | 21 ++--- .../prototype/filter/15.4.4.20-9-c-ii-20.js | 17 ++-- .../prototype/filter/15.4.4.20-9-c-ii-21.js | 26 +++--- .../prototype/filter/15.4.4.20-9-c-ii-22.js | 26 +++--- .../prototype/filter/15.4.4.20-9-c-ii-23.js | 13 +-- .../prototype/filter/15.4.4.20-9-c-ii-4.js | 27 +++--- .../prototype/filter/15.4.4.20-9-c-ii-5.js | 36 ++++---- .../prototype/filter/15.4.4.20-9-c-ii-6.js | 21 +++-- .../prototype/filter/15.4.4.20-9-c-ii-7.js | 25 +++--- .../prototype/filter/15.4.4.20-9-c-ii-8.js | 20 +++-- .../prototype/filter/15.4.4.20-9-c-ii-9.js | 8 +- .../prototype/filter/15.4.4.20-9-c-iii-1-1.js | 14 ++-- .../prototype/filter/15.4.4.20-9-c-iii-1-2.js | 18 ++-- .../prototype/filter/15.4.4.20-9-c-iii-1-3.js | 31 +++---- .../prototype/filter/15.4.4.20-9-c-iii-1-4.js | 18 ++-- .../prototype/filter/15.4.4.20-9-c-iii-1-5.js | 27 +++--- .../prototype/filter/15.4.4.20-9-c-iii-1-6.js | 36 ++++---- .../prototype/filter/15.4.4.20-9-c-iii-1.js | 16 ++-- .../prototype/filter/15.4.4.20-9-c-iii-10.js | 8 +- .../prototype/filter/15.4.4.20-9-c-iii-11.js | 8 +- .../prototype/filter/15.4.4.20-9-c-iii-12.js | 8 +- .../prototype/filter/15.4.4.20-9-c-iii-13.js | 12 +-- .../prototype/filter/15.4.4.20-9-c-iii-14.js | 12 +-- .../prototype/filter/15.4.4.20-9-c-iii-15.js | 8 +- .../prototype/filter/15.4.4.20-9-c-iii-16.js | 8 +- .../prototype/filter/15.4.4.20-9-c-iii-17.js | 8 +- .../prototype/filter/15.4.4.20-9-c-iii-18.js | 8 +- .../prototype/filter/15.4.4.20-9-c-iii-19.js | 8 +- .../prototype/filter/15.4.4.20-9-c-iii-2.js | 17 ++-- .../prototype/filter/15.4.4.20-9-c-iii-20.js | 8 +- .../prototype/filter/15.4.4.20-9-c-iii-21.js | 8 +- .../prototype/filter/15.4.4.20-9-c-iii-22.js | 8 +- .../prototype/filter/15.4.4.20-9-c-iii-23.js | 8 +- .../prototype/filter/15.4.4.20-9-c-iii-24.js | 8 +- .../prototype/filter/15.4.4.20-9-c-iii-25.js | 8 +- .../prototype/filter/15.4.4.20-9-c-iii-26.js | 8 +- .../prototype/filter/15.4.4.20-9-c-iii-28.js | 9 +- .../prototype/filter/15.4.4.20-9-c-iii-29.js | 18 ++-- .../prototype/filter/15.4.4.20-9-c-iii-3.js | 17 ++-- .../prototype/filter/15.4.4.20-9-c-iii-30.js | 8 +- .../prototype/filter/15.4.4.20-9-c-iii-4.js | 17 ++-- .../prototype/filter/15.4.4.20-9-c-iii-5.js | 13 +-- .../prototype/filter/15.4.4.20-9-c-iii-6.js | 12 +-- .../prototype/filter/15.4.4.20-9-c-iii-7.js | 12 +-- .../prototype/filter/15.4.4.20-9-c-iii-8.js | 12 +-- .../prototype/filter/15.4.4.20-9-c-iii-9.js | 8 +- .../filter/create-ctor-non-object.js | 4 +- .../prototype/filter/create-ctor-poisoned.js | 4 +- .../prototype/filter/create-non-array.js | 4 +- .../prototype/filter/create-revoked-proxy.js | 4 +- .../prototype/filter/create-species-abrupt.js | 4 +- .../filter/create-species-non-ctor.js | 4 +- .../filter/create-species-poisoned.js | 4 +- ...rn-found-value-predicate-result-is-true.js | 20 +++-- ...efined-if-predicate-returns-false-value.js | 20 +++-- .../return-index-predicate-result-is-true.js | 20 +++-- ...ve-one-if-predicate-returns-false-value.js | 20 +++-- .../flatMap/bound-function-argument.js | 4 +- .../prototype/flatMap/depth-always-one.js | 4 +- .../flatMap/non-callable-argument-throws.js | 2 +- .../flatMap/non-object-ctor-throws.js | 1 - .../flatMap/null-undefined-input-throws.js | 1 - .../prototype/flatMap/thisArg-argument.js | 24 ++++-- .../prototype/flatten/bound-function-call.js | 5 +- .../prototype/flatten/empty-array-elements.js | 15 +++- .../flatten/empty-object-elements.js | 12 ++- .../built-ins/Array/prototype/flatten/name.js | 1 - .../flatten/null-undefined-elements.js | 11 ++- .../flatten/null-undefined-input-throws.js | 1 - .../symbol-object-create-null-depth-throws.js | 1 - .../Array/prototype/forEach/15.4.4.18-1-1.js | 2 +- .../Array/prototype/forEach/15.4.4.18-1-10.js | 14 ++-- .../Array/prototype/forEach/15.4.4.18-1-11.js | 17 ++-- .../Array/prototype/forEach/15.4.4.18-1-12.js | 17 ++-- .../Array/prototype/forEach/15.4.4.18-1-13.js | 15 ++-- .../Array/prototype/forEach/15.4.4.18-1-14.js | 17 ++-- .../Array/prototype/forEach/15.4.4.18-1-15.js | 17 ++-- .../Array/prototype/forEach/15.4.4.18-1-2.js | 2 +- .../Array/prototype/forEach/15.4.4.18-1-3.js | 14 ++-- .../Array/prototype/forEach/15.4.4.18-1-4.js | 19 +++-- .../Array/prototype/forEach/15.4.4.18-1-5.js | 15 ++-- .../Array/prototype/forEach/15.4.4.18-1-6.js | 19 +++-- .../Array/prototype/forEach/15.4.4.18-1-7.js | 11 +-- .../Array/prototype/forEach/15.4.4.18-1-8.js | 13 +-- .../Array/prototype/forEach/15.4.4.18-1-9.js | 21 ++--- .../Array/prototype/forEach/15.4.4.18-2-1.js | 23 ++--- .../Array/prototype/forEach/15.4.4.18-2-10.js | 37 ++++---- .../Array/prototype/forEach/15.4.4.18-2-11.js | 27 +++--- .../Array/prototype/forEach/15.4.4.18-2-12.js | 36 ++++---- .../Array/prototype/forEach/15.4.4.18-2-13.js | 30 +++---- .../Array/prototype/forEach/15.4.4.18-2-14.js | 15 ++-- .../Array/prototype/forEach/15.4.4.18-2-17.js | 19 +++-- .../Array/prototype/forEach/15.4.4.18-2-18.js | 13 +-- .../Array/prototype/forEach/15.4.4.18-2-19.js | 23 ++--- .../Array/prototype/forEach/15.4.4.18-2-2.js | 11 +-- .../Array/prototype/forEach/15.4.4.18-2-3.js | 29 ++++--- .../Array/prototype/forEach/15.4.4.18-2-4.js | 17 ++-- .../Array/prototype/forEach/15.4.4.18-2-5.js | 45 +++++----- .../Array/prototype/forEach/15.4.4.18-2-6.js | 27 +++--- .../Array/prototype/forEach/15.4.4.18-2-7.js | 31 +++---- .../Array/prototype/forEach/15.4.4.18-2-8.js | 39 +++++---- .../Array/prototype/forEach/15.4.4.18-2-9.js | 49 +++++------ .../Array/prototype/forEach/15.4.4.18-3-1.js | 16 ++-- .../Array/prototype/forEach/15.4.4.18-3-10.js | 15 ++-- .../Array/prototype/forEach/15.4.4.18-3-11.js | 16 ++-- .../Array/prototype/forEach/15.4.4.18-3-12.js | 16 ++-- .../Array/prototype/forEach/15.4.4.18-3-13.js | 16 ++-- .../Array/prototype/forEach/15.4.4.18-3-14.js | 15 ++-- .../Array/prototype/forEach/15.4.4.18-3-15.js | 16 ++-- .../Array/prototype/forEach/15.4.4.18-3-16.js | 16 ++-- .../Array/prototype/forEach/15.4.4.18-3-17.js | 16 ++-- .../Array/prototype/forEach/15.4.4.18-3-18.js | 15 ++-- .../Array/prototype/forEach/15.4.4.18-3-19.js | 28 +++---- .../Array/prototype/forEach/15.4.4.18-3-2.js | 17 ++-- .../Array/prototype/forEach/15.4.4.18-3-20.js | 28 +++---- .../Array/prototype/forEach/15.4.4.18-3-21.js | 42 +++++----- .../Array/prototype/forEach/15.4.4.18-3-22.js | 42 +++++----- .../Array/prototype/forEach/15.4.4.18-3-23.js | 50 +++++------ .../Array/prototype/forEach/15.4.4.18-3-24.js | 20 ++--- .../Array/prototype/forEach/15.4.4.18-3-25.js | 20 ++--- .../Array/prototype/forEach/15.4.4.18-3-3.js | 16 ++-- .../Array/prototype/forEach/15.4.4.18-3-4.js | 15 ++-- .../Array/prototype/forEach/15.4.4.18-3-5.js | 15 ++-- .../Array/prototype/forEach/15.4.4.18-3-6.js | 16 ++-- .../Array/prototype/forEach/15.4.4.18-3-7.js | 16 ++-- .../Array/prototype/forEach/15.4.4.18-3-9.js | 15 ++-- .../Array/prototype/forEach/15.4.4.18-4-1.js | 4 +- .../Array/prototype/forEach/15.4.4.18-4-10.js | 19 +++-- .../Array/prototype/forEach/15.4.4.18-4-11.js | 27 +++--- .../Array/prototype/forEach/15.4.4.18-4-12.js | 11 +-- .../Array/prototype/forEach/15.4.4.18-4-15.js | 38 +++++---- .../Array/prototype/forEach/15.4.4.18-4-2.js | 4 +- .../Array/prototype/forEach/15.4.4.18-4-3.js | 4 +- .../Array/prototype/forEach/15.4.4.18-4-4.js | 4 +- .../Array/prototype/forEach/15.4.4.18-4-5.js | 4 +- .../Array/prototype/forEach/15.4.4.18-4-6.js | 4 +- .../Array/prototype/forEach/15.4.4.18-4-7.js | 4 +- .../Array/prototype/forEach/15.4.4.18-4-8.js | 23 ++--- .../Array/prototype/forEach/15.4.4.18-4-9.js | 31 +++---- .../prototype/forEach/15.4.4.18-5-1-s.js | 14 ++-- .../Array/prototype/forEach/15.4.4.18-5-1.js | 19 +++-- .../Array/prototype/forEach/15.4.4.18-5-10.js | 12 +-- .../Array/prototype/forEach/15.4.4.18-5-11.js | 12 +-- .../Array/prototype/forEach/15.4.4.18-5-12.js | 12 +-- .../Array/prototype/forEach/15.4.4.18-5-13.js | 12 +-- .../Array/prototype/forEach/15.4.4.18-5-14.js | 11 +-- .../Array/prototype/forEach/15.4.4.18-5-15.js | 12 +-- .../Array/prototype/forEach/15.4.4.18-5-16.js | 12 +-- .../Array/prototype/forEach/15.4.4.18-5-17.js | 11 +-- .../Array/prototype/forEach/15.4.4.18-5-18.js | 12 +-- .../Array/prototype/forEach/15.4.4.18-5-19.js | 18 ++-- .../Array/prototype/forEach/15.4.4.18-5-2.js | 21 ++--- .../Array/prototype/forEach/15.4.4.18-5-21.js | 11 +-- .../Array/prototype/forEach/15.4.4.18-5-22.js | 10 +-- .../Array/prototype/forEach/15.4.4.18-5-23.js | 11 +-- .../Array/prototype/forEach/15.4.4.18-5-24.js | 11 +-- .../Array/prototype/forEach/15.4.4.18-5-25.js | 23 ++--- .../Array/prototype/forEach/15.4.4.18-5-3.js | 21 ++--- .../Array/prototype/forEach/15.4.4.18-5-4.js | 23 ++--- .../Array/prototype/forEach/15.4.4.18-5-5.js | 23 ++--- .../Array/prototype/forEach/15.4.4.18-5-6.js | 21 ++--- .../Array/prototype/forEach/15.4.4.18-5-7.js | 10 +-- .../Array/prototype/forEach/15.4.4.18-5-9.js | 12 +-- .../Array/prototype/forEach/15.4.4.18-7-1.js | 19 +++-- .../Array/prototype/forEach/15.4.4.18-7-2.js | 19 +++-- .../Array/prototype/forEach/15.4.4.18-7-3.js | 17 ++-- .../Array/prototype/forEach/15.4.4.18-7-4.js | 21 ++--- .../Array/prototype/forEach/15.4.4.18-7-5.js | 21 ++--- .../Array/prototype/forEach/15.4.4.18-7-7.js | 18 ++-- .../Array/prototype/forEach/15.4.4.18-7-8.js | 16 ++-- .../Array/prototype/forEach/15.4.4.18-7-9.js | 31 ++++--- .../prototype/forEach/15.4.4.18-7-b-1.js | 17 ++-- .../prototype/forEach/15.4.4.18-7-b-10.js | 39 +++++---- .../prototype/forEach/15.4.4.18-7-b-11.js | 36 ++++---- .../prototype/forEach/15.4.4.18-7-b-12.js | 36 ++++---- .../prototype/forEach/15.4.4.18-7-b-13.js | 32 +++---- .../prototype/forEach/15.4.4.18-7-b-14.js | 34 ++++---- .../prototype/forEach/15.4.4.18-7-b-15.js | 42 +++++----- .../prototype/forEach/15.4.4.18-7-b-16.js | 42 +++++----- .../prototype/forEach/15.4.4.18-7-b-2.js | 30 +++---- .../prototype/forEach/15.4.4.18-7-b-3.js | 37 ++++---- .../prototype/forEach/15.4.4.18-7-b-4.js | 42 +++++----- .../prototype/forEach/15.4.4.18-7-b-5.js | 40 ++++----- .../prototype/forEach/15.4.4.18-7-b-6.js | 42 +++++----- .../prototype/forEach/15.4.4.18-7-b-7.js | 40 ++++----- .../prototype/forEach/15.4.4.18-7-b-8.js | 48 ++++++----- .../prototype/forEach/15.4.4.18-7-b-9.js | 46 +++++----- .../prototype/forEach/15.4.4.18-7-c-i-1.js | 21 +++-- .../prototype/forEach/15.4.4.18-7-c-i-10.js | 28 +++---- .../prototype/forEach/15.4.4.18-7-c-i-11.js | 38 +++++---- .../prototype/forEach/15.4.4.18-7-c-i-12.js | 30 +++---- .../prototype/forEach/15.4.4.18-7-c-i-13.js | 48 +++++------ .../prototype/forEach/15.4.4.18-7-c-i-14.js | 40 ++++----- .../prototype/forEach/15.4.4.18-7-c-i-15.js | 36 ++++---- .../prototype/forEach/15.4.4.18-7-c-i-16.js | 26 +++--- .../prototype/forEach/15.4.4.18-7-c-i-17.js | 26 +++--- .../prototype/forEach/15.4.4.18-7-c-i-18.js | 24 +++--- .../prototype/forEach/15.4.4.18-7-c-i-19.js | 38 +++++---- .../prototype/forEach/15.4.4.18-7-c-i-2.js | 14 ++-- .../prototype/forEach/15.4.4.18-7-c-i-20.js | 36 ++++---- .../prototype/forEach/15.4.4.18-7-c-i-21.js | 32 +++---- .../prototype/forEach/15.4.4.18-7-c-i-22.js | 22 ++--- .../prototype/forEach/15.4.4.18-7-c-i-25.js | 20 ++--- .../prototype/forEach/15.4.4.18-7-c-i-26.js | 38 ++++----- .../prototype/forEach/15.4.4.18-7-c-i-27.js | 42 +++++----- .../prototype/forEach/15.4.4.18-7-c-i-28.js | 52 ++++++------ .../prototype/forEach/15.4.4.18-7-c-i-29.js | 54 ++++++------ .../prototype/forEach/15.4.4.18-7-c-i-3.js | 30 +++---- .../prototype/forEach/15.4.4.18-7-c-i-30.js | 47 ++++++----- .../prototype/forEach/15.4.4.18-7-c-i-31.js | 46 +++++----- .../prototype/forEach/15.4.4.18-7-c-i-4.js | 16 ++-- .../prototype/forEach/15.4.4.18-7-c-i-5.js | 44 +++++----- .../prototype/forEach/15.4.4.18-7-c-i-6.js | 26 +++--- .../prototype/forEach/15.4.4.18-7-c-i-7.js | 28 ++++--- .../prototype/forEach/15.4.4.18-7-c-i-8.js | 16 ++-- .../prototype/forEach/15.4.4.18-7-c-i-9.js | 31 +++---- .../prototype/forEach/15.4.4.18-7-c-ii-1.js | 23 ++--- .../prototype/forEach/15.4.4.18-7-c-ii-10.js | 11 +-- .../prototype/forEach/15.4.4.18-7-c-ii-11.js | 11 +-- .../prototype/forEach/15.4.4.18-7-c-ii-12.js | 11 +-- .../prototype/forEach/15.4.4.18-7-c-ii-13.js | 11 +-- .../prototype/forEach/15.4.4.18-7-c-ii-16.js | 16 ++-- .../prototype/forEach/15.4.4.18-7-c-ii-17.js | 16 ++-- .../prototype/forEach/15.4.4.18-7-c-ii-18.js | 16 ++-- .../prototype/forEach/15.4.4.18-7-c-ii-19.js | 26 +++--- .../prototype/forEach/15.4.4.18-7-c-ii-2.js | 21 ++--- .../prototype/forEach/15.4.4.18-7-c-ii-20.js | 20 +++-- .../prototype/forEach/15.4.4.18-7-c-ii-21.js | 28 ++++--- .../prototype/forEach/15.4.4.18-7-c-ii-22.js | 28 ++++--- .../prototype/forEach/15.4.4.18-7-c-ii-23.js | 15 ++-- .../prototype/forEach/15.4.4.18-7-c-ii-4.js | 27 +++--- .../prototype/forEach/15.4.4.18-7-c-ii-5.js | 32 +++---- .../prototype/forEach/15.4.4.18-7-c-ii-6.js | 23 ++--- .../prototype/forEach/15.4.4.18-7-c-ii-7.js | 27 +++--- .../prototype/forEach/15.4.4.18-7-c-ii-8.js | 26 +++--- .../prototype/forEach/15.4.4.18-7-c-ii-9.js | 11 +-- .../Array/prototype/forEach/15.4.4.18-8-1.js | 9 +- .../Array/prototype/forEach/15.4.4.18-8-10.js | 18 ++-- .../Array/prototype/forEach/15.4.4.18-8-11.js | 12 +-- .../Array/prototype/forEach/15.4.4.18-8-12.js | 19 +++-- .../Array/prototype/forEach/15.4.4.18-8-13.js | 11 +-- .../Array/prototype/forEach/15.4.4.18-8-2.js | 18 ++-- .../Array/prototype/forEach/15.4.4.18-8-3.js | 18 ++-- .../Array/prototype/forEach/15.4.4.18-8-4.js | 18 ++-- .../Array/prototype/forEach/15.4.4.18-8-5.js | 18 ++-- .../Array/prototype/forEach/15.4.4.18-8-6.js | 24 ++++-- .../Array/prototype/forEach/15.4.4.18-8-7.js | 34 +++++--- .../Array/prototype/forEach/15.4.4.18-8-8.js | 44 +++++----- .../Array/prototype/forEach/15.4.4.18-8-9.js | 44 +++++----- .../Array/prototype/forEach/S15.4.4.18_A1.js | 4 +- .../Array/prototype/forEach/S15.4.4.18_A2.js | 4 +- ...x-equal-or-greater-length-returns-false.js | 2 +- .../search-not-found-returns-false.js | 4 +- .../Array/prototype/includes/sparse.js | 6 +- .../prototype/includes/tolength-length.js | 12 ++- .../Array/prototype/indexOf/15.4.4.14-1-1.js | 2 +- .../Array/prototype/indexOf/15.4.4.14-1-10.js | 4 +- .../Array/prototype/indexOf/15.4.4.14-1-11.js | 6 +- .../Array/prototype/indexOf/15.4.4.14-1-12.js | 6 +- .../Array/prototype/indexOf/15.4.4.14-1-13.js | 6 +- .../Array/prototype/indexOf/15.4.4.14-1-14.js | 6 +- .../Array/prototype/indexOf/15.4.4.14-1-15.js | 8 +- .../Array/prototype/indexOf/15.4.4.14-1-2.js | 2 +- .../Array/prototype/indexOf/15.4.4.14-1-3.js | 6 +- .../Array/prototype/indexOf/15.4.4.14-1-4.js | 6 +- .../Array/prototype/indexOf/15.4.4.14-1-5.js | 6 +- .../Array/prototype/indexOf/15.4.4.14-1-6.js | 6 +- .../Array/prototype/indexOf/15.4.4.14-1-8.js | 2 +- .../Array/prototype/indexOf/15.4.4.14-1-9.js | 8 +- .../Array/prototype/indexOf/15.4.4.14-10-1.js | 14 ++-- .../Array/prototype/indexOf/15.4.4.14-10-2.js | 15 +++- .../Array/prototype/indexOf/15.4.4.14-2-1.js | 10 ++- .../Array/prototype/indexOf/15.4.4.14-2-10.js | 26 +++--- .../Array/prototype/indexOf/15.4.4.14-2-11.js | 12 +-- .../Array/prototype/indexOf/15.4.4.14-2-12.js | 24 +++--- .../Array/prototype/indexOf/15.4.4.14-2-13.js | 18 ++-- .../Array/prototype/indexOf/15.4.4.14-2-14.js | 5 +- .../Array/prototype/indexOf/15.4.4.14-2-17.js | 10 +-- .../Array/prototype/indexOf/15.4.4.14-2-18.js | 4 +- .../Array/prototype/indexOf/15.4.4.14-2-19.js | 10 +-- .../Array/prototype/indexOf/15.4.4.14-2-2.js | 4 +- .../Array/prototype/indexOf/15.4.4.14-2-3.js | 14 ++-- .../Array/prototype/indexOf/15.4.4.14-2-4.js | 8 +- .../Array/prototype/indexOf/15.4.4.14-2-5.js | 30 +++---- .../Array/prototype/indexOf/15.4.4.14-2-6.js | 16 ++-- .../Array/prototype/indexOf/15.4.4.14-2-7.js | 32 +++---- .../Array/prototype/indexOf/15.4.4.14-2-8.js | 24 +++--- .../Array/prototype/indexOf/15.4.4.14-2-9.js | 34 ++++---- .../Array/prototype/indexOf/15.4.4.14-3-1.js | 6 +- .../Array/prototype/indexOf/15.4.4.14-3-10.js | 5 +- .../Array/prototype/indexOf/15.4.4.14-3-11.js | 6 +- .../Array/prototype/indexOf/15.4.4.14-3-12.js | 6 +- .../Array/prototype/indexOf/15.4.4.14-3-13.js | 6 +- .../Array/prototype/indexOf/15.4.4.14-3-14.js | 18 +++- .../Array/prototype/indexOf/15.4.4.14-3-15.js | 6 +- .../Array/prototype/indexOf/15.4.4.14-3-16.js | 6 +- .../Array/prototype/indexOf/15.4.4.14-3-17.js | 6 +- .../Array/prototype/indexOf/15.4.4.14-3-18.js | 6 +- .../Array/prototype/indexOf/15.4.4.14-3-19.js | 28 +++---- .../Array/prototype/indexOf/15.4.4.14-3-2.js | 6 +- .../Array/prototype/indexOf/15.4.4.14-3-20.js | 20 ++--- .../Array/prototype/indexOf/15.4.4.14-3-21.js | 30 +++---- .../Array/prototype/indexOf/15.4.4.14-3-22.js | 30 +++---- .../Array/prototype/indexOf/15.4.4.14-3-23.js | 38 ++++----- .../Array/prototype/indexOf/15.4.4.14-3-24.js | 6 +- .../Array/prototype/indexOf/15.4.4.14-3-25.js | 6 +- .../Array/prototype/indexOf/15.4.4.14-3-28.js | 14 ++-- .../Array/prototype/indexOf/15.4.4.14-3-29.js | 12 +-- .../Array/prototype/indexOf/15.4.4.14-3-3.js | 5 +- .../Array/prototype/indexOf/15.4.4.14-3-4.js | 5 +- .../Array/prototype/indexOf/15.4.4.14-3-5.js | 5 +- .../Array/prototype/indexOf/15.4.4.14-3-6.js | 6 +- .../Array/prototype/indexOf/15.4.4.14-3-7.js | 6 +- .../Array/prototype/indexOf/15.4.4.14-3-8.js | 5 +- .../Array/prototype/indexOf/15.4.4.14-3-9.js | 5 +- .../Array/prototype/indexOf/15.4.4.14-4-1.js | 2 +- .../Array/prototype/indexOf/15.4.4.14-4-10.js | 8 +- .../Array/prototype/indexOf/15.4.4.14-4-11.js | 8 +- .../Array/prototype/indexOf/15.4.4.14-4-2.js | 4 +- .../Array/prototype/indexOf/15.4.4.14-4-3.js | 4 +- .../Array/prototype/indexOf/15.4.4.14-4-4.js | 4 +- .../Array/prototype/indexOf/15.4.4.14-4-5.js | 4 +- .../Array/prototype/indexOf/15.4.4.14-4-6.js | 8 +- .../Array/prototype/indexOf/15.4.4.14-4-7.js | 18 ++-- .../Array/prototype/indexOf/15.4.4.14-4-8.js | 30 +++---- .../Array/prototype/indexOf/15.4.4.14-4-9.js | 8 +- .../Array/prototype/indexOf/15.4.4.14-5-1.js | 6 +- .../Array/prototype/indexOf/15.4.4.14-5-10.js | 2 +- .../Array/prototype/indexOf/15.4.4.14-5-11.js | 2 +- .../Array/prototype/indexOf/15.4.4.14-5-12.js | 4 +- .../Array/prototype/indexOf/15.4.4.14-5-16.js | 4 +- .../Array/prototype/indexOf/15.4.4.14-5-18.js | 2 +- .../Array/prototype/indexOf/15.4.4.14-5-19.js | 2 +- .../Array/prototype/indexOf/15.4.4.14-5-2.js | 8 +- .../Array/prototype/indexOf/15.4.4.14-5-20.js | 2 +- .../Array/prototype/indexOf/15.4.4.14-5-21.js | 20 ++--- .../Array/prototype/indexOf/15.4.4.14-5-22.js | 10 +-- .../Array/prototype/indexOf/15.4.4.14-5-23.js | 24 +++--- .../Array/prototype/indexOf/15.4.4.14-5-24.js | 26 +++--- .../Array/prototype/indexOf/15.4.4.14-5-25.js | 30 +++---- .../Array/prototype/indexOf/15.4.4.14-5-26.js | 40 ++++----- .../Array/prototype/indexOf/15.4.4.14-5-27.js | 48 +++++------ .../Array/prototype/indexOf/15.4.4.14-5-28.js | 16 ++-- .../Array/prototype/indexOf/15.4.4.14-5-29.js | 30 +++---- .../Array/prototype/indexOf/15.4.4.14-5-3.js | 6 +- .../Array/prototype/indexOf/15.4.4.14-5-30.js | 38 ++++----- .../Array/prototype/indexOf/15.4.4.14-5-31.js | 2 +- .../Array/prototype/indexOf/15.4.4.14-5-32.js | 2 +- .../Array/prototype/indexOf/15.4.4.14-5-4.js | 4 +- .../Array/prototype/indexOf/15.4.4.14-5-5.js | 4 +- .../Array/prototype/indexOf/15.4.4.14-5-6.js | 4 +- .../Array/prototype/indexOf/15.4.4.14-6-1.js | 8 +- .../Array/prototype/indexOf/15.4.4.14-8-1.js | 10 +-- .../Array/prototype/indexOf/15.4.4.14-9-1.js | 14 ++-- .../Array/prototype/indexOf/15.4.4.14-9-10.js | 8 +- .../Array/prototype/indexOf/15.4.4.14-9-11.js | 16 ++-- .../Array/prototype/indexOf/15.4.4.14-9-2.js | 14 ++-- .../Array/prototype/indexOf/15.4.4.14-9-3.js | 10 ++- .../Array/prototype/indexOf/15.4.4.14-9-4.js | 12 ++- .../Array/prototype/indexOf/15.4.4.14-9-5.js | 20 ++++- .../Array/prototype/indexOf/15.4.4.14-9-6.js | 10 ++- .../Array/prototype/indexOf/15.4.4.14-9-7.js | 4 +- .../Array/prototype/indexOf/15.4.4.14-9-8.js | 4 +- .../Array/prototype/indexOf/15.4.4.14-9-9.js | 20 ++--- .../prototype/indexOf/15.4.4.14-9-a-1.js | 16 ++-- .../prototype/indexOf/15.4.4.14-9-a-10.js | 26 +++--- .../prototype/indexOf/15.4.4.14-9-a-11.js | 30 +++---- .../prototype/indexOf/15.4.4.14-9-a-12.js | 28 +++---- .../prototype/indexOf/15.4.4.14-9-a-13.js | 21 +++-- .../prototype/indexOf/15.4.4.14-9-a-14.js | 18 ++-- .../prototype/indexOf/15.4.4.14-9-a-15.js | 23 +++-- .../prototype/indexOf/15.4.4.14-9-a-16.js | 18 ++-- .../prototype/indexOf/15.4.4.14-9-a-17.js | 16 ++-- .../prototype/indexOf/15.4.4.14-9-a-18.js | 28 +++---- .../prototype/indexOf/15.4.4.14-9-a-19.js | 28 +++---- .../prototype/indexOf/15.4.4.14-9-a-2.js | 18 ++-- .../prototype/indexOf/15.4.4.14-9-a-3.js | 18 ++-- .../prototype/indexOf/15.4.4.14-9-a-4.js | 18 ++-- .../prototype/indexOf/15.4.4.14-9-a-5.js | 17 ++-- .../prototype/indexOf/15.4.4.14-9-a-6.js | 18 ++-- .../prototype/indexOf/15.4.4.14-9-a-7.js | 28 ++++--- .../prototype/indexOf/15.4.4.14-9-a-8.js | 26 +++--- .../prototype/indexOf/15.4.4.14-9-a-9.js | 28 ++++--- .../prototype/indexOf/15.4.4.14-9-b-i-1.js | 7 +- .../prototype/indexOf/15.4.4.14-9-b-i-10.js | 40 ++++----- .../prototype/indexOf/15.4.4.14-9-b-i-11.js | 16 ++-- .../prototype/indexOf/15.4.4.14-9-b-i-12.js | 18 ++-- .../prototype/indexOf/15.4.4.14-9-b-i-13.js | 26 +++--- .../prototype/indexOf/15.4.4.14-9-b-i-14.js | 28 ++++--- .../prototype/indexOf/15.4.4.14-9-b-i-15.js | 36 ++++---- .../prototype/indexOf/15.4.4.14-9-b-i-16.js | 48 ++++++----- .../prototype/indexOf/15.4.4.14-9-b-i-17.js | 10 +-- .../prototype/indexOf/15.4.4.14-9-b-i-18.js | 12 +-- .../prototype/indexOf/15.4.4.14-9-b-i-19.js | 22 ++--- .../prototype/indexOf/15.4.4.14-9-b-i-20.js | 30 +++---- .../prototype/indexOf/15.4.4.14-9-b-i-21.js | 8 +- .../prototype/indexOf/15.4.4.14-9-b-i-22.js | 12 +-- .../prototype/indexOf/15.4.4.14-9-b-i-25.js | 8 +- .../prototype/indexOf/15.4.4.14-9-b-i-26.js | 10 +-- .../prototype/indexOf/15.4.4.14-9-b-i-27.js | 10 +-- .../prototype/indexOf/15.4.4.14-9-b-i-28.js | 38 ++++----- .../prototype/indexOf/15.4.4.14-9-b-i-29.js | 40 ++++----- .../prototype/indexOf/15.4.4.14-9-b-i-3.js | 2 +- .../prototype/indexOf/15.4.4.14-9-b-i-30.js | 32 +++---- .../prototype/indexOf/15.4.4.14-9-b-i-31.js | 34 ++++---- .../prototype/indexOf/15.4.4.14-9-b-i-4.js | 8 +- .../prototype/indexOf/15.4.4.14-9-b-i-5.js | 12 +-- .../prototype/indexOf/15.4.4.14-9-b-i-6.js | 18 ++-- .../prototype/indexOf/15.4.4.14-9-b-i-7.js | 6 +- .../prototype/indexOf/15.4.4.14-9-b-i-8.js | 18 ++-- .../prototype/indexOf/15.4.4.14-9-b-i-9.js | 38 ++++----- .../prototype/indexOf/15.4.4.14-9-b-ii-1.js | 4 +- .../prototype/indexOf/15.4.4.14-9-b-ii-11.js | 6 +- .../prototype/indexOf/15.4.4.14-9-b-iii-2.js | 36 ++++---- .../Array/prototype/join/S15.4.4.5_A1.2_T1.js | 2 +- .../Array/prototype/join/S15.4.4.5_A1.2_T2.js | 2 +- .../Array/prototype/join/S15.4.4.5_A1.3_T1.js | 2 +- .../Array/prototype/join/S15.4.4.5_A2_T1.js | 16 ++-- .../Array/prototype/join/S15.4.4.5_A2_T2.js | 2 +- .../Array/prototype/join/S15.4.4.5_A2_T4.js | 66 +++++++++++++-- .../Array/prototype/join/S15.4.4.5_A3.1_T1.js | 4 +- .../Array/prototype/join/S15.4.4.5_A3.1_T2.js | 84 +++++++++++++++---- .../Array/prototype/join/S15.4.4.5_A3.2_T1.js | 24 +++--- .../Array/prototype/join/S15.4.4.5_A3.2_T2.js | 66 +++++++++++++-- .../Array/prototype/join/S15.4.4.5_A5_T1.js | 4 +- .../Array/prototype/keys/iteration-mutable.js | 2 +- .../prototype/lastIndexOf/15.4.4.15-1-1.js | 2 +- .../prototype/lastIndexOf/15.4.4.15-1-10.js | 4 +- .../prototype/lastIndexOf/15.4.4.15-1-11.js | 6 +- .../prototype/lastIndexOf/15.4.4.15-1-12.js | 6 +- .../prototype/lastIndexOf/15.4.4.15-1-13.js | 6 +- .../prototype/lastIndexOf/15.4.4.15-1-14.js | 6 +- .../prototype/lastIndexOf/15.4.4.15-1-15.js | 6 +- .../prototype/lastIndexOf/15.4.4.15-1-2.js | 2 +- .../prototype/lastIndexOf/15.4.4.15-1-3.js | 4 +- .../prototype/lastIndexOf/15.4.4.15-1-4.js | 6 +- .../prototype/lastIndexOf/15.4.4.15-1-5.js | 4 +- .../prototype/lastIndexOf/15.4.4.15-1-6.js | 6 +- .../prototype/lastIndexOf/15.4.4.15-1-8.js | 2 +- .../prototype/lastIndexOf/15.4.4.15-1-9.js | 8 +- .../prototype/lastIndexOf/15.4.4.15-2-1.js | 6 +- .../prototype/lastIndexOf/15.4.4.15-2-10.js | 24 +++--- .../prototype/lastIndexOf/15.4.4.15-2-11.js | 12 +-- .../prototype/lastIndexOf/15.4.4.15-2-12.js | 24 +++--- .../prototype/lastIndexOf/15.4.4.15-2-13.js | 18 ++-- .../prototype/lastIndexOf/15.4.4.15-2-14.js | 5 +- .../prototype/lastIndexOf/15.4.4.15-2-17.js | 12 +-- .../prototype/lastIndexOf/15.4.4.15-2-18.js | 4 +- .../prototype/lastIndexOf/15.4.4.15-2-19.js | 10 +-- .../prototype/lastIndexOf/15.4.4.15-2-2.js | 4 +- .../prototype/lastIndexOf/15.4.4.15-2-3.js | 14 ++-- .../prototype/lastIndexOf/15.4.4.15-2-4.js | 8 +- .../prototype/lastIndexOf/15.4.4.15-2-5.js | 30 +++---- .../prototype/lastIndexOf/15.4.4.15-2-6.js | 14 ++-- .../prototype/lastIndexOf/15.4.4.15-2-7.js | 17 ++-- .../prototype/lastIndexOf/15.4.4.15-2-8.js | 24 +++--- .../prototype/lastIndexOf/15.4.4.15-2-9.js | 34 ++++---- .../prototype/lastIndexOf/15.4.4.15-3-1.js | 6 +- .../prototype/lastIndexOf/15.4.4.15-3-10.js | 5 +- .../prototype/lastIndexOf/15.4.4.15-3-11.js | 6 +- .../prototype/lastIndexOf/15.4.4.15-3-12.js | 6 +- .../prototype/lastIndexOf/15.4.4.15-3-13.js | 6 +- .../prototype/lastIndexOf/15.4.4.15-3-14.js | 6 +- .../prototype/lastIndexOf/15.4.4.15-3-15.js | 6 +- .../prototype/lastIndexOf/15.4.4.15-3-16.js | 6 +- .../prototype/lastIndexOf/15.4.4.15-3-17.js | 6 +- .../prototype/lastIndexOf/15.4.4.15-3-18.js | 7 +- .../prototype/lastIndexOf/15.4.4.15-3-19.js | 30 +++---- .../prototype/lastIndexOf/15.4.4.15-3-2.js | 6 +- .../prototype/lastIndexOf/15.4.4.15-3-20.js | 20 ++--- .../prototype/lastIndexOf/15.4.4.15-3-21.js | 32 +++---- .../prototype/lastIndexOf/15.4.4.15-3-22.js | 32 +++---- .../prototype/lastIndexOf/15.4.4.15-3-23.js | 38 ++++----- .../prototype/lastIndexOf/15.4.4.15-3-24.js | 6 +- .../prototype/lastIndexOf/15.4.4.15-3-25.js | 6 +- .../prototype/lastIndexOf/15.4.4.15-3-28.js | 14 ++-- .../prototype/lastIndexOf/15.4.4.15-3-3.js | 5 +- .../prototype/lastIndexOf/15.4.4.15-3-4.js | 5 +- .../prototype/lastIndexOf/15.4.4.15-3-5.js | 5 +- .../prototype/lastIndexOf/15.4.4.15-3-6.js | 6 +- .../prototype/lastIndexOf/15.4.4.15-3-7.js | 6 +- .../prototype/lastIndexOf/15.4.4.15-3-9.js | 5 +- .../prototype/lastIndexOf/15.4.4.15-4-1.js | 2 +- .../prototype/lastIndexOf/15.4.4.15-4-10.js | 8 +- .../prototype/lastIndexOf/15.4.4.15-4-11.js | 8 +- .../prototype/lastIndexOf/15.4.4.15-4-2.js | 4 +- .../prototype/lastIndexOf/15.4.4.15-4-3.js | 4 +- .../prototype/lastIndexOf/15.4.4.15-4-4.js | 13 +-- .../prototype/lastIndexOf/15.4.4.15-4-5.js | 4 +- .../prototype/lastIndexOf/15.4.4.15-4-6.js | 8 +- .../prototype/lastIndexOf/15.4.4.15-4-7.js | 33 +++++--- .../prototype/lastIndexOf/15.4.4.15-4-8.js | 30 +++---- .../prototype/lastIndexOf/15.4.4.15-4-9.js | 8 +- .../prototype/lastIndexOf/15.4.4.15-5-1.js | 6 +- .../prototype/lastIndexOf/15.4.4.15-5-10.js | 2 +- .../prototype/lastIndexOf/15.4.4.15-5-11.js | 2 +- .../prototype/lastIndexOf/15.4.4.15-5-12.js | 4 +- .../prototype/lastIndexOf/15.4.4.15-5-16.js | 4 +- .../prototype/lastIndexOf/15.4.4.15-5-18.js | 2 +- .../prototype/lastIndexOf/15.4.4.15-5-19.js | 2 +- .../prototype/lastIndexOf/15.4.4.15-5-2.js | 8 +- .../prototype/lastIndexOf/15.4.4.15-5-20.js | 2 +- .../prototype/lastIndexOf/15.4.4.15-5-21.js | 22 ++--- .../prototype/lastIndexOf/15.4.4.15-5-22.js | 12 +-- .../prototype/lastIndexOf/15.4.4.15-5-23.js | 24 +++--- .../prototype/lastIndexOf/15.4.4.15-5-24.js | 26 +++--- .../prototype/lastIndexOf/15.4.4.15-5-25.js | 30 +++---- .../prototype/lastIndexOf/15.4.4.15-5-26.js | 40 ++++----- .../prototype/lastIndexOf/15.4.4.15-5-27.js | 48 +++++------ .../prototype/lastIndexOf/15.4.4.15-5-28.js | 16 ++-- .../prototype/lastIndexOf/15.4.4.15-5-29.js | 30 +++---- .../prototype/lastIndexOf/15.4.4.15-5-3.js | 6 +- .../prototype/lastIndexOf/15.4.4.15-5-30.js | 38 ++++----- .../prototype/lastIndexOf/15.4.4.15-5-31.js | 2 +- .../prototype/lastIndexOf/15.4.4.15-5-32.js | 2 +- .../prototype/lastIndexOf/15.4.4.15-5-4.js | 6 +- .../prototype/lastIndexOf/15.4.4.15-5-5.js | 6 +- .../prototype/lastIndexOf/15.4.4.15-5-6.js | 4 +- .../prototype/lastIndexOf/15.4.4.15-6-1.js | 6 +- .../prototype/lastIndexOf/15.4.4.15-7-1.js | 8 +- .../prototype/lastIndexOf/15.4.4.15-8-1.js | 10 ++- .../prototype/lastIndexOf/15.4.4.15-8-10.js | 8 +- .../prototype/lastIndexOf/15.4.4.15-8-11.js | 16 ++-- .../prototype/lastIndexOf/15.4.4.15-8-2.js | 14 ++-- .../prototype/lastIndexOf/15.4.4.15-8-3.js | 10 ++- .../prototype/lastIndexOf/15.4.4.15-8-4.js | 12 ++- .../prototype/lastIndexOf/15.4.4.15-8-5.js | 20 ++++- .../prototype/lastIndexOf/15.4.4.15-8-6.js | 10 ++- .../prototype/lastIndexOf/15.4.4.15-8-7.js | 4 +- .../prototype/lastIndexOf/15.4.4.15-8-8.js | 4 +- .../prototype/lastIndexOf/15.4.4.15-8-9.js | 18 ++-- .../prototype/lastIndexOf/15.4.4.15-8-a-1.js | 16 ++-- .../prototype/lastIndexOf/15.4.4.15-8-a-10.js | 26 +++--- .../prototype/lastIndexOf/15.4.4.15-8-a-11.js | 30 +++---- .../prototype/lastIndexOf/15.4.4.15-8-a-12.js | 28 +++---- .../prototype/lastIndexOf/15.4.4.15-8-a-13.js | 21 +++-- .../prototype/lastIndexOf/15.4.4.15-8-a-14.js | 18 ++-- .../prototype/lastIndexOf/15.4.4.15-8-a-15.js | 23 +++-- .../prototype/lastIndexOf/15.4.4.15-8-a-16.js | 18 ++-- .../prototype/lastIndexOf/15.4.4.15-8-a-17.js | 16 ++-- .../prototype/lastIndexOf/15.4.4.15-8-a-18.js | 28 +++---- .../prototype/lastIndexOf/15.4.4.15-8-a-19.js | 28 +++---- .../prototype/lastIndexOf/15.4.4.15-8-a-2.js | 18 ++-- .../prototype/lastIndexOf/15.4.4.15-8-a-3.js | 18 ++-- .../prototype/lastIndexOf/15.4.4.15-8-a-4.js | 18 ++-- .../prototype/lastIndexOf/15.4.4.15-8-a-5.js | 17 ++-- .../prototype/lastIndexOf/15.4.4.15-8-a-6.js | 18 ++-- .../prototype/lastIndexOf/15.4.4.15-8-a-7.js | 28 ++++--- .../prototype/lastIndexOf/15.4.4.15-8-a-8.js | 26 +++--- .../prototype/lastIndexOf/15.4.4.15-8-a-9.js | 28 ++++--- .../lastIndexOf/15.4.4.15-8-b-i-1.js | 7 +- .../lastIndexOf/15.4.4.15-8-b-i-10.js | 40 ++++----- .../lastIndexOf/15.4.4.15-8-b-i-11.js | 16 ++-- .../lastIndexOf/15.4.4.15-8-b-i-12.js | 18 ++-- .../lastIndexOf/15.4.4.15-8-b-i-13.js | 26 +++--- .../lastIndexOf/15.4.4.15-8-b-i-14.js | 28 ++++--- .../lastIndexOf/15.4.4.15-8-b-i-15.js | 36 ++++---- .../lastIndexOf/15.4.4.15-8-b-i-16.js | 48 ++++++----- .../lastIndexOf/15.4.4.15-8-b-i-17.js | 10 +-- .../lastIndexOf/15.4.4.15-8-b-i-18.js | 12 +-- .../lastIndexOf/15.4.4.15-8-b-i-19.js | 24 +++--- .../lastIndexOf/15.4.4.15-8-b-i-20.js | 22 ++--- .../lastIndexOf/15.4.4.15-8-b-i-21.js | 8 +- .../lastIndexOf/15.4.4.15-8-b-i-22.js | 12 +-- .../lastIndexOf/15.4.4.15-8-b-i-25.js | 8 +- .../lastIndexOf/15.4.4.15-8-b-i-26.js | 10 +-- .../lastIndexOf/15.4.4.15-8-b-i-27.js | 2 +- .../lastIndexOf/15.4.4.15-8-b-i-28.js | 38 ++++----- .../lastIndexOf/15.4.4.15-8-b-i-29.js | 40 ++++----- .../lastIndexOf/15.4.4.15-8-b-i-3.js | 2 +- .../lastIndexOf/15.4.4.15-8-b-i-30.js | 32 +++---- .../lastIndexOf/15.4.4.15-8-b-i-31.js | 34 ++++---- .../lastIndexOf/15.4.4.15-8-b-i-4.js | 8 +- .../lastIndexOf/15.4.4.15-8-b-i-5.js | 12 +-- .../lastIndexOf/15.4.4.15-8-b-i-6.js | 18 ++-- .../lastIndexOf/15.4.4.15-8-b-i-7.js | 6 +- .../lastIndexOf/15.4.4.15-8-b-i-8.js | 18 ++-- .../lastIndexOf/15.4.4.15-8-b-i-9.js | 38 ++++----- .../lastIndexOf/15.4.4.15-8-b-ii-1.js | 4 +- .../lastIndexOf/15.4.4.15-8-b-ii-11.js | 6 +- .../lastIndexOf/15.4.4.15-8-b-iii-2.js | 36 ++++---- .../prototype/lastIndexOf/15.4.4.15-9-1.js | 14 ++-- .../prototype/lastIndexOf/15.4.4.15-9-2.js | 15 +++- .../Array/prototype/map/15.4.4.19-1-1.js | 2 +- .../Array/prototype/map/15.4.4.19-1-10.js | 12 +-- .../Array/prototype/map/15.4.4.19-1-11.js | 14 ++-- .../Array/prototype/map/15.4.4.19-1-12.js | 14 ++-- .../Array/prototype/map/15.4.4.19-1-13.js | 12 +-- .../Array/prototype/map/15.4.4.19-1-14.js | 14 ++-- .../Array/prototype/map/15.4.4.19-1-15.js | 14 ++-- .../Array/prototype/map/15.4.4.19-1-2.js | 2 +- .../Array/prototype/map/15.4.4.19-1-3.js | 12 +-- .../Array/prototype/map/15.4.4.19-1-4.js | 16 ++-- .../Array/prototype/map/15.4.4.19-1-5.js | 12 +-- .../Array/prototype/map/15.4.4.19-1-6.js | 16 ++-- .../Array/prototype/map/15.4.4.19-1-7.js | 8 +- .../Array/prototype/map/15.4.4.19-1-8.js | 10 +-- .../Array/prototype/map/15.4.4.19-1-9.js | 18 ++-- .../Array/prototype/map/15.4.4.19-2-1.js | 20 ++--- .../Array/prototype/map/15.4.4.19-2-10.js | 34 ++++---- .../Array/prototype/map/15.4.4.19-2-11.js | 24 +++--- .../Array/prototype/map/15.4.4.19-2-12.js | 33 ++++---- .../Array/prototype/map/15.4.4.19-2-13.js | 28 +++---- .../Array/prototype/map/15.4.4.19-2-14.js | 13 +-- .../Array/prototype/map/15.4.4.19-2-17.js | 14 ++-- .../Array/prototype/map/15.4.4.19-2-18.js | 12 +-- .../Array/prototype/map/15.4.4.19-2-19.js | 20 ++--- .../Array/prototype/map/15.4.4.19-2-2.js | 8 +- .../Array/prototype/map/15.4.4.19-2-3.js | 26 +++--- .../Array/prototype/map/15.4.4.19-2-4.js | 14 ++-- .../Array/prototype/map/15.4.4.19-2-5.js | 42 +++++----- .../Array/prototype/map/15.4.4.19-2-6.js | 24 +++--- .../Array/prototype/map/15.4.4.19-2-7.js | 28 +++---- .../Array/prototype/map/15.4.4.19-2-8.js | 36 ++++---- .../Array/prototype/map/15.4.4.19-2-9.js | 46 +++++----- .../Array/prototype/map/15.4.4.19-3-1.js | 12 +-- .../Array/prototype/map/15.4.4.19-3-10.js | 13 +-- .../Array/prototype/map/15.4.4.19-3-11.js | 15 ++-- .../Array/prototype/map/15.4.4.19-3-12.js | 15 ++-- .../Array/prototype/map/15.4.4.19-3-13.js | 15 ++-- .../Array/prototype/map/15.4.4.19-3-14.js | 13 +-- .../Array/prototype/map/15.4.4.19-3-15.js | 15 ++-- .../Array/prototype/map/15.4.4.19-3-16.js | 15 ++-- .../Array/prototype/map/15.4.4.19-3-17.js | 15 ++-- .../Array/prototype/map/15.4.4.19-3-18.js | 12 +-- .../Array/prototype/map/15.4.4.19-3-19.js | 26 +++--- .../Array/prototype/map/15.4.4.19-3-2.js | 13 +-- .../Array/prototype/map/15.4.4.19-3-20.js | 26 +++--- .../Array/prototype/map/15.4.4.19-3-21.js | 40 ++++----- .../Array/prototype/map/15.4.4.19-3-22.js | 32 +++---- .../Array/prototype/map/15.4.4.19-3-23.js | 48 +++++------ .../Array/prototype/map/15.4.4.19-3-24.js | 18 ++-- .../Array/prototype/map/15.4.4.19-3-25.js | 18 ++-- .../Array/prototype/map/15.4.4.19-3-28.js | 16 ++-- .../Array/prototype/map/15.4.4.19-3-29.js | 18 ++-- .../Array/prototype/map/15.4.4.19-3-3.js | 13 +-- .../Array/prototype/map/15.4.4.19-3-4.js | 13 +-- .../Array/prototype/map/15.4.4.19-3-5.js | 13 +-- .../Array/prototype/map/15.4.4.19-3-6.js | 15 ++-- .../Array/prototype/map/15.4.4.19-3-7.js | 15 ++-- .../Array/prototype/map/15.4.4.19-3-8.js | 13 +-- .../Array/prototype/map/15.4.4.19-3-9.js | 13 +-- .../Array/prototype/map/15.4.4.19-4-1.js | 4 +- .../Array/prototype/map/15.4.4.19-4-10.js | 19 +++-- .../Array/prototype/map/15.4.4.19-4-11.js | 27 +++--- .../Array/prototype/map/15.4.4.19-4-12.js | 8 +- .../Array/prototype/map/15.4.4.19-4-15.js | 38 +++++---- .../Array/prototype/map/15.4.4.19-4-2.js | 4 +- .../Array/prototype/map/15.4.4.19-4-3.js | 4 +- .../Array/prototype/map/15.4.4.19-4-4.js | 4 +- .../Array/prototype/map/15.4.4.19-4-5.js | 4 +- .../Array/prototype/map/15.4.4.19-4-6.js | 4 +- .../Array/prototype/map/15.4.4.19-4-7.js | 4 +- .../Array/prototype/map/15.4.4.19-4-8.js | 23 ++--- .../Array/prototype/map/15.4.4.19-4-9.js | 31 +++---- .../Array/prototype/map/15.4.4.19-5-1-s.js | 14 ++-- .../Array/prototype/map/15.4.4.19-5-1.js | 16 ++-- .../Array/prototype/map/15.4.4.19-5-10.js | 10 +-- .../Array/prototype/map/15.4.4.19-5-11.js | 10 +-- .../Array/prototype/map/15.4.4.19-5-12.js | 10 +-- .../Array/prototype/map/15.4.4.19-5-13.js | 10 +-- .../Array/prototype/map/15.4.4.19-5-14.js | 8 +- .../Array/prototype/map/15.4.4.19-5-15.js | 10 +-- .../Array/prototype/map/15.4.4.19-5-16.js | 10 +-- .../Array/prototype/map/15.4.4.19-5-17.js | 8 +- .../Array/prototype/map/15.4.4.19-5-18.js | 10 +-- .../Array/prototype/map/15.4.4.19-5-19.js | 16 ++-- .../Array/prototype/map/15.4.4.19-5-2.js | 19 +++-- .../Array/prototype/map/15.4.4.19-5-21.js | 9 +- .../Array/prototype/map/15.4.4.19-5-22.js | 8 +- .../Array/prototype/map/15.4.4.19-5-23.js | 8 +- .../Array/prototype/map/15.4.4.19-5-24.js | 8 +- .../Array/prototype/map/15.4.4.19-5-3.js | 19 +++-- .../Array/prototype/map/15.4.4.19-5-4.js | 21 ++--- .../Array/prototype/map/15.4.4.19-5-5.js | 21 ++--- .../Array/prototype/map/15.4.4.19-5-6.js | 19 +++-- .../Array/prototype/map/15.4.4.19-5-7.js | 8 +- .../Array/prototype/map/15.4.4.19-5-9.js | 10 +-- .../Array/prototype/map/15.4.4.19-6-1.js | 2 +- .../Array/prototype/map/15.4.4.19-6-2.js | 2 +- .../Array/prototype/map/15.4.4.19-8-1.js | 16 ++-- .../Array/prototype/map/15.4.4.19-8-2.js | 20 ++--- .../Array/prototype/map/15.4.4.19-8-3.js | 20 ++--- .../Array/prototype/map/15.4.4.19-8-4.js | 19 +++-- .../Array/prototype/map/15.4.4.19-8-5.js | 23 ++--- .../Array/prototype/map/15.4.4.19-8-6.js | 24 +++--- .../Array/prototype/map/15.4.4.19-8-7.js | 20 ++--- .../Array/prototype/map/15.4.4.19-8-8.js | 19 +++-- .../Array/prototype/map/15.4.4.19-8-9.js | 29 +++---- .../Array/prototype/map/15.4.4.19-8-b-1.js | 19 +++-- .../Array/prototype/map/15.4.4.19-8-b-10.js | 29 ++++--- .../Array/prototype/map/15.4.4.19-8-b-11.js | 26 +++--- .../Array/prototype/map/15.4.4.19-8-b-12.js | 39 +++++---- .../Array/prototype/map/15.4.4.19-8-b-13.js | 34 ++++---- .../Array/prototype/map/15.4.4.19-8-b-14.js | 24 +++--- .../Array/prototype/map/15.4.4.19-8-b-15.js | 44 +++++----- .../Array/prototype/map/15.4.4.19-8-b-16.js | 44 +++++----- .../Array/prototype/map/15.4.4.19-8-b-2.js | 32 +++---- .../Array/prototype/map/15.4.4.19-8-b-3.js | 35 ++++---- .../Array/prototype/map/15.4.4.19-8-b-4.js | 44 +++++----- .../Array/prototype/map/15.4.4.19-8-b-5.js | 42 +++++----- .../Array/prototype/map/15.4.4.19-8-b-6.js | 44 +++++----- .../Array/prototype/map/15.4.4.19-8-b-7.js | 42 +++++----- .../Array/prototype/map/15.4.4.19-8-b-8.js | 46 +++++----- .../Array/prototype/map/15.4.4.19-8-b-9.js | 44 +++++----- .../Array/prototype/map/15.4.4.19-8-c-i-1.js | 21 +++-- .../Array/prototype/map/15.4.4.19-8-c-i-10.js | 30 +++---- .../Array/prototype/map/15.4.4.19-8-c-i-11.js | 39 +++++---- .../Array/prototype/map/15.4.4.19-8-c-i-12.js | 32 +++---- .../Array/prototype/map/15.4.4.19-8-c-i-13.js | 50 +++++------ .../Array/prototype/map/15.4.4.19-8-c-i-14.js | 42 +++++----- .../Array/prototype/map/15.4.4.19-8-c-i-15.js | 38 +++++---- .../Array/prototype/map/15.4.4.19-8-c-i-16.js | 28 +++---- .../Array/prototype/map/15.4.4.19-8-c-i-17.js | 26 +++--- .../Array/prototype/map/15.4.4.19-8-c-i-18.js | 24 +++--- .../Array/prototype/map/15.4.4.19-8-c-i-19.js | 36 ++++---- .../Array/prototype/map/15.4.4.19-8-c-i-2.js | 18 ++-- .../Array/prototype/map/15.4.4.19-8-c-i-20.js | 44 +++++----- .../Array/prototype/map/15.4.4.19-8-c-i-21.js | 32 +++---- .../Array/prototype/map/15.4.4.19-8-c-i-22.js | 22 ++--- .../Array/prototype/map/15.4.4.19-8-c-i-25.js | 22 ++--- .../Array/prototype/map/15.4.4.19-8-c-i-26.js | 26 +++--- .../Array/prototype/map/15.4.4.19-8-c-i-27.js | 30 +++---- .../Array/prototype/map/15.4.4.19-8-c-i-28.js | 58 ++++++------- .../Array/prototype/map/15.4.4.19-8-c-i-29.js | 60 ++++++------- .../Array/prototype/map/15.4.4.19-8-c-i-3.js | 29 ++++--- .../Array/prototype/map/15.4.4.19-8-c-i-30.js | 47 ++++++----- .../Array/prototype/map/15.4.4.19-8-c-i-31.js | 46 +++++----- .../Array/prototype/map/15.4.4.19-8-c-i-4.js | 18 ++-- .../Array/prototype/map/15.4.4.19-8-c-i-5.js | 46 +++++----- .../Array/prototype/map/15.4.4.19-8-c-i-6.js | 28 +++---- .../Array/prototype/map/15.4.4.19-8-c-i-7.js | 27 +++--- .../Array/prototype/map/15.4.4.19-8-c-i-8.js | 16 ++-- .../Array/prototype/map/15.4.4.19-8-c-i-9.js | 32 +++---- .../Array/prototype/map/15.4.4.19-8-c-ii-1.js | 23 ++--- .../prototype/map/15.4.4.19-8-c-ii-10.js | 8 +- .../prototype/map/15.4.4.19-8-c-ii-11.js | 8 +- .../prototype/map/15.4.4.19-8-c-ii-12.js | 8 +- .../prototype/map/15.4.4.19-8-c-ii-13.js | 8 +- .../prototype/map/15.4.4.19-8-c-ii-16.js | 13 +-- .../prototype/map/15.4.4.19-8-c-ii-17.js | 13 +-- .../prototype/map/15.4.4.19-8-c-ii-18.js | 13 +-- .../prototype/map/15.4.4.19-8-c-ii-19.js | 26 +++--- .../Array/prototype/map/15.4.4.19-8-c-ii-2.js | 21 ++--- .../prototype/map/15.4.4.19-8-c-ii-20.js | 18 ++-- .../prototype/map/15.4.4.19-8-c-ii-21.js | 26 +++--- .../prototype/map/15.4.4.19-8-c-ii-22.js | 26 +++--- .../prototype/map/15.4.4.19-8-c-ii-23.js | 13 +-- .../Array/prototype/map/15.4.4.19-8-c-ii-4.js | 27 +++--- .../Array/prototype/map/15.4.4.19-8-c-ii-5.js | 32 +++---- .../Array/prototype/map/15.4.4.19-8-c-ii-6.js | 21 +++-- .../Array/prototype/map/15.4.4.19-8-c-ii-7.js | 27 +++--- .../Array/prototype/map/15.4.4.19-8-c-ii-8.js | 20 +++-- .../Array/prototype/map/15.4.4.19-8-c-ii-9.js | 8 +- .../prototype/map/15.4.4.19-8-c-iii-1.js | 16 ++-- .../prototype/map/15.4.4.19-8-c-iii-2.js | 14 ++-- .../prototype/map/15.4.4.19-8-c-iii-3.js | 18 ++-- .../prototype/map/15.4.4.19-8-c-iii-4.js | 31 +++---- .../prototype/map/15.4.4.19-8-c-iii-5.js | 18 ++-- .../Array/prototype/map/15.4.4.19-9-1.js | 12 +-- .../Array/prototype/map/15.4.4.19-9-10.js | 28 +++---- .../Array/prototype/map/15.4.4.19-9-11.js | 32 +++---- .../Array/prototype/map/15.4.4.19-9-12.js | 38 ++++----- .../Array/prototype/map/15.4.4.19-9-13.js | 14 ++-- .../Array/prototype/map/15.4.4.19-9-2.js | 12 +-- .../Array/prototype/map/15.4.4.19-9-3.js | 13 +-- .../Array/prototype/map/15.4.4.19-9-4.js | 19 +++-- .../Array/prototype/map/15.4.4.19-9-5.js | 14 ++-- .../Array/prototype/map/15.4.4.19-9-6.js | 16 ++-- .../Array/prototype/map/15.4.4.19-9-7.js | 20 ++--- .../Array/prototype/map/15.4.4.19-9-8.js | 20 ++--- .../Array/prototype/map/15.4.4.19-9-9.js | 20 ++--- .../prototype/map/create-ctor-non-object.js | 4 +- .../prototype/map/create-ctor-poisoned.js | 4 +- .../map/create-non-array-invalid-len.js | 4 +- .../Array/prototype/map/create-non-array.js | 4 +- .../prototype/map/create-revoked-proxy.js | 4 +- .../prototype/map/create-species-abrupt.js | 4 +- .../prototype/map/create-species-non-ctor.js | 4 +- .../prototype/map/create-species-poisoned.js | 4 +- .../map/create-species-undef-invalid-len.js | 4 +- .../Array/prototype/pop/S15.4.4.6_A1.1_T1.js | 2 +- .../Array/prototype/pop/S15.4.4.6_A1.2_T1.js | 2 +- .../Array/prototype/pop/S15.4.4.6_A2_T1.js | 18 ++-- .../Array/prototype/pop/S15.4.4.6_A2_T2.js | 2 +- .../Array/prototype/pop/S15.4.4.6_A2_T4.js | 68 +++++++++++++-- .../Array/prototype/pop/S15.4.4.6_A3_T1.js | 4 +- .../Array/prototype/pop/S15.4.4.6_A3_T2.js | 4 +- .../Array/prototype/pop/S15.4.4.6_A3_T3.js | 2 +- .../Array/prototype/pop/S15.4.4.6_A4_T1.js | 4 +- .../Array/prototype/pop/S15.4.4.6_A4_T2.js | 7 +- .../prototype/pop/clamps-to-integer-limit.js | 14 ++-- .../pop/length-near-integer-limit.js | 14 ++-- .../Array/prototype/push/S15.4.4.7_A2_T1.js | 26 +++--- .../Array/prototype/push/S15.4.4.7_A2_T2.js | 4 +- .../Array/prototype/push/S15.4.4.7_A2_T3.js | 68 +++++++++++++-- .../Array/prototype/push/S15.4.4.7_A3.js | 6 +- .../Array/prototype/push/S15.4.4.7_A4_T1.js | 12 +-- .../Array/prototype/push/S15.4.4.7_A4_T2.js | 6 +- .../Array/prototype/push/S15.4.4.7_A4_T3.js | 12 +-- .../Array/prototype/push/S15.4.4.7_A5_T1.js | 4 +- .../prototype/push/clamps-to-integer-limit.js | 14 ++-- .../push/length-near-integer-limit.js | 12 +-- .../push/throws-if-integer-limit-exceeded.js | 6 +- .../Array/prototype/reduce/15.4.4.21-1-1.js | 2 +- .../Array/prototype/reduce/15.4.4.21-1-10.js | 10 +-- .../Array/prototype/reduce/15.4.4.21-1-11.js | 12 +-- .../Array/prototype/reduce/15.4.4.21-1-12.js | 12 +-- .../Array/prototype/reduce/15.4.4.21-1-13.js | 10 +-- .../Array/prototype/reduce/15.4.4.21-1-14.js | 12 +-- .../Array/prototype/reduce/15.4.4.21-1-15.js | 12 +-- .../Array/prototype/reduce/15.4.4.21-1-2.js | 2 +- .../Array/prototype/reduce/15.4.4.21-1-3.js | 10 +-- .../Array/prototype/reduce/15.4.4.21-1-4.js | 14 ++-- .../Array/prototype/reduce/15.4.4.21-1-5.js | 10 +-- .../Array/prototype/reduce/15.4.4.21-1-6.js | 14 ++-- .../Array/prototype/reduce/15.4.4.21-1-7.js | 6 +- .../Array/prototype/reduce/15.4.4.21-1-8.js | 8 +- .../Array/prototype/reduce/15.4.4.21-1-9.js | 16 ++-- .../Array/prototype/reduce/15.4.4.21-10-1.js | 12 +-- .../Array/prototype/reduce/15.4.4.21-10-2.js | 10 +-- .../Array/prototype/reduce/15.4.4.21-10-3.js | 9 +- .../Array/prototype/reduce/15.4.4.21-10-4.js | 11 ++- .../Array/prototype/reduce/15.4.4.21-10-5.js | 12 +-- .../Array/prototype/reduce/15.4.4.21-10-6.js | 13 +-- .../Array/prototype/reduce/15.4.4.21-10-7.js | 13 +-- .../Array/prototype/reduce/15.4.4.21-10-8.js | 21 ++--- .../Array/prototype/reduce/15.4.4.21-2-1.js | 18 ++-- .../Array/prototype/reduce/15.4.4.21-2-10.js | 32 +++---- .../Array/prototype/reduce/15.4.4.21-2-11.js | 25 +++--- .../Array/prototype/reduce/15.4.4.21-2-12.js | 34 ++++---- .../Array/prototype/reduce/15.4.4.21-2-13.js | 28 +++---- .../Array/prototype/reduce/15.4.4.21-2-14.js | 13 +-- .../Array/prototype/reduce/15.4.4.21-2-17.js | 14 ++-- .../Array/prototype/reduce/15.4.4.21-2-18.js | 8 +- .../Array/prototype/reduce/15.4.4.21-2-19.js | 18 ++-- .../Array/prototype/reduce/15.4.4.21-2-2.js | 6 +- .../Array/prototype/reduce/15.4.4.21-2-3.js | 24 +++--- .../Array/prototype/reduce/15.4.4.21-2-4.js | 12 +-- .../Array/prototype/reduce/15.4.4.21-2-5.js | 40 ++++----- .../Array/prototype/reduce/15.4.4.21-2-6.js | 22 ++--- .../Array/prototype/reduce/15.4.4.21-2-7.js | 26 +++--- .../Array/prototype/reduce/15.4.4.21-2-8.js | 34 ++++---- .../Array/prototype/reduce/15.4.4.21-2-9.js | 44 +++++----- .../Array/prototype/reduce/15.4.4.21-3-1.js | 16 ++-- .../Array/prototype/reduce/15.4.4.21-3-10.js | 15 ++-- .../Array/prototype/reduce/15.4.4.21-3-11.js | 12 ++- .../Array/prototype/reduce/15.4.4.21-3-12.js | 12 ++- .../Array/prototype/reduce/15.4.4.21-3-13.js | 12 ++- .../Array/prototype/reduce/15.4.4.21-3-14.js | 15 ++-- .../Array/prototype/reduce/15.4.4.21-3-15.js | 12 ++- .../Array/prototype/reduce/15.4.4.21-3-16.js | 12 ++- .../Array/prototype/reduce/15.4.4.21-3-17.js | 12 ++- .../Array/prototype/reduce/15.4.4.21-3-18.js | 16 ++-- .../Array/prototype/reduce/15.4.4.21-3-19.js | 24 +++--- .../Array/prototype/reduce/15.4.4.21-3-2.js | 12 ++- .../Array/prototype/reduce/15.4.4.21-3-20.js | 24 +++--- .../Array/prototype/reduce/15.4.4.21-3-21.js | 38 ++++----- .../Array/prototype/reduce/15.4.4.21-3-22.js | 44 +++++----- .../Array/prototype/reduce/15.4.4.21-3-23.js | 46 +++++----- .../Array/prototype/reduce/15.4.4.21-3-24.js | 16 ++-- .../Array/prototype/reduce/15.4.4.21-3-25.js | 16 ++-- .../Array/prototype/reduce/15.4.4.21-3-3.js | 16 ++-- .../Array/prototype/reduce/15.4.4.21-3-4.js | 15 ++-- .../Array/prototype/reduce/15.4.4.21-3-5.js | 15 ++-- .../Array/prototype/reduce/15.4.4.21-3-6.js | 12 ++- .../Array/prototype/reduce/15.4.4.21-3-7.js | 12 ++- .../Array/prototype/reduce/15.4.4.21-3-9.js | 13 +-- .../Array/prototype/reduce/15.4.4.21-4-1.js | 4 +- .../Array/prototype/reduce/15.4.4.21-4-10.js | 19 +++-- .../Array/prototype/reduce/15.4.4.21-4-11.js | 27 +++--- .../Array/prototype/reduce/15.4.4.21-4-12.js | 11 +-- .../Array/prototype/reduce/15.4.4.21-4-15.js | 38 +++++---- .../Array/prototype/reduce/15.4.4.21-4-2.js | 4 +- .../Array/prototype/reduce/15.4.4.21-4-3.js | 4 +- .../Array/prototype/reduce/15.4.4.21-4-4.js | 4 +- .../Array/prototype/reduce/15.4.4.21-4-5.js | 4 +- .../Array/prototype/reduce/15.4.4.21-4-6.js | 4 +- .../Array/prototype/reduce/15.4.4.21-4-7.js | 4 +- .../Array/prototype/reduce/15.4.4.21-4-8.js | 23 ++--- .../Array/prototype/reduce/15.4.4.21-4-9.js | 31 +++---- .../Array/prototype/reduce/15.4.4.21-5-1.js | 4 +- .../Array/prototype/reduce/15.4.4.21-5-10.js | 29 ++++--- .../Array/prototype/reduce/15.4.4.21-5-11.js | 37 ++++---- .../Array/prototype/reduce/15.4.4.21-5-12.js | 25 +++--- .../Array/prototype/reduce/15.4.4.21-5-13.js | 33 ++++---- .../Array/prototype/reduce/15.4.4.21-5-2.js | 13 +-- .../Array/prototype/reduce/15.4.4.21-5-3.js | 13 +-- .../Array/prototype/reduce/15.4.4.21-5-4.js | 13 +-- .../Array/prototype/reduce/15.4.4.21-5-5.js | 13 +-- .../Array/prototype/reduce/15.4.4.21-5-6.js | 19 +++-- .../Array/prototype/reduce/15.4.4.21-5-7.js | 29 ++++--- .../Array/prototype/reduce/15.4.4.21-5-8.js | 39 ++++----- .../Array/prototype/reduce/15.4.4.21-5-9.js | 9 +- .../Array/prototype/reduce/15.4.4.21-7-1.js | 4 +- .../Array/prototype/reduce/15.4.4.21-7-10.js | 4 +- .../Array/prototype/reduce/15.4.4.21-7-11.js | 4 +- .../Array/prototype/reduce/15.4.4.21-7-2.js | 13 +-- .../Array/prototype/reduce/15.4.4.21-7-3.js | 13 +-- .../Array/prototype/reduce/15.4.4.21-7-4.js | 13 +-- .../Array/prototype/reduce/15.4.4.21-7-5.js | 13 +-- .../Array/prototype/reduce/15.4.4.21-7-6.js | 19 +++-- .../Array/prototype/reduce/15.4.4.21-7-7.js | 29 ++++--- .../Array/prototype/reduce/15.4.4.21-7-8.js | 39 ++++----- .../Array/prototype/reduce/15.4.4.21-7-9.js | 39 ++++----- .../Array/prototype/reduce/15.4.4.21-8-b-1.js | 22 ++--- .../Array/prototype/reduce/15.4.4.21-8-b-2.js | 26 +++--- .../Array/prototype/reduce/15.4.4.21-8-b-3.js | 52 ++++++------ .../prototype/reduce/15.4.4.21-8-b-ii-1.js | 18 ++-- .../prototype/reduce/15.4.4.21-8-b-ii-2.js | 21 +++-- .../prototype/reduce/15.4.4.21-8-b-iii-1-1.js | 22 +++-- .../reduce/15.4.4.21-8-b-iii-1-10.js | 28 +++---- .../reduce/15.4.4.21-8-b-iii-1-11.js | 41 +++++---- .../reduce/15.4.4.21-8-b-iii-1-12.js | 30 +++---- .../reduce/15.4.4.21-8-b-iii-1-13.js | 51 +++++------ .../reduce/15.4.4.21-8-b-iii-1-14.js | 41 ++++----- .../reduce/15.4.4.21-8-b-iii-1-15.js | 40 +++++---- .../reduce/15.4.4.21-8-b-iii-1-16.js | 29 +++---- .../reduce/15.4.4.21-8-b-iii-1-17.js | 29 ++++--- .../reduce/15.4.4.21-8-b-iii-1-18.js | 25 +++--- .../reduce/15.4.4.21-8-b-iii-1-19.js | 31 ++++--- .../prototype/reduce/15.4.4.21-8-b-iii-1-2.js | 17 ++-- .../reduce/15.4.4.21-8-b-iii-1-20.js | 27 +++--- .../reduce/15.4.4.21-8-b-iii-1-21.js | 36 ++++---- .../reduce/15.4.4.21-8-b-iii-1-22.js | 25 +++--- .../reduce/15.4.4.21-8-b-iii-1-25.js | 21 ++--- .../reduce/15.4.4.21-8-b-iii-1-26.js | 23 ++--- .../reduce/15.4.4.21-8-b-iii-1-27.js | 25 +++--- .../reduce/15.4.4.21-8-b-iii-1-28.js | 17 ++-- .../reduce/15.4.4.21-8-b-iii-1-29.js | 29 +++---- .../prototype/reduce/15.4.4.21-8-b-iii-1-3.js | 34 ++++---- .../reduce/15.4.4.21-8-b-iii-1-30.js | 53 ++++++------ .../reduce/15.4.4.21-8-b-iii-1-31.js | 55 ++++++------ .../reduce/15.4.4.21-8-b-iii-1-32.js | 37 ++++---- .../reduce/15.4.4.21-8-b-iii-1-33.js | 33 ++++---- .../prototype/reduce/15.4.4.21-8-b-iii-1-4.js | 17 ++-- .../prototype/reduce/15.4.4.21-8-b-iii-1-5.js | 47 ++++++----- .../prototype/reduce/15.4.4.21-8-b-iii-1-6.js | 27 +++--- .../prototype/reduce/15.4.4.21-8-b-iii-1-7.js | 30 ++++--- .../prototype/reduce/15.4.4.21-8-b-iii-1-8.js | 21 ++--- .../prototype/reduce/15.4.4.21-8-b-iii-1-9.js | 33 ++++---- .../Array/prototype/reduce/15.4.4.21-8-c-1.js | 9 +- .../Array/prototype/reduce/15.4.4.21-8-c-2.js | 13 ++- .../Array/prototype/reduce/15.4.4.21-8-c-3.js | 19 ++--- .../Array/prototype/reduce/15.4.4.21-8-c-4.js | 14 ++-- .../Array/prototype/reduce/15.4.4.21-8-c-5.js | 20 ++--- .../Array/prototype/reduce/15.4.4.21-8-c-6.js | 28 +++---- .../Array/prototype/reduce/15.4.4.21-8-c-7.js | 16 ++-- .../Array/prototype/reduce/15.4.4.21-8-c-8.js | 24 +++--- .../Array/prototype/reduce/15.4.4.21-9-1.js | 12 +-- .../Array/prototype/reduce/15.4.4.21-9-10.js | 12 +-- .../Array/prototype/reduce/15.4.4.21-9-2.js | 14 ++-- .../Array/prototype/reduce/15.4.4.21-9-3.js | 14 ++-- .../Array/prototype/reduce/15.4.4.21-9-4.js | 12 +-- .../Array/prototype/reduce/15.4.4.21-9-5.js | 15 ++-- .../Array/prototype/reduce/15.4.4.21-9-6.js | 20 ++--- .../Array/prototype/reduce/15.4.4.21-9-7.js | 12 +-- .../Array/prototype/reduce/15.4.4.21-9-8.js | 31 +++---- .../Array/prototype/reduce/15.4.4.21-9-9.js | 29 +++---- .../Array/prototype/reduce/15.4.4.21-9-b-1.js | 9 +- .../prototype/reduce/15.4.4.21-9-b-10.js | 39 +++++---- .../prototype/reduce/15.4.4.21-9-b-11.js | 36 ++++---- .../prototype/reduce/15.4.4.21-9-b-12.js | 37 ++++---- .../prototype/reduce/15.4.4.21-9-b-13.js | 32 +++---- .../prototype/reduce/15.4.4.21-9-b-14.js | 34 ++++---- .../prototype/reduce/15.4.4.21-9-b-15.js | 42 +++++----- .../prototype/reduce/15.4.4.21-9-b-16.js | 42 +++++----- .../prototype/reduce/15.4.4.21-9-b-17.js | 42 +++++----- .../prototype/reduce/15.4.4.21-9-b-18.js | 40 ++++----- .../prototype/reduce/15.4.4.21-9-b-19.js | 42 +++++----- .../Array/prototype/reduce/15.4.4.21-9-b-2.js | 30 +++---- .../prototype/reduce/15.4.4.21-9-b-20.js | 40 ++++----- .../prototype/reduce/15.4.4.21-9-b-21.js | 49 ++++++----- .../prototype/reduce/15.4.4.21-9-b-22.js | 46 +++++----- .../prototype/reduce/15.4.4.21-9-b-23.js | 39 +++++---- .../prototype/reduce/15.4.4.21-9-b-24.js | 36 ++++---- .../prototype/reduce/15.4.4.21-9-b-25.js | 37 ++++---- .../prototype/reduce/15.4.4.21-9-b-26.js | 32 +++---- .../prototype/reduce/15.4.4.21-9-b-27.js | 34 ++++---- .../prototype/reduce/15.4.4.21-9-b-28.js | 42 +++++----- .../prototype/reduce/15.4.4.21-9-b-29.js | 42 +++++----- .../Array/prototype/reduce/15.4.4.21-9-b-3.js | 37 ++++---- .../Array/prototype/reduce/15.4.4.21-9-b-4.js | 42 +++++----- .../Array/prototype/reduce/15.4.4.21-9-b-5.js | 40 ++++----- .../Array/prototype/reduce/15.4.4.21-9-b-6.js | 42 +++++----- .../Array/prototype/reduce/15.4.4.21-9-b-7.js | 40 ++++----- .../Array/prototype/reduce/15.4.4.21-9-b-8.js | 49 ++++++----- .../Array/prototype/reduce/15.4.4.21-9-b-9.js | 34 ++++---- .../Array/prototype/reduce/15.4.4.21-9-c-1.js | 17 ++-- .../prototype/reduce/15.4.4.21-9-c-i-1.js | 24 ++++-- .../prototype/reduce/15.4.4.21-9-c-i-10.js | 31 +++---- .../prototype/reduce/15.4.4.21-9-c-i-11.js | 43 +++++----- .../prototype/reduce/15.4.4.21-9-c-i-12.js | 33 ++++---- .../prototype/reduce/15.4.4.21-9-c-i-13.js | 54 ++++++------ .../prototype/reduce/15.4.4.21-9-c-i-14.js | 43 +++++----- .../prototype/reduce/15.4.4.21-9-c-i-15.js | 42 +++++----- .../prototype/reduce/15.4.4.21-9-c-i-16.js | 31 +++---- .../prototype/reduce/15.4.4.21-9-c-i-17.js | 31 ++++--- .../prototype/reduce/15.4.4.21-9-c-i-18.js | 27 +++--- .../prototype/reduce/15.4.4.21-9-c-i-19.js | 43 +++++----- .../prototype/reduce/15.4.4.21-9-c-i-2.js | 19 +++-- .../prototype/reduce/15.4.4.21-9-c-i-20.js | 39 ++++----- .../prototype/reduce/15.4.4.21-9-c-i-21.js | 38 +++++---- .../prototype/reduce/15.4.4.21-9-c-i-22.js | 27 +++--- .../prototype/reduce/15.4.4.21-9-c-i-25.js | 23 ++--- .../prototype/reduce/15.4.4.21-9-c-i-26.js | 23 ++--- .../prototype/reduce/15.4.4.21-9-c-i-27.js | 23 ++--- .../prototype/reduce/15.4.4.21-9-c-i-28.js | 19 +++-- .../prototype/reduce/15.4.4.21-9-c-i-29.js | 31 +++---- .../prototype/reduce/15.4.4.21-9-c-i-3.js | 36 ++++---- .../prototype/reduce/15.4.4.21-9-c-i-30.js | 55 ++++++------ .../prototype/reduce/15.4.4.21-9-c-i-31.js | 58 +++++++------ .../prototype/reduce/15.4.4.21-9-c-i-32.js | 39 +++++---- .../prototype/reduce/15.4.4.21-9-c-i-33.js | 35 ++++---- .../prototype/reduce/15.4.4.21-9-c-i-4.js | 19 +++-- .../prototype/reduce/15.4.4.21-9-c-i-5.js | 49 +++++------ .../prototype/reduce/15.4.4.21-9-c-i-6.js | 29 +++---- .../prototype/reduce/15.4.4.21-9-c-i-7.js | 32 ++++--- .../prototype/reduce/15.4.4.21-9-c-i-8.js | 23 ++--- .../prototype/reduce/15.4.4.21-9-c-i-9.js | 35 ++++---- .../prototype/reduce/15.4.4.21-9-c-ii-1.js | 16 ++-- .../prototype/reduce/15.4.4.21-9-c-ii-10.js | 11 +-- .../prototype/reduce/15.4.4.21-9-c-ii-11.js | 11 +-- .../prototype/reduce/15.4.4.21-9-c-ii-12.js | 11 +-- .../prototype/reduce/15.4.4.21-9-c-ii-13.js | 11 +-- .../prototype/reduce/15.4.4.21-9-c-ii-14.js | 11 +-- .../prototype/reduce/15.4.4.21-9-c-ii-16.js | 33 ++++---- .../prototype/reduce/15.4.4.21-9-c-ii-17.js | 25 +++--- .../prototype/reduce/15.4.4.21-9-c-ii-18.js | 21 +++-- .../prototype/reduce/15.4.4.21-9-c-ii-19.js | 19 +++-- .../prototype/reduce/15.4.4.21-9-c-ii-2.js | 27 +++--- .../prototype/reduce/15.4.4.21-9-c-ii-20.js | 16 ++-- .../prototype/reduce/15.4.4.21-9-c-ii-21.js | 16 ++-- .../prototype/reduce/15.4.4.21-9-c-ii-22.js | 16 ++-- .../prototype/reduce/15.4.4.21-9-c-ii-23.js | 16 ++-- .../prototype/reduce/15.4.4.21-9-c-ii-24.js | 16 ++-- .../prototype/reduce/15.4.4.21-9-c-ii-25.js | 18 ++-- .../prototype/reduce/15.4.4.21-9-c-ii-26.js | 18 ++-- .../prototype/reduce/15.4.4.21-9-c-ii-27.js | 18 ++-- .../prototype/reduce/15.4.4.21-9-c-ii-28.js | 18 ++-- .../prototype/reduce/15.4.4.21-9-c-ii-29.js | 18 ++-- .../prototype/reduce/15.4.4.21-9-c-ii-3.js | 23 ++--- .../prototype/reduce/15.4.4.21-9-c-ii-30.js | 16 ++-- .../prototype/reduce/15.4.4.21-9-c-ii-31.js | 18 ++-- .../prototype/reduce/15.4.4.21-9-c-ii-32.js | 18 ++-- .../prototype/reduce/15.4.4.21-9-c-ii-33.js | 16 ++-- .../prototype/reduce/15.4.4.21-9-c-ii-34.js | 18 ++-- .../prototype/reduce/15.4.4.21-9-c-ii-35.js | 23 ++--- .../prototype/reduce/15.4.4.21-9-c-ii-37.js | 16 ++-- .../prototype/reduce/15.4.4.21-9-c-ii-4-s.js | 17 ++-- .../prototype/reduce/15.4.4.21-9-c-ii-4.js | 26 +++--- .../prototype/reduce/15.4.4.21-9-c-ii-5.js | 36 ++++---- .../prototype/reduce/15.4.4.21-9-c-ii-7.js | 27 +++--- .../prototype/reduce/15.4.4.21-9-c-ii-8.js | 27 +++--- .../prototype/reduce/15.4.4.21-9-c-ii-9.js | 11 +-- .../prototype/reduceRight/15.4.4.22-1-1.js | 2 +- .../prototype/reduceRight/15.4.4.22-1-10.js | 14 ++-- .../prototype/reduceRight/15.4.4.22-1-11.js | 16 ++-- .../prototype/reduceRight/15.4.4.22-1-12.js | 16 ++-- .../prototype/reduceRight/15.4.4.22-1-13.js | 14 ++-- .../prototype/reduceRight/15.4.4.22-1-14.js | 16 ++-- .../prototype/reduceRight/15.4.4.22-1-15.js | 16 ++-- .../prototype/reduceRight/15.4.4.22-1-2.js | 2 +- .../prototype/reduceRight/15.4.4.22-1-3.js | 14 ++-- .../prototype/reduceRight/15.4.4.22-1-4.js | 18 ++-- .../prototype/reduceRight/15.4.4.22-1-5.js | 14 ++-- .../prototype/reduceRight/15.4.4.22-1-6.js | 18 ++-- .../prototype/reduceRight/15.4.4.22-1-7.js | 10 +-- .../prototype/reduceRight/15.4.4.22-1-8.js | 12 +-- .../prototype/reduceRight/15.4.4.22-1-9.js | 20 ++--- .../prototype/reduceRight/15.4.4.22-10-1.js | 12 +-- .../prototype/reduceRight/15.4.4.22-10-2.js | 10 +-- .../prototype/reduceRight/15.4.4.22-10-3.js | 9 +- .../prototype/reduceRight/15.4.4.22-10-4.js | 11 ++- .../prototype/reduceRight/15.4.4.22-10-5.js | 12 +-- .../prototype/reduceRight/15.4.4.22-10-6.js | 13 +-- .../prototype/reduceRight/15.4.4.22-10-7.js | 13 +-- .../prototype/reduceRight/15.4.4.22-10-8.js | 19 +++-- .../prototype/reduceRight/15.4.4.22-2-1.js | 22 ++--- .../prototype/reduceRight/15.4.4.22-2-10.js | 36 ++++---- .../prototype/reduceRight/15.4.4.22-2-11.js | 26 +++--- .../prototype/reduceRight/15.4.4.22-2-12.js | 35 ++++---- .../prototype/reduceRight/15.4.4.22-2-13.js | 30 +++---- .../prototype/reduceRight/15.4.4.22-2-14.js | 15 ++-- .../prototype/reduceRight/15.4.4.22-2-17.js | 20 ++--- .../prototype/reduceRight/15.4.4.22-2-18.js | 14 ++-- .../prototype/reduceRight/15.4.4.22-2-19.js | 22 ++--- .../prototype/reduceRight/15.4.4.22-2-2.js | 10 +-- .../prototype/reduceRight/15.4.4.22-2-3.js | 28 ++++--- .../prototype/reduceRight/15.4.4.22-2-4.js | 17 ++-- .../prototype/reduceRight/15.4.4.22-2-5.js | 44 +++++----- .../prototype/reduceRight/15.4.4.22-2-6.js | 26 +++--- .../prototype/reduceRight/15.4.4.22-2-7.js | 30 +++---- .../prototype/reduceRight/15.4.4.22-2-8.js | 38 +++++---- .../prototype/reduceRight/15.4.4.22-2-9.js | 48 +++++------ .../prototype/reduceRight/15.4.4.22-3-1.js | 13 +-- .../prototype/reduceRight/15.4.4.22-3-10.js | 13 +-- .../prototype/reduceRight/15.4.4.22-3-11.js | 32 ++++--- .../prototype/reduceRight/15.4.4.22-3-12.js | 32 ++++--- .../prototype/reduceRight/15.4.4.22-3-13.js | 32 ++++--- .../prototype/reduceRight/15.4.4.22-3-14.js | 13 +-- .../prototype/reduceRight/15.4.4.22-3-15.js | 32 ++++--- .../prototype/reduceRight/15.4.4.22-3-16.js | 32 ++++--- .../prototype/reduceRight/15.4.4.22-3-17.js | 32 ++++--- .../prototype/reduceRight/15.4.4.22-3-18.js | 14 ++-- .../prototype/reduceRight/15.4.4.22-3-19.js | 59 ++++++------- .../prototype/reduceRight/15.4.4.22-3-2.js | 13 +-- .../prototype/reduceRight/15.4.4.22-3-20.js | 49 +++++------ .../prototype/reduceRight/15.4.4.22-3-21.js | 59 ++++++------- .../prototype/reduceRight/15.4.4.22-3-22.js | 42 +++++----- .../prototype/reduceRight/15.4.4.22-3-23.js | 66 +++++++-------- .../prototype/reduceRight/15.4.4.22-3-24.js | 32 ++++--- .../prototype/reduceRight/15.4.4.22-3-25.js | 37 ++++---- .../prototype/reduceRight/15.4.4.22-3-3.js | 13 +-- .../prototype/reduceRight/15.4.4.22-3-4.js | 13 +-- .../prototype/reduceRight/15.4.4.22-3-5.js | 13 +-- .../prototype/reduceRight/15.4.4.22-3-6.js | 31 ++++--- .../prototype/reduceRight/15.4.4.22-3-7.js | 31 ++++--- .../prototype/reduceRight/15.4.4.22-3-9.js | 13 +-- .../prototype/reduceRight/15.4.4.22-4-1.js | 4 +- .../prototype/reduceRight/15.4.4.22-4-10.js | 19 +++-- .../prototype/reduceRight/15.4.4.22-4-11.js | 27 +++--- .../prototype/reduceRight/15.4.4.22-4-12.js | 11 +-- .../prototype/reduceRight/15.4.4.22-4-15.js | 38 +++++---- .../prototype/reduceRight/15.4.4.22-4-2.js | 4 +- .../prototype/reduceRight/15.4.4.22-4-3.js | 4 +- .../prototype/reduceRight/15.4.4.22-4-4.js | 4 +- .../prototype/reduceRight/15.4.4.22-4-5.js | 4 +- .../prototype/reduceRight/15.4.4.22-4-6.js | 4 +- .../prototype/reduceRight/15.4.4.22-4-7.js | 4 +- .../prototype/reduceRight/15.4.4.22-4-8.js | 23 ++--- .../prototype/reduceRight/15.4.4.22-4-9.js | 31 +++---- .../prototype/reduceRight/15.4.4.22-5-1.js | 4 +- .../prototype/reduceRight/15.4.4.22-5-10.js | 23 ++--- .../prototype/reduceRight/15.4.4.22-5-11.js | 31 +++---- .../prototype/reduceRight/15.4.4.22-5-12.js | 19 +++-- .../prototype/reduceRight/15.4.4.22-5-13.js | 27 +++--- .../prototype/reduceRight/15.4.4.22-5-2.js | 13 +-- .../prototype/reduceRight/15.4.4.22-5-3.js | 13 +-- .../prototype/reduceRight/15.4.4.22-5-4.js | 13 +-- .../prototype/reduceRight/15.4.4.22-5-5.js | 13 +-- .../prototype/reduceRight/15.4.4.22-5-6.js | 19 +++-- .../prototype/reduceRight/15.4.4.22-5-7.js | 29 ++++--- .../prototype/reduceRight/15.4.4.22-5-8.js | 39 ++++----- .../prototype/reduceRight/15.4.4.22-5-9.js | 4 +- .../prototype/reduceRight/15.4.4.22-7-1.js | 4 +- .../prototype/reduceRight/15.4.4.22-7-10.js | 4 +- .../prototype/reduceRight/15.4.4.22-7-11.js | 4 +- .../prototype/reduceRight/15.4.4.22-7-2.js | 13 +-- .../prototype/reduceRight/15.4.4.22-7-3.js | 13 +-- .../prototype/reduceRight/15.4.4.22-7-4.js | 13 +-- .../prototype/reduceRight/15.4.4.22-7-5.js | 13 +-- .../prototype/reduceRight/15.4.4.22-7-6.js | 19 +++-- .../prototype/reduceRight/15.4.4.22-7-7.js | 29 ++++--- .../prototype/reduceRight/15.4.4.22-7-8.js | 39 ++++----- .../prototype/reduceRight/15.4.4.22-7-9.js | 39 ++++----- .../prototype/reduceRight/15.4.4.22-8-b-1.js | 22 ++--- .../prototype/reduceRight/15.4.4.22-8-b-2.js | 29 +++---- .../prototype/reduceRight/15.4.4.22-8-b-3.js | 52 ++++++------ .../reduceRight/15.4.4.22-8-b-ii-1.js | 18 ++-- .../reduceRight/15.4.4.22-8-b-ii-2.js | 21 +++-- .../reduceRight/15.4.4.22-8-b-iii-1-1.js | 21 +++-- .../reduceRight/15.4.4.22-8-b-iii-1-10.js | 29 +++---- .../reduceRight/15.4.4.22-8-b-iii-1-11.js | 41 +++++---- .../reduceRight/15.4.4.22-8-b-iii-1-12.js | 31 +++---- .../reduceRight/15.4.4.22-8-b-iii-1-13.js | 52 ++++++------ .../reduceRight/15.4.4.22-8-b-iii-1-14.js | 41 ++++----- .../reduceRight/15.4.4.22-8-b-iii-1-15.js | 40 +++++---- .../reduceRight/15.4.4.22-8-b-iii-1-16.js | 29 +++---- .../reduceRight/15.4.4.22-8-b-iii-1-17.js | 29 ++++--- .../reduceRight/15.4.4.22-8-b-iii-1-18.js | 25 +++--- .../reduceRight/15.4.4.22-8-b-iii-1-19.js | 31 ++++--- .../reduceRight/15.4.4.22-8-b-iii-1-2.js | 17 ++-- .../reduceRight/15.4.4.22-8-b-iii-1-20.js | 27 +++--- .../reduceRight/15.4.4.22-8-b-iii-1-21.js | 36 ++++---- .../reduceRight/15.4.4.22-8-b-iii-1-22.js | 25 +++--- .../reduceRight/15.4.4.22-8-b-iii-1-25.js | 21 ++--- .../reduceRight/15.4.4.22-8-b-iii-1-26.js | 21 ++--- .../reduceRight/15.4.4.22-8-b-iii-1-27.js | 21 ++--- .../reduceRight/15.4.4.22-8-b-iii-1-28.js | 17 ++-- .../reduceRight/15.4.4.22-8-b-iii-1-29.js | 27 +++--- .../reduceRight/15.4.4.22-8-b-iii-1-3.js | 34 ++++---- .../reduceRight/15.4.4.22-8-b-iii-1-30.js | 53 ++++++------ .../reduceRight/15.4.4.22-8-b-iii-1-31.js | 56 +++++++------ .../reduceRight/15.4.4.22-8-b-iii-1-32.js | 33 ++++---- .../reduceRight/15.4.4.22-8-b-iii-1-33.js | 29 +++---- .../reduceRight/15.4.4.22-8-b-iii-1-4.js | 17 ++-- .../reduceRight/15.4.4.22-8-b-iii-1-5.js | 49 +++++------ .../reduceRight/15.4.4.22-8-b-iii-1-6.js | 27 +++--- .../reduceRight/15.4.4.22-8-b-iii-1-7.js | 28 ++++--- .../reduceRight/15.4.4.22-8-b-iii-1-8.js | 21 ++--- .../reduceRight/15.4.4.22-8-b-iii-1-9.js | 33 ++++---- .../prototype/reduceRight/15.4.4.22-8-c-1.js | 9 +- .../prototype/reduceRight/15.4.4.22-8-c-2.js | 13 ++- .../prototype/reduceRight/15.4.4.22-8-c-3.js | 19 ++--- .../prototype/reduceRight/15.4.4.22-8-c-4.js | 14 ++-- .../prototype/reduceRight/15.4.4.22-8-c-5.js | 20 ++--- .../prototype/reduceRight/15.4.4.22-8-c-6.js | 28 +++---- .../prototype/reduceRight/15.4.4.22-8-c-7.js | 16 ++-- .../prototype/reduceRight/15.4.4.22-8-c-8.js | 24 +++--- .../prototype/reduceRight/15.4.4.22-9-1.js | 12 +-- .../prototype/reduceRight/15.4.4.22-9-2.js | 14 ++-- .../prototype/reduceRight/15.4.4.22-9-3.js | 14 ++-- .../prototype/reduceRight/15.4.4.22-9-4.js | 12 +-- .../prototype/reduceRight/15.4.4.22-9-5.js | 15 ++-- .../prototype/reduceRight/15.4.4.22-9-6.js | 20 ++--- .../prototype/reduceRight/15.4.4.22-9-7.js | 12 +-- .../prototype/reduceRight/15.4.4.22-9-8.js | 29 ++++--- .../prototype/reduceRight/15.4.4.22-9-9.js | 25 +++--- .../prototype/reduceRight/15.4.4.22-9-b-1.js | 9 +- .../prototype/reduceRight/15.4.4.22-9-b-10.js | 39 +++++---- .../prototype/reduceRight/15.4.4.22-9-b-11.js | 36 ++++---- .../prototype/reduceRight/15.4.4.22-9-b-12.js | 36 ++++---- .../prototype/reduceRight/15.4.4.22-9-b-13.js | 32 +++---- .../prototype/reduceRight/15.4.4.22-9-b-14.js | 34 ++++---- .../prototype/reduceRight/15.4.4.22-9-b-15.js | 42 +++++----- .../prototype/reduceRight/15.4.4.22-9-b-16.js | 42 +++++----- .../prototype/reduceRight/15.4.4.22-9-b-17.js | 42 +++++----- .../prototype/reduceRight/15.4.4.22-9-b-18.js | 40 ++++----- .../prototype/reduceRight/15.4.4.22-9-b-19.js | 42 +++++----- .../prototype/reduceRight/15.4.4.22-9-b-2.js | 30 +++---- .../prototype/reduceRight/15.4.4.22-9-b-20.js | 40 ++++----- .../prototype/reduceRight/15.4.4.22-9-b-21.js | 49 ++++++----- .../prototype/reduceRight/15.4.4.22-9-b-22.js | 46 +++++----- .../prototype/reduceRight/15.4.4.22-9-b-23.js | 39 +++++---- .../prototype/reduceRight/15.4.4.22-9-b-24.js | 36 ++++---- .../prototype/reduceRight/15.4.4.22-9-b-25.js | 37 ++++---- .../prototype/reduceRight/15.4.4.22-9-b-26.js | 32 +++---- .../prototype/reduceRight/15.4.4.22-9-b-27.js | 34 ++++---- .../prototype/reduceRight/15.4.4.22-9-b-28.js | 42 +++++----- .../prototype/reduceRight/15.4.4.22-9-b-29.js | 42 +++++----- .../prototype/reduceRight/15.4.4.22-9-b-3.js | 37 ++++---- .../prototype/reduceRight/15.4.4.22-9-b-4.js | 42 +++++----- .../prototype/reduceRight/15.4.4.22-9-b-5.js | 40 ++++----- .../prototype/reduceRight/15.4.4.22-9-b-6.js | 42 +++++----- .../prototype/reduceRight/15.4.4.22-9-b-7.js | 40 ++++----- .../prototype/reduceRight/15.4.4.22-9-b-8.js | 49 ++++++----- .../prototype/reduceRight/15.4.4.22-9-b-9.js | 46 +++++----- .../prototype/reduceRight/15.4.4.22-9-c-1.js | 17 ++-- .../reduceRight/15.4.4.22-9-c-i-1.js | 22 +++-- .../reduceRight/15.4.4.22-9-c-i-10.js | 29 +++---- .../reduceRight/15.4.4.22-9-c-i-11.js | 41 +++++---- .../reduceRight/15.4.4.22-9-c-i-12.js | 31 +++---- .../reduceRight/15.4.4.22-9-c-i-13.js | 52 ++++++------ .../reduceRight/15.4.4.22-9-c-i-14.js | 41 ++++----- .../reduceRight/15.4.4.22-9-c-i-15.js | 40 +++++---- .../reduceRight/15.4.4.22-9-c-i-16.js | 29 +++---- .../reduceRight/15.4.4.22-9-c-i-17.js | 29 ++++--- .../reduceRight/15.4.4.22-9-c-i-18.js | 25 +++--- .../reduceRight/15.4.4.22-9-c-i-19.js | 31 ++++--- .../reduceRight/15.4.4.22-9-c-i-2.js | 17 ++-- .../reduceRight/15.4.4.22-9-c-i-20.js | 27 +++--- .../reduceRight/15.4.4.22-9-c-i-21.js | 36 ++++---- .../reduceRight/15.4.4.22-9-c-i-22.js | 25 +++--- .../reduceRight/15.4.4.22-9-c-i-25.js | 21 ++--- .../reduceRight/15.4.4.22-9-c-i-26.js | 21 ++--- .../reduceRight/15.4.4.22-9-c-i-27.js | 21 ++--- .../reduceRight/15.4.4.22-9-c-i-28.js | 17 ++-- .../reduceRight/15.4.4.22-9-c-i-29.js | 31 +++---- .../reduceRight/15.4.4.22-9-c-i-3.js | 34 ++++---- .../reduceRight/15.4.4.22-9-c-i-30.js | 53 ++++++------ .../reduceRight/15.4.4.22-9-c-i-31.js | 55 ++++++------ .../reduceRight/15.4.4.22-9-c-i-32.js | 33 ++++---- .../reduceRight/15.4.4.22-9-c-i-33.js | 29 +++---- .../reduceRight/15.4.4.22-9-c-i-4.js | 17 ++-- .../reduceRight/15.4.4.22-9-c-i-5.js | 47 ++++++----- .../reduceRight/15.4.4.22-9-c-i-6.js | 27 +++--- .../reduceRight/15.4.4.22-9-c-i-7.js | 29 ++++--- .../reduceRight/15.4.4.22-9-c-i-8.js | 21 ++--- .../reduceRight/15.4.4.22-9-c-i-9.js | 33 ++++---- .../reduceRight/15.4.4.22-9-c-ii-1.js | 16 ++-- .../reduceRight/15.4.4.22-9-c-ii-10.js | 10 +-- .../reduceRight/15.4.4.22-9-c-ii-11.js | 14 ++-- .../reduceRight/15.4.4.22-9-c-ii-12.js | 18 ++-- .../reduceRight/15.4.4.22-9-c-ii-13.js | 18 ++-- .../reduceRight/15.4.4.22-9-c-ii-14.js | 6 +- .../reduceRight/15.4.4.22-9-c-ii-16.js | 21 +++-- .../reduceRight/15.4.4.22-9-c-ii-17.js | 24 +++--- .../reduceRight/15.4.4.22-9-c-ii-18.js | 20 ++--- .../reduceRight/15.4.4.22-9-c-ii-19.js | 18 ++-- .../reduceRight/15.4.4.22-9-c-ii-2.js | 22 ++--- .../reduceRight/15.4.4.22-9-c-ii-20.js | 16 ++-- .../reduceRight/15.4.4.22-9-c-ii-21.js | 16 ++-- .../reduceRight/15.4.4.22-9-c-ii-22.js | 16 ++-- .../reduceRight/15.4.4.22-9-c-ii-23.js | 16 ++-- .../reduceRight/15.4.4.22-9-c-ii-24.js | 16 ++-- .../reduceRight/15.4.4.22-9-c-ii-25.js | 18 ++-- .../reduceRight/15.4.4.22-9-c-ii-26.js | 18 ++-- .../reduceRight/15.4.4.22-9-c-ii-27.js | 18 ++-- .../reduceRight/15.4.4.22-9-c-ii-28.js | 18 ++-- .../reduceRight/15.4.4.22-9-c-ii-29.js | 18 ++-- .../reduceRight/15.4.4.22-9-c-ii-3.js | 23 ++--- .../reduceRight/15.4.4.22-9-c-ii-30.js | 16 ++-- .../reduceRight/15.4.4.22-9-c-ii-31.js | 18 ++-- .../reduceRight/15.4.4.22-9-c-ii-32.js | 18 ++-- .../reduceRight/15.4.4.22-9-c-ii-33.js | 16 ++-- .../reduceRight/15.4.4.22-9-c-ii-34.js | 18 ++-- .../reduceRight/15.4.4.22-9-c-ii-35.js | 23 ++--- .../reduceRight/15.4.4.22-9-c-ii-37.js | 16 ++-- .../reduceRight/15.4.4.22-9-c-ii-4-s.js | 17 ++-- .../reduceRight/15.4.4.22-9-c-ii-4.js | 26 +++--- .../reduceRight/15.4.4.22-9-c-ii-5.js | 38 ++++----- .../reduceRight/15.4.4.22-9-c-ii-7.js | 27 +++--- .../reduceRight/15.4.4.22-9-c-ii-8.js | 23 +++-- .../reduceRight/15.4.4.22-9-c-ii-9.js | 10 +-- .../prototype/reverse/S15.4.4.8_A1_T1.js | 2 +- .../prototype/reverse/S15.4.4.8_A1_T2.js | 38 ++++----- .../prototype/reverse/S15.4.4.8_A2_T1.js | 38 ++++----- .../prototype/reverse/S15.4.4.8_A2_T2.js | 38 ++++----- .../prototype/reverse/S15.4.4.8_A2_T3.js | 38 ++++----- .../prototype/reverse/S15.4.4.8_A4_T1.js | 4 +- .../prototype/reverse/S15.4.4.8_A4_T2.js | 7 +- ...gth-exceeding-integer-limit-with-object.js | 10 +-- ...ngth-exceeding-integer-limit-with-proxy.js | 6 +- .../prototype/shift/S15.4.4.9_A1.1_T1.js | 2 +- .../prototype/shift/S15.4.4.9_A1.2_T1.js | 2 +- .../Array/prototype/shift/S15.4.4.9_A2_T1.js | 18 ++-- .../Array/prototype/shift/S15.4.4.9_A2_T2.js | 2 +- .../Array/prototype/shift/S15.4.4.9_A2_T5.js | 68 +++++++++++++-- .../Array/prototype/shift/S15.4.4.9_A3_T3.js | 4 +- .../Array/prototype/shift/S15.4.4.9_A4_T1.js | 4 +- .../Array/prototype/shift/S15.4.4.9_A4_T2.js | 7 +- .../prototype/slice/15.4.4.10-10-c-ii-1.js | 14 ++-- .../prototype/slice/S15.4.4.10_A1.1_T1.js | 4 +- .../prototype/slice/S15.4.4.10_A1.1_T2.js | 4 +- .../prototype/slice/S15.4.4.10_A1.1_T3.js | 4 +- .../prototype/slice/S15.4.4.10_A1.1_T4.js | 4 +- .../prototype/slice/S15.4.4.10_A1.1_T5.js | 4 +- .../prototype/slice/S15.4.4.10_A1.1_T6.js | 4 +- .../prototype/slice/S15.4.4.10_A1.1_T7.js | 4 +- .../prototype/slice/S15.4.4.10_A1.2_T1.js | 4 +- .../prototype/slice/S15.4.4.10_A1.2_T2.js | 4 +- .../prototype/slice/S15.4.4.10_A1.2_T3.js | 4 +- .../prototype/slice/S15.4.4.10_A1.2_T4.js | 4 +- .../prototype/slice/S15.4.4.10_A1.3_T1.js | 4 +- .../prototype/slice/S15.4.4.10_A1.3_T2.js | 4 +- .../prototype/slice/S15.4.4.10_A1.3_T3.js | 4 +- .../prototype/slice/S15.4.4.10_A1.3_T4.js | 4 +- .../prototype/slice/S15.4.4.10_A1.4_T1.js | 4 +- .../prototype/slice/S15.4.4.10_A1.4_T2.js | 4 +- .../prototype/slice/S15.4.4.10_A1.4_T3.js | 4 +- .../prototype/slice/S15.4.4.10_A1.4_T4.js | 4 +- .../prototype/slice/S15.4.4.10_A1.5_T1.js | 2 +- .../prototype/slice/S15.4.4.10_A1.5_T2.js | 2 +- .../prototype/slice/S15.4.4.10_A2.1_T1.js | 4 +- .../prototype/slice/S15.4.4.10_A2.1_T2.js | 4 +- .../prototype/slice/S15.4.4.10_A2.1_T3.js | 4 +- .../prototype/slice/S15.4.4.10_A2.1_T4.js | 4 +- .../prototype/slice/S15.4.4.10_A2.1_T5.js | 11 ++- .../prototype/slice/S15.4.4.10_A2.2_T1.js | 4 +- .../prototype/slice/S15.4.4.10_A2.2_T2.js | 4 +- .../prototype/slice/S15.4.4.10_A2.2_T3.js | 4 +- .../prototype/slice/S15.4.4.10_A2.2_T4.js | 4 +- .../prototype/slice/S15.4.4.10_A2.2_T5.js | 11 ++- .../Array/prototype/slice/S15.4.4.10_A2_T1.js | 2 +- .../Array/prototype/slice/S15.4.4.10_A2_T2.js | 2 +- .../Array/prototype/slice/S15.4.4.10_A2_T3.js | 2 +- .../Array/prototype/slice/S15.4.4.10_A2_T4.js | 2 +- .../Array/prototype/slice/S15.4.4.10_A3_T1.js | 4 +- .../Array/prototype/slice/S15.4.4.10_A3_T2.js | 4 +- .../Array/prototype/slice/S15.4.4.10_A3_T3.js | 4 +- .../Array/prototype/slice/create-non-array.js | 4 +- ...h-exceeding-integer-limit-proxied-array.js | 22 ++--- .../slice/length-exceeding-integer-limit.js | 22 ++--- .../Array/prototype/some/15.4.4.17-1-1.js | 2 +- .../Array/prototype/some/15.4.4.17-1-10.js | 10 +-- .../Array/prototype/some/15.4.4.17-1-11.js | 14 ++-- .../Array/prototype/some/15.4.4.17-1-12.js | 14 ++-- .../Array/prototype/some/15.4.4.17-1-13.js | 10 +-- .../Array/prototype/some/15.4.4.17-1-14.js | 12 +-- .../Array/prototype/some/15.4.4.17-1-15.js | 12 +-- .../Array/prototype/some/15.4.4.17-1-2.js | 2 +- .../Array/prototype/some/15.4.4.17-1-3.js | 10 +-- .../Array/prototype/some/15.4.4.17-1-4.js | 14 ++-- .../Array/prototype/some/15.4.4.17-1-5.js | 10 +-- .../Array/prototype/some/15.4.4.17-1-6.js | 14 ++-- .../Array/prototype/some/15.4.4.17-1-7.js | 6 +- .../Array/prototype/some/15.4.4.17-1-8.js | 8 +- .../Array/prototype/some/15.4.4.17-1-9.js | 16 ++-- .../Array/prototype/some/15.4.4.17-2-1.js | 24 +++--- .../Array/prototype/some/15.4.4.17-2-10.js | 38 ++++----- .../Array/prototype/some/15.4.4.17-2-11.js | 26 +++--- .../Array/prototype/some/15.4.4.17-2-12.js | 35 ++++---- .../Array/prototype/some/15.4.4.17-2-13.js | 30 +++---- .../Array/prototype/some/15.4.4.17-2-14.js | 15 ++-- .../Array/prototype/some/15.4.4.17-2-17.js | 22 ++--- .../Array/prototype/some/15.4.4.17-2-18.js | 16 ++-- .../Array/prototype/some/15.4.4.17-2-19.js | 24 +++--- .../Array/prototype/some/15.4.4.17-2-2.js | 14 ++-- .../Array/prototype/some/15.4.4.17-2-3.js | 30 +++---- .../Array/prototype/some/15.4.4.17-2-4.js | 21 ++--- .../Array/prototype/some/15.4.4.17-2-5.js | 46 +++++----- .../Array/prototype/some/15.4.4.17-2-6.js | 28 ++++--- .../Array/prototype/some/15.4.4.17-2-7.js | 32 +++---- .../Array/prototype/some/15.4.4.17-2-8.js | 40 ++++----- .../Array/prototype/some/15.4.4.17-2-9.js | 50 +++++------ .../Array/prototype/some/15.4.4.17-3-1.js | 15 ++-- .../Array/prototype/some/15.4.4.17-3-10.js | 15 ++-- .../Array/prototype/some/15.4.4.17-3-11.js | 19 +++-- .../Array/prototype/some/15.4.4.17-3-12.js | 19 +++-- .../Array/prototype/some/15.4.4.17-3-13.js | 19 +++-- .../Array/prototype/some/15.4.4.17-3-14.js | 25 ++++-- .../Array/prototype/some/15.4.4.17-3-15.js | 19 +++-- .../Array/prototype/some/15.4.4.17-3-16.js | 19 +++-- .../Array/prototype/some/15.4.4.17-3-17.js | 19 +++-- .../Array/prototype/some/15.4.4.17-3-18.js | 16 ++-- .../Array/prototype/some/15.4.4.17-3-19.js | 36 ++++---- .../Array/prototype/some/15.4.4.17-3-2.js | 18 ++-- .../Array/prototype/some/15.4.4.17-3-20.js | 36 ++++---- .../Array/prototype/some/15.4.4.17-3-21.js | 46 +++++----- .../Array/prototype/some/15.4.4.17-3-22.js | 44 +++++----- .../Array/prototype/some/15.4.4.17-3-23.js | 54 ++++++------ .../Array/prototype/some/15.4.4.17-3-24.js | 24 +++--- .../Array/prototype/some/15.4.4.17-3-25.js | 24 +++--- .../Array/prototype/some/15.4.4.17-3-28.js | 18 ++-- .../Array/prototype/some/15.4.4.17-3-29.js | 22 ++--- .../Array/prototype/some/15.4.4.17-3-3.js | 15 ++-- .../Array/prototype/some/15.4.4.17-3-4.js | 15 ++-- .../Array/prototype/some/15.4.4.17-3-5.js | 15 ++-- .../Array/prototype/some/15.4.4.17-3-6.js | 19 +++-- .../Array/prototype/some/15.4.4.17-3-7.js | 19 +++-- .../Array/prototype/some/15.4.4.17-3-8.js | 15 ++-- .../Array/prototype/some/15.4.4.17-3-9.js | 15 ++-- .../Array/prototype/some/15.4.4.17-4-1.js | 4 +- .../Array/prototype/some/15.4.4.17-4-10.js | 19 +++-- .../Array/prototype/some/15.4.4.17-4-11.js | 27 +++--- .../Array/prototype/some/15.4.4.17-4-12.js | 6 +- .../Array/prototype/some/15.4.4.17-4-15.js | 36 ++++---- .../Array/prototype/some/15.4.4.17-4-2.js | 4 +- .../Array/prototype/some/15.4.4.17-4-3.js | 4 +- .../Array/prototype/some/15.4.4.17-4-4.js | 4 +- .../Array/prototype/some/15.4.4.17-4-5.js | 4 +- .../Array/prototype/some/15.4.4.17-4-6.js | 4 +- .../Array/prototype/some/15.4.4.17-4-7.js | 4 +- .../Array/prototype/some/15.4.4.17-4-8.js | 23 ++--- .../Array/prototype/some/15.4.4.17-4-9.js | 31 +++---- .../Array/prototype/some/15.4.4.17-5-1-s.js | 14 ++-- .../Array/prototype/some/15.4.4.17-5-1.js | 14 ++-- .../Array/prototype/some/15.4.4.17-5-10.js | 8 +- .../Array/prototype/some/15.4.4.17-5-11.js | 8 +- .../Array/prototype/some/15.4.4.17-5-12.js | 8 +- .../Array/prototype/some/15.4.4.17-5-13.js | 8 +- .../Array/prototype/some/15.4.4.17-5-14.js | 6 +- .../Array/prototype/some/15.4.4.17-5-15.js | 8 +- .../Array/prototype/some/15.4.4.17-5-16.js | 8 +- .../Array/prototype/some/15.4.4.17-5-17.js | 6 +- .../Array/prototype/some/15.4.4.17-5-18.js | 8 +- .../Array/prototype/some/15.4.4.17-5-19.js | 14 ++-- .../Array/prototype/some/15.4.4.17-5-2.js | 17 ++-- .../Array/prototype/some/15.4.4.17-5-21.js | 7 +- .../Array/prototype/some/15.4.4.17-5-22.js | 6 +- .../Array/prototype/some/15.4.4.17-5-23.js | 6 +- .../Array/prototype/some/15.4.4.17-5-24.js | 6 +- .../Array/prototype/some/15.4.4.17-5-25.js | 18 ++-- .../Array/prototype/some/15.4.4.17-5-3.js | 17 ++-- .../Array/prototype/some/15.4.4.17-5-4.js | 21 ++--- .../Array/prototype/some/15.4.4.17-5-5.js | 21 ++--- .../Array/prototype/some/15.4.4.17-5-6.js | 19 +++-- .../Array/prototype/some/15.4.4.17-5-7.js | 6 +- .../Array/prototype/some/15.4.4.17-5-9.js | 8 +- .../Array/prototype/some/15.4.4.17-7-1.js | 20 ++--- .../Array/prototype/some/15.4.4.17-7-2.js | 18 ++-- .../Array/prototype/some/15.4.4.17-7-3.js | 18 ++-- .../Array/prototype/some/15.4.4.17-7-4.js | 18 ++-- .../Array/prototype/some/15.4.4.17-7-5.js | 22 ++--- .../Array/prototype/some/15.4.4.17-7-6.js | 24 +++--- .../Array/prototype/some/15.4.4.17-7-8.js | 16 ++-- .../Array/prototype/some/15.4.4.17-7-9.js | 30 ++++--- .../Array/prototype/some/15.4.4.17-7-b-1.js | 19 +++-- .../Array/prototype/some/15.4.4.17-7-b-10.js | 32 +++---- .../Array/prototype/some/15.4.4.17-7-b-11.js | 29 +++---- .../Array/prototype/some/15.4.4.17-7-b-12.js | 37 ++++---- .../Array/prototype/some/15.4.4.17-7-b-13.js | 32 +++---- .../Array/prototype/some/15.4.4.17-7-b-14.js | 27 +++--- .../Array/prototype/some/15.4.4.17-7-b-15.js | 42 +++++----- .../Array/prototype/some/15.4.4.17-7-b-16.js | 42 +++++----- .../Array/prototype/some/15.4.4.17-7-b-2.js | 30 +++---- .../Array/prototype/some/15.4.4.17-7-b-3.js | 30 ++++--- .../Array/prototype/some/15.4.4.17-7-b-4.js | 42 +++++----- .../Array/prototype/some/15.4.4.17-7-b-5.js | 40 ++++----- .../Array/prototype/some/15.4.4.17-7-b-6.js | 42 +++++----- .../Array/prototype/some/15.4.4.17-7-b-7.js | 40 ++++----- .../Array/prototype/some/15.4.4.17-7-b-8.js | 41 ++++----- .../Array/prototype/some/15.4.4.17-7-b-9.js | 39 ++++----- .../Array/prototype/some/15.4.4.17-7-c-i-1.js | 19 +++-- .../prototype/some/15.4.4.17-7-c-i-10.js | 28 +++---- .../prototype/some/15.4.4.17-7-c-i-11.js | 38 +++++---- .../prototype/some/15.4.4.17-7-c-i-12.js | 30 +++---- .../prototype/some/15.4.4.17-7-c-i-13.js | 48 +++++------ .../prototype/some/15.4.4.17-7-c-i-14.js | 40 ++++----- .../prototype/some/15.4.4.17-7-c-i-15.js | 36 ++++---- .../prototype/some/15.4.4.17-7-c-i-16.js | 26 +++--- .../prototype/some/15.4.4.17-7-c-i-17.js | 24 +++--- .../prototype/some/15.4.4.17-7-c-i-18.js | 22 ++--- .../prototype/some/15.4.4.17-7-c-i-19.js | 26 +++--- .../Array/prototype/some/15.4.4.17-7-c-i-2.js | 14 ++-- .../prototype/some/15.4.4.17-7-c-i-20.js | 24 +++--- .../prototype/some/15.4.4.17-7-c-i-21.js | 30 +++---- .../prototype/some/15.4.4.17-7-c-i-22.js | 20 ++--- .../prototype/some/15.4.4.17-7-c-i-25.js | 18 ++-- .../prototype/some/15.4.4.17-7-c-i-26.js | 32 +++---- .../prototype/some/15.4.4.17-7-c-i-27.js | 40 ++++----- .../prototype/some/15.4.4.17-7-c-i-28.js | 48 +++++------ .../prototype/some/15.4.4.17-7-c-i-29.js | 50 +++++------ .../Array/prototype/some/15.4.4.17-7-c-i-3.js | 28 ++++--- .../prototype/some/15.4.4.17-7-c-i-30.js | 33 ++++---- .../prototype/some/15.4.4.17-7-c-i-31.js | 33 ++++---- .../Array/prototype/some/15.4.4.17-7-c-i-4.js | 16 ++-- .../Array/prototype/some/15.4.4.17-7-c-i-5.js | 44 +++++----- .../Array/prototype/some/15.4.4.17-7-c-i-6.js | 26 +++--- .../Array/prototype/some/15.4.4.17-7-c-i-7.js | 26 +++--- .../Array/prototype/some/15.4.4.17-7-c-i-8.js | 16 ++-- .../Array/prototype/some/15.4.4.17-7-c-i-9.js | 30 +++---- .../prototype/some/15.4.4.17-7-c-ii-1.js | 16 ++-- .../prototype/some/15.4.4.17-7-c-ii-10.js | 6 +- .../prototype/some/15.4.4.17-7-c-ii-11.js | 6 +- .../prototype/some/15.4.4.17-7-c-ii-12.js | 6 +- .../prototype/some/15.4.4.17-7-c-ii-13.js | 6 +- .../prototype/some/15.4.4.17-7-c-ii-16.js | 11 ++- .../prototype/some/15.4.4.17-7-c-ii-17.js | 11 ++- .../prototype/some/15.4.4.17-7-c-ii-18.js | 12 ++- .../prototype/some/15.4.4.17-7-c-ii-19.js | 17 ++-- .../prototype/some/15.4.4.17-7-c-ii-2.js | 18 ++-- .../prototype/some/15.4.4.17-7-c-ii-20.js | 15 ++-- .../prototype/some/15.4.4.17-7-c-ii-21.js | 30 ++++--- .../prototype/some/15.4.4.17-7-c-ii-22.js | 30 ++++--- .../prototype/some/15.4.4.17-7-c-ii-23.js | 12 ++- .../prototype/some/15.4.4.17-7-c-ii-3.js | 21 ++--- .../prototype/some/15.4.4.17-7-c-ii-4.js | 24 +++--- .../prototype/some/15.4.4.17-7-c-ii-5.js | 30 +++---- .../prototype/some/15.4.4.17-7-c-ii-6.js | 13 +-- .../prototype/some/15.4.4.17-7-c-ii-7.js | 29 ++++--- .../prototype/some/15.4.4.17-7-c-ii-8.js | 18 ++-- .../prototype/some/15.4.4.17-7-c-ii-9.js | 6 +- .../prototype/some/15.4.4.17-7-c-iii-1.js | 15 ++-- .../prototype/some/15.4.4.17-7-c-iii-10.js | 6 +- .../prototype/some/15.4.4.17-7-c-iii-11.js | 6 +- .../prototype/some/15.4.4.17-7-c-iii-12.js | 10 +-- .../prototype/some/15.4.4.17-7-c-iii-13.js | 10 +-- .../prototype/some/15.4.4.17-7-c-iii-14.js | 6 +- .../prototype/some/15.4.4.17-7-c-iii-15.js | 6 +- .../prototype/some/15.4.4.17-7-c-iii-16.js | 6 +- .../prototype/some/15.4.4.17-7-c-iii-17.js | 6 +- .../prototype/some/15.4.4.17-7-c-iii-18.js | 6 +- .../prototype/some/15.4.4.17-7-c-iii-19.js | 6 +- .../prototype/some/15.4.4.17-7-c-iii-2.js | 15 ++-- .../prototype/some/15.4.4.17-7-c-iii-20.js | 6 +- .../prototype/some/15.4.4.17-7-c-iii-21.js | 6 +- .../prototype/some/15.4.4.17-7-c-iii-22.js | 6 +- .../prototype/some/15.4.4.17-7-c-iii-23.js | 6 +- .../prototype/some/15.4.4.17-7-c-iii-24.js | 6 +- .../prototype/some/15.4.4.17-7-c-iii-25.js | 6 +- .../prototype/some/15.4.4.17-7-c-iii-26.js | 7 +- .../prototype/some/15.4.4.17-7-c-iii-28.js | 57 +++++++------ .../prototype/some/15.4.4.17-7-c-iii-29.js | 6 +- .../prototype/some/15.4.4.17-7-c-iii-3.js | 15 ++-- .../prototype/some/15.4.4.17-7-c-iii-4.js | 11 ++- .../prototype/some/15.4.4.17-7-c-iii-5.js | 10 +-- .../prototype/some/15.4.4.17-7-c-iii-6.js | 10 +-- .../prototype/some/15.4.4.17-7-c-iii-7.js | 10 +-- .../prototype/some/15.4.4.17-7-c-iii-8.js | 6 +- .../prototype/some/15.4.4.17-7-c-iii-9.js | 6 +- .../Array/prototype/some/15.4.4.17-8-1.js | 4 +- .../Array/prototype/some/15.4.4.17-8-10.js | 25 +++--- .../Array/prototype/some/15.4.4.17-8-11.js | 15 ++-- .../Array/prototype/some/15.4.4.17-8-12.js | 12 +-- .../Array/prototype/some/15.4.4.17-8-13.js | 19 +++-- .../Array/prototype/some/15.4.4.17-8-2.js | 13 +-- .../Array/prototype/some/15.4.4.17-8-3.js | 13 +-- .../Array/prototype/some/15.4.4.17-8-4.js | 13 +-- .../Array/prototype/some/15.4.4.17-8-5.js | 13 +-- .../Array/prototype/some/15.4.4.17-8-6.js | 19 +++-- .../Array/prototype/some/15.4.4.17-8-7.js | 29 ++++--- .../Array/prototype/some/15.4.4.17-8-8.js | 39 ++++----- .../prototype/sort/S15.4.4.11_A1.2_T2.js | 2 +- .../prototype/sort/S15.4.4.11_A1.4_T2.js | 2 +- .../prototype/sort/S15.4.4.11_A1.5_T1.js | 4 +- .../prototype/sort/S15.4.4.11_A2.1_T2.js | 2 +- .../prototype/sort/S15.4.4.11_A2.1_T3.js | 11 ++- .../prototype/sort/S15.4.4.11_A2.2_T1.js | 4 +- .../prototype/sort/S15.4.4.11_A2.2_T2.js | 4 +- .../prototype/sort/S15.4.4.11_A2.2_T3.js | 11 ++- .../Array/prototype/sort/S15.4.4.11_A3_T1.js | 24 +++++- .../Array/prototype/sort/S15.4.4.11_A3_T2.js | 26 +++++- .../Array/prototype/sort/S15.4.4.11_A5_T1.js | 6 +- .../Array/prototype/sort/S15.4.4.11_A6_T2.js | 7 +- .../Array/prototype/sort/S15.4.4.11_A8.js | 4 +- .../Array/prototype/sort/bug_596_1.js | 8 +- .../Array/prototype/sort/bug_596_2.js | 18 ++-- .../sort/comparefn-nonfunction-call-throws.js | 2 +- .../Array/prototype/splice/15.4.4.12-9-a-1.js | 4 +- .../prototype/splice/15.4.4.12-9-c-ii-1.js | 36 ++++---- .../prototype/splice/S15.4.4.12_A1.1_T1.js | 4 +- .../prototype/splice/S15.4.4.12_A1.1_T2.js | 4 +- .../prototype/splice/S15.4.4.12_A1.1_T3.js | 4 +- .../prototype/splice/S15.4.4.12_A1.1_T4.js | 4 +- .../prototype/splice/S15.4.4.12_A1.1_T5.js | 4 +- .../prototype/splice/S15.4.4.12_A1.1_T6.js | 4 +- .../prototype/splice/S15.4.4.12_A1.2_T1.js | 4 +- .../prototype/splice/S15.4.4.12_A1.2_T2.js | 4 +- .../prototype/splice/S15.4.4.12_A1.2_T3.js | 4 +- .../prototype/splice/S15.4.4.12_A1.2_T4.js | 4 +- .../prototype/splice/S15.4.4.12_A1.2_T5.js | 4 +- .../prototype/splice/S15.4.4.12_A1.3_T1.js | 4 +- .../prototype/splice/S15.4.4.12_A1.3_T2.js | 4 +- .../prototype/splice/S15.4.4.12_A1.3_T3.js | 4 +- .../prototype/splice/S15.4.4.12_A1.3_T4.js | 4 +- .../prototype/splice/S15.4.4.12_A1.3_T5.js | 4 +- .../prototype/splice/S15.4.4.12_A1.4_T1.js | 4 +- .../prototype/splice/S15.4.4.12_A1.4_T2.js | 4 +- .../prototype/splice/S15.4.4.12_A1.4_T3.js | 4 +- .../prototype/splice/S15.4.4.12_A1.4_T4.js | 4 +- .../prototype/splice/S15.4.4.12_A1.4_T5.js | 4 +- .../prototype/splice/S15.4.4.12_A1.4_T6.js | 4 +- .../prototype/splice/S15.4.4.12_A1.5_T1.js | 2 +- .../prototype/splice/S15.4.4.12_A1.5_T2.js | 4 +- .../prototype/splice/S15.4.4.12_A2.1_T1.js | 4 +- .../prototype/splice/S15.4.4.12_A2.1_T2.js | 4 +- .../prototype/splice/S15.4.4.12_A2.1_T3.js | 4 +- .../prototype/splice/S15.4.4.12_A2.1_T4.js | 4 +- .../prototype/splice/S15.4.4.12_A2.1_T5.js | 11 ++- .../prototype/splice/S15.4.4.12_A2.2_T1.js | 4 +- .../prototype/splice/S15.4.4.12_A2.2_T2.js | 4 +- .../prototype/splice/S15.4.4.12_A2.2_T3.js | 4 +- .../prototype/splice/S15.4.4.12_A2.2_T4.js | 4 +- .../prototype/splice/S15.4.4.12_A2.2_T5.js | 11 ++- .../prototype/splice/S15.4.4.12_A2_T1.js | 9 +- .../prototype/splice/S15.4.4.12_A2_T2.js | 7 +- .../prototype/splice/S15.4.4.12_A2_T3.js | 7 +- .../prototype/splice/S15.4.4.12_A2_T4.js | 9 +- .../prototype/splice/S15.4.4.12_A3_T1.js | 8 +- .../prototype/splice/S15.4.4.12_A3_T3.js | 8 +- .../prototype/splice/S15.4.4.12_A4_T1.js | 11 ++- .../prototype/splice/S15.4.4.12_A4_T2.js | 11 ++- .../prototype/splice/S15.4.4.12_A4_T3.js | 4 +- .../prototype/splice/S15.4.4.12_A6.1_T1.js | 6 +- .../prototype/splice/S15.4.4.12_A6.1_T2.js | 2 +- .../prototype/splice/S15.4.4.12_A6.1_T3.js | 16 ++-- .../splice/clamps-length-to-integer-limit.js | 14 ++-- .../prototype/splice/create-non-array.js | 4 +- ...-species-length-exceeding-integer-limit.js | 10 +-- ...and-deleteCount-exceeding-integer-limit.js | 20 ++--- ...th-exceeding-integer-limit-shrink-array.js | 22 ++--- .../length-near-integer-limit-grow-array.js | 18 ++-- .../prototype/splice/set_length_no_args.js | 3 +- .../throws-if-integer-limit-exceeded.js | 6 +- .../toLocaleString/S15.4.4.3_A1_T1.js | 6 +- .../toLocaleString/S15.4.4.3_A3_T1.js | 6 +- .../prototype/toString/S15.4.4.2_A1_T1.js | 2 +- .../prototype/toString/S15.4.4.2_A1_T2.js | 4 +- .../prototype/toString/S15.4.4.2_A1_T3.js | 34 ++++---- .../prototype/toString/S15.4.4.2_A1_T4.js | 66 +++++++++++++-- .../prototype/unshift/S15.4.4.13_A2_T1.js | 26 +++--- .../prototype/unshift/S15.4.4.13_A2_T3.js | 66 +++++++++++++-- .../prototype/unshift/S15.4.4.13_A3_T2.js | 8 +- .../prototype/unshift/S15.4.4.13_A4_T1.js | 4 +- .../unshift/clamps-to-integer-limit.js | 14 ++-- .../unshift/length-near-integer-limit.js | 18 ++-- .../throws-if-integer-limit-exceeded.js | 6 +- .../prototype/values/iteration-mutable.js | 2 +- 2146 files changed, 21758 insertions(+), 18321 deletions(-) diff --git a/test/built-ins/Array/15.4.5-1.js b/test/built-ins/Array/15.4.5-1.js index d8a00abd4a..6eb1ae1271 100644 --- a/test/built-ins/Array/15.4.5-1.js +++ b/test/built-ins/Array/15.4.5-1.js @@ -6,7 +6,7 @@ es5id: 15.4.5-1 description: Array instances have [[Class]] set to 'Array' ---*/ - var a = []; - var s = Object.prototype.toString.call(a); +var a = []; +var s = Object.prototype.toString.call(a); assert.sameValue(s, '[object Array]', 's'); diff --git a/test/built-ins/Array/15.4.5.1-5-1.js b/test/built-ins/Array/15.4.5.1-5-1.js index 945bf9ae4e..d92747a324 100644 --- a/test/built-ins/Array/15.4.5.1-5-1.js +++ b/test/built-ins/Array/15.4.5.1-5-1.js @@ -8,7 +8,7 @@ description: > element) ---*/ - var a =[]; - a[4294967295] = "not an array element" ; +var a = []; +a[4294967295] = "not an array element"; assert.sameValue(a[4294967295], "not an array element", 'a[4294967295]'); diff --git a/test/built-ins/Array/15.4.5.1-5-2.js b/test/built-ins/Array/15.4.5.1-5-2.js index 924c48f479..27abd4c55b 100644 --- a/test/built-ins/Array/15.4.5.1-5-2.js +++ b/test/built-ins/Array/15.4.5.1-5-2.js @@ -8,7 +8,7 @@ description: > length of the array ---*/ - var a =[0,1,2]; - a[4294967295] = "not an array element" ; +var a = [0, 1, 2]; +a[4294967295] = "not an array element"; assert.sameValue(a.length, 3, 'a.length'); diff --git a/test/built-ins/Array/S15.4.1_A1.1_T2.js b/test/built-ins/Array/S15.4.1_A1.1_T2.js index 95deeeeaee..cbee1450ca 100644 --- a/test/built-ins/Array/S15.4.1_A1.1_T2.js +++ b/test/built-ins/Array/S15.4.1_A1.1_T2.js @@ -12,14 +12,14 @@ description: Array.prototype.toString = Object.prototype.toString //CHECK#1 Array.prototype.toString = Object.prototype.toString; -var x = Array(); +var x = Array(); if (x.toString() !== "[object " + "Array" + "]") { $ERROR('#1: Array.prototype.toString = Object.prototype.toString; var x = Array(); x.toString() === "[object " + "Array" + "]". Actual: ' + (x.toString())); } //CHECK#2 Array.prototype.toString = Object.prototype.toString; -var x = Array(0,1,2); +var x = Array(0, 1, 2); if (x.toString() !== "[object " + "Array" + "]") { $ERROR('#2: Array.prototype.toString = Object.prototype.toString; var x = Array(0,1,2); x.toString() === "[object " + "Array" + "]". Actual: ' + (x.toString())); } diff --git a/test/built-ins/Array/S15.4.1_A1.2_T1.js b/test/built-ins/Array/S15.4.1_A1.2_T1.js index 424f8eb9b4..abdb5116d1 100644 --- a/test/built-ins/Array/S15.4.1_A1.2_T1.js +++ b/test/built-ins/Array/S15.4.1_A1.2_T1.js @@ -8,14 +8,14 @@ description: Checking use Object.prototype.toString ---*/ //CHECK#1 -var x = Array(); +var x = Array(); x.getClass = Object.prototype.toString; if (x.getClass() !== "[object " + "Array" + "]") { $ERROR('#1: var x = Array(); x.getClass = Object.prototype.toString; x is Array object. Actual: ' + (x.getClass())); } //CHECK#2 -var x = Array(0,1,2); +var x = Array(0, 1, 2); x.getClass = Object.prototype.toString; if (x.getClass() !== "[object " + "Array" + "]") { $ERROR('#2: var x = Array(0,1,2); x.getClass = Object.prototype.toString; x is Array object. Actual: ' + (x.getClass())); diff --git a/test/built-ins/Array/S15.4.1_A2.1_T1.js b/test/built-ins/Array/S15.4.1_A2.1_T1.js index 89b2934f63..0196ec0394 100644 --- a/test/built-ins/Array/S15.4.1_A2.1_T1.js +++ b/test/built-ins/Array/S15.4.1_A2.1_T1.js @@ -15,8 +15,8 @@ if (Array().length !== 0) { } //CHECK#2 -if (Array(0,1,0,1).length !== 4) { - $ERROR('#2: (Array(0,1,0,1).length === 4. Actual: ' + (Array(0,1,0,1).length)); +if (Array(0, 1, 0, 1).length !== 4) { + $ERROR('#2: (Array(0,1,0,1).length === 4. Actual: ' + (Array(0, 1, 0, 1).length)); } //CHECK#3 diff --git a/test/built-ins/Array/S15.4.1_A2.2_T1.js b/test/built-ins/Array/S15.4.1_A2.2_T1.js index 971ce382cd..92f2c1d917 100644 --- a/test/built-ins/Array/S15.4.1_A2.2_T1.js +++ b/test/built-ins/Array/S15.4.1_A2.2_T1.js @@ -14,16 +14,16 @@ description: Checking correct work this algorithm //CHECK# var x = Array( -0,1,2,3,4,5,6,7,8,9, -10,11,12,13,14,15,16,17,18,19, -20,21,22,23,24,25,26,27,28,29, -30,31,32,33,34,35,36,37,38,39, -40,41,42,43,44,45,46,47,48,49, -50,51,52,53,54,55,56,57,58,59, -60,61,62,63,64,65,66,67,68,69, -70,71,72,73,74,75,76,77,78,79, -80,81,82,83,84,85,86,87,88,89, -90,91,92,93,94,95,96,97,98,99 + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 ); for (var i = 0; i < 100; i++) { diff --git a/test/built-ins/Array/S15.4.1_A3.1_T1.js b/test/built-ins/Array/S15.4.1_A3.1_T1.js index 383fefd736..679db6fb47 100644 --- a/test/built-ins/Array/S15.4.1_A3.1_T1.js +++ b/test/built-ins/Array/S15.4.1_A3.1_T1.js @@ -12,7 +12,7 @@ description: Checking use typeof, instanceof //CHECK#1 if (typeof Array() !== "object") { $ERROR('#1: typeof Array() === "object". Actual: ' + (typeof Array())); -} +} //CHECK#2 if ((Array() instanceof Array) !== true) { diff --git a/test/built-ins/Array/S15.4.2.1_A1.1_T1.js b/test/built-ins/Array/S15.4.2.1_A1.1_T1.js index 895ae2f4f2..cd3a2c13de 100644 --- a/test/built-ins/Array/S15.4.2.1_A1.1_T1.js +++ b/test/built-ins/Array/S15.4.2.1_A1.1_T1.js @@ -14,7 +14,7 @@ description: > //CHECK#1 Array.prototype.myproperty = 1; -var x = new Array(); +var x = new Array(); if (x.myproperty !== 1) { $ERROR('#1: Array.prototype.myproperty = 1; var x = new Array(); x.myproperty === 1. Actual: ' + (x.myproperty)); } diff --git a/test/built-ins/Array/S15.4.2.1_A1.1_T2.js b/test/built-ins/Array/S15.4.2.1_A1.1_T2.js index 74ccc645eb..3992943a4a 100644 --- a/test/built-ins/Array/S15.4.2.1_A1.1_T2.js +++ b/test/built-ins/Array/S15.4.2.1_A1.1_T2.js @@ -12,14 +12,14 @@ description: Array.prototype.toString = Object.prototype.toString //CHECK#1 Array.prototype.toString = Object.prototype.toString; -var x = new Array(); +var x = new Array(); if (x.toString() !== "[object " + "Array" + "]") { $ERROR('#1: Array.prototype.toString = Object.prototype.toString; var x = new Array(); x.toString() === "[object " + "Array" + "]". Actual: ' + (x.toString())); } //CHECK#2 Array.prototype.toString = Object.prototype.toString; -var x = new Array(0,1,2); +var x = new Array(0, 1, 2); if (x.toString() !== "[object " + "Array" + "]") { $ERROR('#2: Array.prototype.toString = Object.prototype.toString; var x = new Array(0,1,2); x.toString() === "[object " + "Array" + "]". Actual: ' + (x.toString())); } diff --git a/test/built-ins/Array/S15.4.2.1_A1.2_T1.js b/test/built-ins/Array/S15.4.2.1_A1.2_T1.js index 59b528f6a3..de6c5a1d81 100644 --- a/test/built-ins/Array/S15.4.2.1_A1.2_T1.js +++ b/test/built-ins/Array/S15.4.2.1_A1.2_T1.js @@ -8,14 +8,14 @@ description: Checking use Object.prototype.toString ---*/ //CHECK#1 -var x = new Array(); +var x = new Array(); x.getClass = Object.prototype.toString; if (x.getClass() !== "[object " + "Array" + "]") { $ERROR('#1: var x = new Array(); x.getClass = Object.prototype.toString; x is Array object. Actual: ' + (x.getClass())); } //CHECK#2 -var x = new Array(0,1,2); +var x = new Array(0, 1, 2); x.getClass = Object.prototype.toString; if (x.getClass() !== "[object " + "Array" + "]") { $ERROR('#2: var x = new Array(0,1,2); x.getClass = Object.prototype.toString; x is Array object. Actual: ' + (x.getClass())); diff --git a/test/built-ins/Array/S15.4.2.1_A2.1_T1.js b/test/built-ins/Array/S15.4.2.1_A2.1_T1.js index 97aaaa52b7..e189774b0c 100644 --- a/test/built-ins/Array/S15.4.2.1_A2.1_T1.js +++ b/test/built-ins/Array/S15.4.2.1_A2.1_T1.js @@ -15,8 +15,8 @@ if (new Array().length !== 0) { } //CHECK#2 -if (new Array(0,1,0,1).length !== 4) { - $ERROR('#2: new Array(0,1,0,1).length === 4. Actual: ' + (new Array(0,1,0,1).length)); +if (new Array(0, 1, 0, 1).length !== 4) { + $ERROR('#2: new Array(0,1,0,1).length === 4. Actual: ' + (new Array(0, 1, 0, 1).length)); } //CHECK#3 diff --git a/test/built-ins/Array/S15.4.2.1_A2.2_T1.js b/test/built-ins/Array/S15.4.2.1_A2.2_T1.js index e4c088a91d..05dbf789d0 100644 --- a/test/built-ins/Array/S15.4.2.1_A2.2_T1.js +++ b/test/built-ins/Array/S15.4.2.1_A2.2_T1.js @@ -14,16 +14,16 @@ description: Checking correct work this algorithm //CHECK# var x = new Array( -0,1,2,3,4,5,6,7,8,9, -10,11,12,13,14,15,16,17,18,19, -20,21,22,23,24,25,26,27,28,29, -30,31,32,33,34,35,36,37,38,39, -40,41,42,43,44,45,46,47,48,49, -50,51,52,53,54,55,56,57,58,59, -60,61,62,63,64,65,66,67,68,69, -70,71,72,73,74,75,76,77,78,79, -80,81,82,83,84,85,86,87,88,89, -90,91,92,93,94,95,96,97,98,99 + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 ); for (var i = 0; i < 100; i++) { diff --git a/test/built-ins/Array/S15.4.5.1_A1.2_T2.js b/test/built-ins/Array/S15.4.5.1_A1.2_T2.js index eb722c4ab6..493457eb95 100644 --- a/test/built-ins/Array/S15.4.5.1_A1.2_T2.js +++ b/test/built-ins/Array/S15.4.5.1_A1.2_T2.js @@ -13,13 +13,13 @@ description: Checking an inherited property //CHECK#1 Array.prototype[2] = -1; -var x = [0,1,2]; -if (x[2] !== 2) { - $ERROR('#1: Array.prototype[2] = -1; x = [0,1,3]; x[2] === 2. Actual: ' + (x[2])); +var x = [0, 1, 2]; +if (x[2] !== 2) { + $ERROR('#1: Array.prototype[2] = -1; x = [0,1,3]; x[2] === 2. Actual: ' + (x[2])); } //CHECK#2 x.length = 2; -if (x[2] !== -1) { - $ERROR('#2: Array.prototype[2] = -1; x = [0,1,3]; x.length = 2; x[2] === -1. Actual: ' + (x[2])); +if (x[2] !== -1) { + $ERROR('#2: Array.prototype[2] = -1; x = [0,1,3]; x.length = 2; x[2] === -1. Actual: ' + (x[2])); } diff --git a/test/built-ins/Array/S15.4.5.1_A2.1_T1.js b/test/built-ins/Array/S15.4.5.1_A2.1_T1.js index 3006c94e7d..b48f6d6c42 100644 --- a/test/built-ins/Array/S15.4.5.1_A2.1_T1.js +++ b/test/built-ins/Array/S15.4.5.1_A2.1_T1.js @@ -12,32 +12,32 @@ description: P in [4294967295, -1, true] //CHECK#1 var x = []; x[4294967295] = 1; -if (x.length !== 0) { - $ERROR('#1.1: x = []; x[4294967295] = 1; x.length === 0. Actual: ' + (x.length)); +if (x.length !== 0) { + $ERROR('#1.1: x = []; x[4294967295] = 1; x.length === 0. Actual: ' + (x.length)); } -if (x[4294967295] !== 1) { - $ERROR('#1.2: x = []; x[4294967295] = 1; x[4294967295] === 1. Actual: ' + (x[4294967295])); +if (x[4294967295] !== 1) { + $ERROR('#1.2: x = []; x[4294967295] = 1; x[4294967295] === 1. Actual: ' + (x[4294967295])); } //CHECK#2 x = []; x[-1] = 1; -if (x.length !== 0) { - $ERROR('#2.1: x = []; x[-1] = 1; x.length === 0. Actual: ' + (x.length)); +if (x.length !== 0) { + $ERROR('#2.1: x = []; x[-1] = 1; x.length === 0. Actual: ' + (x.length)); } -if (x[-1] !== 1) { - $ERROR('#2.2: x = []; x[-1] = 1; x[-1] === 1. Actual: ' + (x[-1])); +if (x[-1] !== 1) { + $ERROR('#2.2: x = []; x[-1] = 1; x[-1] === 1. Actual: ' + (x[-1])); } //CHECK#3 x = []; x[true] = 1; -if (x.length !== 0) { - $ERROR('#3.1: x = []; x[true] = 1; x.length === 0. Actual: ' + (x.length)); +if (x.length !== 0) { + $ERROR('#3.1: x = []; x[true] = 1; x.length === 0. Actual: ' + (x.length)); } -if (x[true] !== 1) { - $ERROR('#3.2: x = []; x[true] = 1; x[true] === 1. Actual: ' + (x[true])); +if (x[true] !== 1) { + $ERROR('#3.2: x = []; x[true] = 1; x[true] === 1. Actual: ' + (x[true])); } diff --git a/test/built-ins/Array/S15.4.5.1_A2.2_T1.js b/test/built-ins/Array/S15.4.5.1_A2.2_T1.js index b3000c1dba..45ebd19d6a 100644 --- a/test/built-ins/Array/S15.4.5.1_A2.2_T1.js +++ b/test/built-ins/Array/S15.4.5.1_A2.2_T1.js @@ -12,18 +12,18 @@ description: length === 100, P in [0, 98, 99] //CHECK#1 var x = Array(100); x[0] = 1; -if (x.length !== 100) { - $ERROR('#1: x = Array(100); x[0] = 1; x.length === 100. Actual: ' + (x.length)); +if (x.length !== 100) { + $ERROR('#1: x = Array(100); x[0] = 1; x.length === 100. Actual: ' + (x.length)); } //CHECK#2 x[98] = 1; -if (x.length !== 100) { - $ERROR('#2: x = Array(100); x[0] = 1; x[98] = 1; x.length === 100. Actual: ' + (x.length)); +if (x.length !== 100) { + $ERROR('#2: x = Array(100); x[0] = 1; x[98] = 1; x.length === 100. Actual: ' + (x.length)); } //CHECK#3 x[99] = 1; -if (x.length !== 100) { - $ERROR('#3: x = Array(100); x[0] = 1; x[98] = 1; x[99] = 1; x.length === 100. Actual: ' + (x.length)); +if (x.length !== 100) { + $ERROR('#3: x = Array(100); x[0] = 1; x[98] = 1; x[99] = 1; x.length === 100. Actual: ' + (x.length)); } diff --git a/test/built-ins/Array/S15.4.5.1_A2.3_T1.js b/test/built-ins/Array/S15.4.5.1_A2.3_T1.js index 90525f07ff..0c4c807db0 100644 --- a/test/built-ins/Array/S15.4.5.1_A2.3_T1.js +++ b/test/built-ins/Array/S15.4.5.1_A2.3_T1.js @@ -12,12 +12,12 @@ description: length = 100, P in [100, 199] //CHECK#1 var x = Array(100); x[100] = 1; -if (x.length !== 101) { - $ERROR('#1: x = Array(100); x[100] = 1; x.length === 101. Actual: ' + (x.length)); +if (x.length !== 101) { + $ERROR('#1: x = Array(100); x[100] = 1; x.length === 101. Actual: ' + (x.length)); } //CHECK#2 x[199] = 1; -if (x.length !== 200) { - $ERROR('#2: x = Array(100); x[100] = 1; x[199] = 1; x.length === 100. Actual: ' + (x.length)); +if (x.length !== 200) { + $ERROR('#2: x = Array(100); x[100] = 1; x[199] = 1; x.length === 100. Actual: ' + (x.length)); } diff --git a/test/built-ins/Array/S15.4.5.2_A1_T1.js b/test/built-ins/Array/S15.4.5.2_A1_T1.js index 16e7904b8a..56ef2426ec 100644 --- a/test/built-ins/Array/S15.4.5.2_A1_T1.js +++ b/test/built-ins/Array/S15.4.5.2_A1_T1.js @@ -12,30 +12,30 @@ description: Checking boundary points //CHECK#1 var x = []; -if (x.length !== 0) { - $ERROR('#1: x = []; x.length === 0. Actual: ' + (x.length)); +if (x.length !== 0) { + $ERROR('#1: x = []; x.length === 0. Actual: ' + (x.length)); } //CHECK#2 x[0] = 1; -if (x.length !== 1) { +if (x.length !== 1) { $ERROR('#2: x = []; x[1] = 1; x.length === 1. Actual: ' + (x.length)); } //CHECK#3 x[1] = 1; -if (x.length !== 2) { +if (x.length !== 2) { $ERROR('#3: x = []; x[0] = 1; x[1] = 1; x.length === 2. Actual: ' + (x.length)); } //CHECK#4 x[2147483648] = 1; -if (x.length !== 2147483649) { +if (x.length !== 2147483649) { $ERROR('#4: x = []; x[0] = 1; x[1] = 1; x[2147483648] = 1; x.length === 2147483649. Actual: ' + (x.length)); } //CHECK#5 x[4294967294] = 1; -if (x.length !== 4294967295) { +if (x.length !== 4294967295) { $ERROR('#5: x = []; x[0] = 1; x[1] = 1; x[2147483648] = 1; x[42949672954] = 1; x.length === 4294967295. Actual: ' + (x.length)); } diff --git a/test/built-ins/Array/S15.4.5.2_A1_T2.js b/test/built-ins/Array/S15.4.5.2_A1_T2.js index 12dfb1943b..6edcf113b4 100644 --- a/test/built-ins/Array/S15.4.5.2_A1_T2.js +++ b/test/built-ins/Array/S15.4.5.2_A1_T2.js @@ -13,14 +13,14 @@ description: P = "2^32 - 1" is not index array //CHECK#1 var x = []; x[4294967295] = 1; -if (x.length !== 0) { - $ERROR('#1: x = []; x[4294967295] = 1; x.length === 0. Actual: ' + (x.length)); +if (x.length !== 0) { + $ERROR('#1: x = []; x[4294967295] = 1; x.length === 0. Actual: ' + (x.length)); } //CHECK#2 -var y =[]; +var y = []; y[1] = 1; y[4294967295] = 1; -if (y.length !== 2) { +if (y.length !== 2) { $ERROR('#2: y = []; y[1] = 1; y[4294967295] = 1; y.length === 2. Actual: ' + (y.length)); } diff --git a/test/built-ins/Array/S15.4.5.2_A2_T1.js b/test/built-ins/Array/S15.4.5.2_A2_T1.js index 8f9ac5b8c9..39a8a330a7 100644 --- a/test/built-ins/Array/S15.4.5.2_A2_T1.js +++ b/test/built-ins/Array/S15.4.5.2_A2_T1.js @@ -11,24 +11,24 @@ description: Checking length property //CHECK#1 var x = []; -if (x.length !== 0) { - $ERROR('#1: x = []; x.length === 0. Actual: ' + (x.length)); +if (x.length !== 0) { + $ERROR('#1: x = []; x.length === 0. Actual: ' + (x.length)); } //CHECK#2 x[0] = 1; -if (x.length !== 1) { +if (x.length !== 1) { $ERROR('#2: x = []; x[1] = 1; x.length === 1. Actual: ' + (x.length)); } //CHECK#3 x[1] = 1; -if (x.length !== 2) { +if (x.length !== 2) { $ERROR('#3: x = []; x[0] = 1; x[1] = 1; x.length === 2. Actual: ' + (x.length)); } //CHECK#4 x[9] = 1; -if (x.length !== 10) { +if (x.length !== 10) { $ERROR('#4: x = []; x[0] = 1; x[1] = 1; x[9] = 1; x.length === 10. Actual: ' + (x.length)); } diff --git a/test/built-ins/Array/S15.4.5.2_A3_T1.js b/test/built-ins/Array/S15.4.5.2_A3_T1.js index 5ab53b122a..f29a2a9b18 100644 --- a/test/built-ins/Array/S15.4.5.2_A3_T1.js +++ b/test/built-ins/Array/S15.4.5.2_A3_T1.js @@ -14,18 +14,18 @@ description: > //CHECK#1 var x = []; x.length = 1; -if (x.length !== 1) { - $ERROR('#1: x = []; x.length = 1; x.length === 1. Actual: ' + (x.length)); +if (x.length !== 1) { + $ERROR('#1: x = []; x.length = 1; x.length === 1. Actual: ' + (x.length)); } //CHECK#2 x[5] = 1; x.length = 10; -if (x.length !== 10) { +if (x.length !== 10) { $ERROR('#2: x = []; x.length = 1; x[5] = 1; x.length = 10; x.length === 10. Actual: ' + (x.length)); } //CHECK#3 -if (x[5] !== 1) { +if (x[5] !== 1) { $ERROR('#3: x = []; x.length = 1; x[5] = 1; x.length = 10; x[5] = 1'); } diff --git a/test/built-ins/Array/S15.4.5.2_A3_T2.js b/test/built-ins/Array/S15.4.5.2_A3_T2.js index ddd3579699..da278f12bc 100644 --- a/test/built-ins/Array/S15.4.5.2_A3_T2.js +++ b/test/built-ins/Array/S15.4.5.2_A3_T2.js @@ -17,34 +17,34 @@ x[1] = 1; x[3] = 3; x[5] = 5; x.length = 4; -if (x.length !== 4) { - $ERROR('#1: x = []; x[1] = 1; x[3] = 3; x[5] = 5; x.length = 4; x.length === 4. Actual: ' + (x.length)); +if (x.length !== 4) { + $ERROR('#1: x = []; x[1] = 1; x[3] = 3; x[5] = 5; x.length = 4; x.length === 4. Actual: ' + (x.length)); } //CHECK#2 -if (x[5] !== undefined) { +if (x[5] !== undefined) { $ERROR('#2: x = []; x[1] = 1; x[3] = 3; x[5] = 5; x.length = 4; x[5] === undefined. Actual: ' + (x[5])); } //CHECK#3 -if (x[3] !== 3) { +if (x[3] !== 3) { $ERROR('#3: x = []; x[1] = 1; x[3] = 3; x[5] = 5; x.length = 4; x[3] === 3. Actual: ' + (x[3])); } //CHECK#4 x.length = new Number(6); -if (x[5] !== undefined) { +if (x[5] !== undefined) { $ERROR('#4: x = []; x[1] = 1; x[3] = 3; x[5] = 5; x.length = 4; x.length = new Number(6); x[5] === undefined. Actual: ' + (x[5])); } //CHECK#5 x.length = 0; -if (x[0] !== undefined) { +if (x[0] !== undefined) { $ERROR('#5: x = []; x[1] = 1; x[3] = 3; x[5] = 5; x.length = 4; x.length = new Number(6); x.length = 0; x[0] === undefined. Actual: ' + (x[0])); } //CHECK#6 x.length = 1; -if (x[1] !== undefined) { +if (x[1] !== undefined) { $ERROR('#6: x = []; x[1] = 1; x[3] = 3; x[5] = 5; x.length = 4; x.length = new Number(6); x.length = 0; x.length = 1; x[1] === undefined. Actual: ' + (x[1])); } diff --git a/test/built-ins/Array/S15.4.5.2_A3_T3.js b/test/built-ins/Array/S15.4.5.2_A3_T3.js index 6d7eb65791..5b3f13f369 100644 --- a/test/built-ins/Array/S15.4.5.2_A3_T3.js +++ b/test/built-ins/Array/S15.4.5.2_A3_T3.js @@ -12,8 +12,8 @@ description: "[[Put]] (length, 4294967296)" //CHECK#1 var x = []; x.length = 4294967295; -if (x.length !== 4294967295) { - $ERROR('#1: x = []; x.length = 4294967295; x.length === 4294967295'); +if (x.length !== 4294967295) { + $ERROR('#1: x = []; x.length = 4294967295; x.length === 4294967295'); } //CHECK#2 @@ -21,8 +21,8 @@ try { x = []; x.length = 4294967296; $ERROR('#2.1: x = []; x.length = 4294967296 throw RangeError. Actual: x.length === ' + (x.length)); -} catch(e) { +} catch (e) { if ((e instanceof RangeError) !== true) { $ERROR('#2.2: x = []; x.length = 4294967296 throw RangeError. Actual: ' + (e)); - } + } } diff --git a/test/built-ins/Array/S15.4_A1.1_T10.js b/test/built-ins/Array/S15.4_A1.1_T10.js index 95ab3851b9..c2d6d3a75e 100644 --- a/test/built-ins/Array/S15.4_A1.1_T10.js +++ b/test/built-ins/Array/S15.4_A1.1_T10.js @@ -14,7 +14,7 @@ var x = []; var k = 1; for (var i = 0; i < 32; i++) { k = k * 2; - x[k - 2] = k; + x[k - 2] = k; } k = 1; @@ -22,5 +22,5 @@ for (i = 0; i < 32; i++) { k = k * 2; if (x[k - 2] !== k) { $ERROR('#' + (k - 2) + ': '); - } + } } diff --git a/test/built-ins/Array/S15.4_A1.1_T4.js b/test/built-ins/Array/S15.4_A1.1_T4.js index 74c053efcd..fa5dff3e13 100644 --- a/test/built-ins/Array/S15.4_A1.1_T4.js +++ b/test/built-ins/Array/S15.4_A1.1_T4.js @@ -13,12 +13,12 @@ description: Checking for string primitive var x = []; x["0"] = 0; if (x[0] !== 0) { - $ERROR('#1: x = []; x["0"] = 0; x[0] === 0. Actual: ' + (x[0])); -} + $ERROR('#1: x = []; x["0"] = 0; x[0] === 0. Actual: ' + (x[0])); +} //CHECK#2 var y = []; y["1"] = 1; if (y[1] !== 1) { - $ERROR('#2: y = []; y["1"] = 1; y[1] === 1. Actual: ' + (y[1])); + $ERROR('#2: y = []; y["1"] = 1; y[1] === 1. Actual: ' + (y[1])); } diff --git a/test/built-ins/Array/S15.4_A1.1_T5.js b/test/built-ins/Array/S15.4_A1.1_T5.js index 1a2a3e63bc..7c5f208763 100644 --- a/test/built-ins/Array/S15.4_A1.1_T5.js +++ b/test/built-ins/Array/S15.4_A1.1_T5.js @@ -13,22 +13,22 @@ description: Checking for null and undefined var x = []; x[null] = 0; if (x[0] !== undefined) { - $ERROR('#1: x = []; x[null] = 1; x[0] === undefined. Actual: ' + (x[0])); + $ERROR('#1: x = []; x[null] = 1; x[0] === undefined. Actual: ' + (x[0])); } //CHECK#2 if (x["null"] !== 0) { - $ERROR('#2: x = []; x[null] = 1; x["null"] === 0. Actual: ' + (x["null"])); + $ERROR('#2: x = []; x[null] = 1; x["null"] === 0. Actual: ' + (x["null"])); } //CHECK#3 var y = []; y[undefined] = 0; if (y[0] !== undefined) { - $ERROR('#3: y = []; y[undefined] = 0; y[0] === undefined. Actual: ' + (y[0])); + $ERROR('#3: y = []; y[undefined] = 0; y[0] === undefined. Actual: ' + (y[0])); } //CHECK#4 if (y["undefined"] !== 0) { - $ERROR('#4: y = []; y[undefined] = 1; y["undefined"] === 0. Actual: ' + (y["undefined"])); + $ERROR('#4: y = []; y[undefined] = 1; y["undefined"] === 0. Actual: ' + (y["undefined"])); } diff --git a/test/built-ins/Array/S15.4_A1.1_T6.js b/test/built-ins/Array/S15.4_A1.1_T6.js index 8b04787068..7aaf2b628e 100644 --- a/test/built-ins/Array/S15.4_A1.1_T6.js +++ b/test/built-ins/Array/S15.4_A1.1_T6.js @@ -13,21 +13,21 @@ description: Checking for Boolean object var x = []; x[new Boolean(true)] = 1; if (x[1] !== undefined) { - $ERROR('#1: x = []; x[new Boolean(true)] = 1; x[1] === undefined. Actual: ' + (x[1])); + $ERROR('#1: x = []; x[new Boolean(true)] = 1; x[1] === undefined. Actual: ' + (x[1])); } //CHECK#2 if (x["true"] !== 1) { - $ERROR('#2: x = []; x[true] = 1; x["true"] === 1. Actual: ' + (x["true"])); + $ERROR('#2: x = []; x[true] = 1; x["true"] === 1. Actual: ' + (x["true"])); } //CHECK#3 x[new Boolean(false)] = 0; if (x[0] !== undefined) { - $ERROR('#3: x = []; x[true] = 1; x[new Boolean(false)] = 0; x[0] === undefined. Actual: ' + (x[0])); + $ERROR('#3: x = []; x[true] = 1; x[new Boolean(false)] = 0; x[0] === undefined. Actual: ' + (x[0])); } //CHECK#4 if (x["false"] !== 0) { - $ERROR('#4: x = []; x[false] = 1; x["false"] === 0. Actual: ' + (x["false"])); + $ERROR('#4: x = []; x[false] = 1; x["false"] === 0. Actual: ' + (x["false"])); } diff --git a/test/built-ins/Array/S15.4_A1.1_T7.js b/test/built-ins/Array/S15.4_A1.1_T7.js index a7a3a3caf5..de1f1cd0ac 100644 --- a/test/built-ins/Array/S15.4_A1.1_T7.js +++ b/test/built-ins/Array/S15.4_A1.1_T7.js @@ -13,19 +13,19 @@ description: Checking for Number object var x = []; x[new Number(0)] = 0; if (x[0] !== 0) { - $ERROR('#1: x = []; x[new Number(0)] = 0; x[0] === 0. Actual: ' + (x[0])); -} + $ERROR('#1: x = []; x[new Number(0)] = 0; x[0] === 0. Actual: ' + (x[0])); +} //CHECK#2 var y = []; y[new Number(1)] = 1; if (y[1] !== 1) { - $ERROR('#2: y = []; y[new Number(1)] = 1; y[1] === 1. Actual: ' + (y[1])); + $ERROR('#2: y = []; y[new Number(1)] = 1; y[1] === 1. Actual: ' + (y[1])); } //CHECK#3 var z = []; z[new Number(1.1)] = 1; if (z["1.1"] !== 1) { - $ERROR('#3: z = []; z[new Number(1.1)] = 1; z["1.1"] === 1. Actual: ' + (z["1.1"])); + $ERROR('#3: z = []; z[new Number(1.1)] = 1; z["1.1"] === 1. Actual: ' + (z["1.1"])); } diff --git a/test/built-ins/Array/S15.4_A1.1_T8.js b/test/built-ins/Array/S15.4_A1.1_T8.js index 3036b8acc3..349c592ee3 100644 --- a/test/built-ins/Array/S15.4_A1.1_T8.js +++ b/test/built-ins/Array/S15.4_A1.1_T8.js @@ -13,19 +13,19 @@ description: Checking for Number object var x = []; x[new String("0")] = 0; if (x[0] !== 0) { - $ERROR('#1: x = []; x[new String("0")] = 0; x[0] === 0. Actual: ' + (x[0])); -} + $ERROR('#1: x = []; x[new String("0")] = 0; x[0] === 0. Actual: ' + (x[0])); +} //CHECK#2 var y = []; y[new String("1")] = 1; if (y[1] !== 1) { - $ERROR('#2: y = []; y[new String("1")] = 1; y[1] === 1. Actual: ' + (y[1])); + $ERROR('#2: y = []; y[new String("1")] = 1; y[1] === 1. Actual: ' + (y[1])); } //CHECK#3 var z = []; z[new String("1.1")] = 1; if (z["1.1"] !== 1) { - $ERROR('#3: z = []; z[new String("1.1")] = 1; z["1.1"] === 1. Actual: ' + (z["1.1"])); + $ERROR('#3: z = []; z[new String("1.1")] = 1; z["1.1"] === 1. Actual: ' + (z["1.1"])); } diff --git a/test/built-ins/Array/S15.4_A1.1_T9.js b/test/built-ins/Array/S15.4_A1.1_T9.js index 645a512eeb..ec8acc45a3 100644 --- a/test/built-ins/Array/S15.4_A1.1_T9.js +++ b/test/built-ins/Array/S15.4_A1.1_T9.js @@ -11,7 +11,11 @@ description: If Type(value) is Object, evaluate ToPrimitive(value, String) //CHECK#1 var x = []; -var object = {valueOf: function() {return 1}}; +var object = { + valueOf: function() { + return 1 + } +}; x[object] = 0; if (x["[object Object]"] !== 0) { $ERROR('#1: x = []; var object = {valueOf: function() {return 1}}; x[object] = 0; x["[object Object]"] === 0. Actual: ' + (x["[object Object]"])); @@ -19,15 +23,29 @@ if (x["[object Object]"] !== 0) { //CHECK#2 x = []; -var object = {valueOf: function() {return 1}, toString: function() {return 0}}; +var object = { + valueOf: function() { + return 1 + }, + toString: function() { + return 0 + } +}; x[object] = 0; if (x[0] !== 0) { $ERROR('#2: x = []; var object = {valueOf: function() {return 1}, toString: function() {return 0}}; x[object] = 0; x[0] === 0. Actual: ' + (x[0])); -} +} //CHECK#3 x = []; -var object = {valueOf: function() {return 1}, toString: function() {return {}}}; +var object = { + valueOf: function() { + return 1 + }, + toString: function() { + return {} + } +}; x[object] = 0; if (x[1] !== 0) { $ERROR('#3: x = []; var object = {valueOf: function() {return 1}, toString: function() {return {}}}; x[object] = 0; x[1] === 0. Actual: ' + (x[1])); @@ -35,8 +53,15 @@ if (x[1] !== 0) { //CHECK#4 try { - x = []; - var object = {valueOf: function() {throw "error"}, toString: function() {return 1}}; + x = []; + var object = { + valueOf: function() { + throw "error" + }, + toString: function() { + return 1 + } + }; x[object] = 0; if (x[1] !== 0) { $ERROR('#4.1: x = []; var object = {valueOf: function() {throw "error"}, toString: function() {return 1}}; x[object] = 0; x[1] === 1. Actual: ' + (x[1])); @@ -52,7 +77,11 @@ catch (e) { //CHECK#5 x = []; -var object = {toString: function() {return 1}}; +var object = { + toString: function() { + return 1 + } +}; x[object] = 0; if (x[1] !== 0) { $ERROR('#5: x = []; var object = {toString: function() {return 1}}; x[object] = 0; x[1] === 0. Actual: ' + (x[1])); @@ -60,7 +89,14 @@ if (x[1] !== 0) { //CHECK#6 x = []; -var object = {valueOf: function() {return {}}, toString: function() {return 1}} +var object = { + valueOf: function() { + return {} + }, + toString: function() { + return 1 + } +} x[object] = 0; if (x[1] !== 0) { $ERROR('#6: x = []; var object = {valueOf: function() {return {}}, toString: function() {return 1}}; x[object] = 0; x[1] === 0. Actual: ' + (x[1])); @@ -69,25 +105,39 @@ if (x[1] !== 0) { //CHECK#7 try { x = []; - var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; - x[object]; + var object = { + valueOf: function() { + return 1 + }, + toString: function() { + throw "error" + } + }; + x[object]; $ERROR('#7.1: x = []; var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; x[object] throw "error". Actual: ' + (x[object])); -} +} catch (e) { if (e !== "error") { $ERROR('#7.2: x = []; var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; x[object] throw "error". Actual: ' + (e)); - } + } } //CHECK#8 try { x = []; - var object = {valueOf: function() {return {}}, toString: function() {return {}}}; + var object = { + valueOf: function() { + return {} + }, + toString: function() { + return {} + } + }; x[object]; $ERROR('#8.1: x = []; var object = {valueOf: function() {return {}}, toString: function() {return {}}}; x[object] throw TypeError. Actual: ' + (x[object])); -} +} catch (e) { if ((e instanceof TypeError) !== true) { $ERROR('#8.2: x = []; var object = {valueOf: function() {return {}}, toString: function() {return {}}}; x[object] throw TypeError. Actual: ' + (e)); - } + } } diff --git a/test/built-ins/Array/from/Array.from_forwards-length-for-array-likes.js b/test/built-ins/Array/from/Array.from_forwards-length-for-array-likes.js index 4718751cb2..311bc7780f 100644 --- a/test/built-ins/Array/from/Array.from_forwards-length-for-array-likes.js +++ b/test/built-ins/Array/from/Array.from_forwards-length-for-array-likes.js @@ -28,7 +28,9 @@ function MyCollection() { this.args = arguments; } -result = Array.from.call(MyCollection, {length: 42}); +result = Array.from.call(MyCollection, { + length: 42 +}); assert.sameValue(result.args.length, 1); assert.sameValue(result.args[0], 42); diff --git a/test/built-ins/Array/from/calling-from-valid-1-noStrict.js b/test/built-ins/Array/from/calling-from-valid-1-noStrict.js index 201736051e..eb0d24aa44 100644 --- a/test/built-ins/Array/from/calling-from-valid-1-noStrict.js +++ b/test/built-ins/Array/from/calling-from-valid-1-noStrict.js @@ -34,7 +34,7 @@ var list = { }; var calls = []; -function mapFn (value) { +function mapFn(value) { calls.push({ args: arguments, thisArg: this diff --git a/test/built-ins/Array/from/calling-from-valid-1-onlyStrict.js b/test/built-ins/Array/from/calling-from-valid-1-onlyStrict.js index 8415045f77..68abe0f44a 100644 --- a/test/built-ins/Array/from/calling-from-valid-1-onlyStrict.js +++ b/test/built-ins/Array/from/calling-from-valid-1-onlyStrict.js @@ -34,7 +34,7 @@ var list = { }; var calls = []; -function mapFn (value) { +function mapFn(value) { calls.push({ args: arguments, thisArg: this diff --git a/test/built-ins/Array/from/calling-from-valid-2.js b/test/built-ins/Array/from/calling-from-valid-2.js index 50be8469c8..139c9818c1 100644 --- a/test/built-ins/Array/from/calling-from-valid-2.js +++ b/test/built-ins/Array/from/calling-from-valid-2.js @@ -35,7 +35,7 @@ var list = { var calls = []; var thisArg = {}; -function mapFn (value) { +function mapFn(value) { calls.push({ args: arguments, thisArg: this diff --git a/test/built-ins/Array/from/elements-added-after.js b/test/built-ins/Array/from/elements-added-after.js index 9aafe597ac..a8ff21a0c1 100644 --- a/test/built-ins/Array/from/elements-added-after.js +++ b/test/built-ins/Array/from/elements-added-after.js @@ -10,23 +10,24 @@ es6id: 22.1.2.1 var arrayIndex = -1; var originalLength = 7; var obj = { - length: originalLength, - 0: 2, - 1: 4, - 2: 8, - 3: 16, - 4: 32, - 5: 64, - 6: 128 + length: originalLength, + 0: 2, + 1: 4, + 2: 8, + 3: 16, + 4: 32, + 5: 64, + 6: 128 }; -var array = [ 2, 4, 8, 16, 32, 64, 128 ]; -function mapFn(value, index) { - arrayIndex++; - assert.sameValue(value, obj[arrayIndex], "Value mismatch in mapFn at index " + index + "."); - assert.sameValue(index, arrayIndex, "Index mismatch in mapFn."); - obj[originalLength + arrayIndex] = 2 * arrayIndex + 1; +var array = [2, 4, 8, 16, 32, 64, 128]; - return obj[arrayIndex]; +function mapFn(value, index) { + arrayIndex++; + assert.sameValue(value, obj[arrayIndex], "Value mismatch in mapFn at index " + index + "."); + assert.sameValue(index, arrayIndex, "Index mismatch in mapFn."); + obj[originalLength + arrayIndex] = 2 * arrayIndex + 1; + + return obj[arrayIndex]; } @@ -34,5 +35,5 @@ var a = Array.from(obj, mapFn); assert.sameValue(a.length, array.length, "Length mismatch."); for (var j = 0; j < a.length; j++) { - assert.sameValue(a[j], array[j], "Element mismatch for array at index " + j + "."); + assert.sameValue(a[j], array[j], "Element mismatch for array at index " + j + "."); } diff --git a/test/built-ins/Array/from/elements-deleted-after.js b/test/built-ins/Array/from/elements-deleted-after.js index d2d72e51e6..02f7453293 100644 --- a/test/built-ins/Array/from/elements-deleted-after.js +++ b/test/built-ins/Array/from/elements-deleted-after.js @@ -9,17 +9,18 @@ esid: sec-array.from es6id: 22.1.2.1 ---*/ -var originalArray = [ 0, 1, -2, 4, -8, 16 ]; -var array = [ 0, 1, -2, 4, -8, 16 ]; +var originalArray = [0, 1, -2, 4, -8, 16]; +var array = [0, 1, -2, 4, -8, 16]; var a = []; var arrayIndex = -1; -function mapFn(value, index) { - this.arrayIndex++; - assert.sameValue(value, array[this.arrayIndex], "Value mismatch in mapFn at index " + index + "."); - assert.sameValue(index, this.arrayIndex, "Index mismatch in mapFn."); - array.splice(array.length - 1, 1); - return 127; +function mapFn(value, index) { + this.arrayIndex++; + assert.sameValue(value, array[this.arrayIndex], "Value mismatch in mapFn at index " + index + "."); + assert.sameValue(index, this.arrayIndex, "Index mismatch in mapFn."); + + array.splice(array.length - 1, 1); + return 127; } @@ -28,5 +29,5 @@ a = Array.from(array, mapFn, this); assert.sameValue(a.length, originalArray.length / 2, "Length mismatch. Old array : " + (originalArray.length / 2) + ". array : " + a.length + "."); for (var j = 0; j < originalArray.length / 2; j++) { - assert.sameValue(a[j], 127, "Element mismatch for mapped array at index " + j + "."); + assert.sameValue(a[j], 127, "Element mismatch for mapped array at index " + j + "."); } diff --git a/test/built-ins/Array/from/elements-updated-after.js b/test/built-ins/Array/from/elements-updated-after.js index 6c859e23ac..358e94b46e 100644 --- a/test/built-ins/Array/from/elements-updated-after.js +++ b/test/built-ins/Array/from/elements-updated-after.js @@ -7,21 +7,22 @@ esid: sec-array.from es6id: 22.1.2.1 ---*/ -var array = [ 127, 4, 8, 16, 32, 64, 128 ]; +var array = [127, 4, 8, 16, 32, 64, 128]; var arrayIndex = -1; -function mapFn(value, index) { - arrayIndex++; - if (index + 1 < array.length) { - array[index + 1] = 127; - } - assert.sameValue(value, 127, "Value mismatch in mapFn at index " + index + "."); - assert.sameValue(index, arrayIndex, "Index mismatch in mapFn."); - return value; +function mapFn(value, index) { + arrayIndex++; + if (index + 1 < array.length) { + array[index + 1] = 127; + } + assert.sameValue(value, 127, "Value mismatch in mapFn at index " + index + "."); + assert.sameValue(index, arrayIndex, "Index mismatch in mapFn."); + + return value; } var a = Array.from(array, mapFn); assert.sameValue(a.length, array.length, "Length mismatch."); for (var j = 0; j < a.length; j++) { - assert.sameValue(a[j], 127, "Element mismatch for mapped array."); + assert.sameValue(a[j], 127, "Element mismatch for mapped array."); } diff --git a/test/built-ins/Array/from/iter-cstm-ctor.js b/test/built-ins/Array/from/iter-cstm-ctor.js index dfd64566fc..d9a137695d 100644 --- a/test/built-ins/Array/from/iter-cstm-ctor.js +++ b/test/built-ins/Array/from/iter-cstm-ctor.js @@ -27,7 +27,9 @@ var items = {}; items[Symbol.iterator] = function() { return { next: function() { - return { done: true }; + return { + done: true + }; } }; }; diff --git a/test/built-ins/Array/from/iter-map-fn-args.js b/test/built-ins/Array/from/iter-map-fn-args.js index f63fec612f..56097d708c 100644 --- a/test/built-ins/Array/from/iter-map-fn-args.js +++ b/test/built-ins/Array/from/iter-map-fn-args.js @@ -26,8 +26,14 @@ features: [Symbol.iterator] ---*/ var args = []; -var firstResult = { done: false, value: {} }; -var secondResult = { done: false, value: {} }; +var firstResult = { + done: false, + value: {} +}; +var secondResult = { + done: false, + value: {} +}; var mapFn = function(value, idx) { args.push(arguments); }; @@ -40,7 +46,9 @@ items[Symbol.iterator] = function() { next: function() { var result = nextResult; nextResult = nextNextResult; - nextNextResult = { done: true }; + nextNextResult = { + done: true + }; return result; } diff --git a/test/built-ins/Array/from/iter-map-fn-return.js b/test/built-ins/Array/from/iter-map-fn-return.js index 58e175048f..484ce71746 100644 --- a/test/built-ins/Array/from/iter-map-fn-return.js +++ b/test/built-ins/Array/from/iter-map-fn-return.js @@ -25,8 +25,14 @@ features: [Symbol.iterator] ---*/ var thisVals = []; -var nextResult = { done: false, value: {} }; -var nextNextResult = { done: false, value: {} }; +var nextResult = { + done: false, + value: {} +}; +var nextNextResult = { + done: false, + value: {} +}; var firstReturnVal = {}; var secondReturnVal = {}; var mapFn = function(value, idx) { @@ -45,7 +51,9 @@ items[Symbol.iterator] = function() { next: function() { var result = nextResult; nextResult = nextNextResult; - nextNextResult = { done: true }; + nextNextResult = { + done: true + }; return result; } diff --git a/test/built-ins/Array/from/iter-map-fn-this-arg.js b/test/built-ins/Array/from/iter-map-fn-this-arg.js index 5e12157bb3..d10e9f8626 100644 --- a/test/built-ins/Array/from/iter-map-fn-this-arg.js +++ b/test/built-ins/Array/from/iter-map-fn-this-arg.js @@ -23,8 +23,14 @@ features: [Symbol.iterator] ---*/ var thisVals = []; -var nextResult = { done: false, value: {} }; -var nextNextResult = { done: false, value: {} }; +var nextResult = { + done: false, + value: {} +}; +var nextNextResult = { + done: false, + value: {} +}; var mapFn = function() { thisVals.push(this); }; @@ -36,7 +42,9 @@ items[Symbol.iterator] = function() { next: function() { var result = nextResult; nextResult = nextNextResult; - nextNextResult = { done: true }; + nextNextResult = { + done: true + }; return result; } diff --git a/test/built-ins/Array/from/iter-map-fn-this-non-strict.js b/test/built-ins/Array/from/iter-map-fn-this-non-strict.js index 81022307aa..0bb30453ea 100644 --- a/test/built-ins/Array/from/iter-map-fn-this-non-strict.js +++ b/test/built-ins/Array/from/iter-map-fn-this-non-strict.js @@ -24,20 +24,30 @@ flags: [noStrict] ---*/ var thisVals = []; -var nextResult = { done: false, value: {} }; -var nextNextResult = { done: false, value: {} }; +var nextResult = { + done: false, + value: {} +}; +var nextNextResult = { + done: false, + value: {} +}; var mapFn = function() { thisVals.push(this); }; var items = {}; -var global = function() { return this; }(); +var global = function() { + return this; +}(); items[Symbol.iterator] = function() { return { next: function() { var result = nextResult; nextResult = nextNextResult; - nextNextResult = { done: true }; + nextNextResult = { + done: true + }; return result; } diff --git a/test/built-ins/Array/from/iter-map-fn-this-strict.js b/test/built-ins/Array/from/iter-map-fn-this-strict.js index cfe576a5bb..d9a62dabc2 100644 --- a/test/built-ins/Array/from/iter-map-fn-this-strict.js +++ b/test/built-ins/Array/from/iter-map-fn-this-strict.js @@ -24,8 +24,14 @@ flags: [onlyStrict] ---*/ var thisVals = []; -var nextResult = { done: false, value: {} }; -var nextNextResult = { done: false, value: {} }; +var nextResult = { + done: false, + value: {} +}; +var nextNextResult = { + done: false, + value: {} +}; var mapFn = function() { thisVals.push(this); }; @@ -36,7 +42,9 @@ items[Symbol.iterator] = function() { next: function() { var result = nextResult; nextResult = nextNextResult; - nextNextResult = { done: true }; + nextNextResult = { + done: true + }; return result; } diff --git a/test/built-ins/Array/from/iter-set-elem-prop-err.js b/test/built-ins/Array/from/iter-set-elem-prop-err.js index 07f2c59422..2f23b4f0cf 100644 --- a/test/built-ins/Array/from/iter-set-elem-prop-err.js +++ b/test/built-ins/Array/from/iter-set-elem-prop-err.js @@ -18,11 +18,15 @@ features: [Symbol.iterator] ---*/ var C = function() { - Object.defineProperty(this, '0', { configurable: false }); + Object.defineProperty(this, '0', { + configurable: false + }); }; var closeCount = 0; var items = {}; -var nextResult = { done: false }; +var nextResult = { + done: false +}; items[Symbol.iterator] = function() { return { @@ -32,7 +36,9 @@ items[Symbol.iterator] = function() { next: function() { var result = nextResult; - nextResult = { done: true }; + nextResult = { + done: true + }; return result; } diff --git a/test/built-ins/Array/from/iter-set-elem-prop.js b/test/built-ins/Array/from/iter-set-elem-prop.js index 7658bdd13c..6f56116dbf 100644 --- a/test/built-ins/Array/from/iter-set-elem-prop.js +++ b/test/built-ins/Array/from/iter-set-elem-prop.js @@ -16,9 +16,18 @@ features: [Symbol.iterator] ---*/ var items = {}; -var firstIterResult = { done: false, value: {} }; -var secondIterResult = { done: false, value: {} }; -var thirdIterResult = { done: true, value: {} }; +var firstIterResult = { + done: false, + value: {} +}; +var secondIterResult = { + done: false, + value: {} +}; +var thirdIterResult = { + done: true, + value: {} +}; var nextIterResult = firstIterResult; var nextNextIterResult = secondIterResult; var result; diff --git a/test/built-ins/Array/from/iter-set-length-err.js b/test/built-ins/Array/from/iter-set-length-err.js index d15631db9b..4cd0e0001a 100644 --- a/test/built-ins/Array/from/iter-set-length-err.js +++ b/test/built-ins/Array/from/iter-set-length-err.js @@ -25,7 +25,11 @@ Object.defineProperty(C.prototype, 'length', { }); items[Symbol.iterator] = function() { return { - next: function() { return { done: true }; } + next: function() { + return { + done: true + }; + } }; }; diff --git a/test/built-ins/Array/from/iter-set-length.js b/test/built-ins/Array/from/iter-set-length.js index ab0e221bf6..c00ac5698f 100644 --- a/test/built-ins/Array/from/iter-set-length.js +++ b/test/built-ins/Array/from/iter-set-length.js @@ -29,13 +29,19 @@ items[Symbol.iterator] = function() { }; }; -nextIterResult = lastIterResult = { done: true }; +nextIterResult = lastIterResult = { + done: true +}; result = Array.from(items); assert.sameValue(result.length, 0); -nextIterResult = { done: false }; -lastIterResult = { done: true }; +nextIterResult = { + done: false +}; +lastIterResult = { + done: true +}; result = Array.from(items); assert.sameValue(result.length, 1); diff --git a/test/built-ins/Array/from/mapfn-throws-exception.js b/test/built-ins/Array/from/mapfn-throws-exception.js index a655126726..a87898bf85 100644 --- a/test/built-ins/Array/from/mapfn-throws-exception.js +++ b/test/built-ins/Array/from/mapfn-throws-exception.js @@ -7,9 +7,12 @@ esid: sec-array.from es6id: 22.1.2.1 ---*/ -var array = [ 2, 4, 8, 16, 32, 64, 128 ]; +var array = [2, 4, 8, 16, 32, 64, 128]; + function mapFn(value, index, obj) { - throw new Test262Error(); + throw new Test262Error(); } -assert.throws(Test262Error, function(){Array.from(array, mapFn);}); +assert.throws(Test262Error, function() { + Array.from(array, mapFn); +}); diff --git a/test/built-ins/Array/from/source-array-boundary.js b/test/built-ins/Array/from/source-array-boundary.js index 4c0587a320..9dad817293 100644 --- a/test/built-ins/Array/from/source-array-boundary.js +++ b/test/built-ins/Array/from/source-array-boundary.js @@ -7,14 +7,15 @@ esid: sec-array.from es6id: 22.1.2.1 ---*/ -var array = [ Number.MAX_VALUE, Number.MIN_VALUE, Number.NaN, Number.NEGATIVE_INFINITY, Number.POSITIVE_INFINITY ]; +var array = [Number.MAX_VALUE, Number.MIN_VALUE, Number.NaN, Number.NEGATIVE_INFINITY, Number.POSITIVE_INFINITY]; var arrayIndex = -1; -function mapFn(value, index) { - this.arrayIndex++; - assert.sameValue(value, array[this.arrayIndex], "Value mismatch in mapFn at index " + index + "."); - assert.sameValue(index, this.arrayIndex, "Index mismatch in mapFn."); - return value; +function mapFn(value, index) { + this.arrayIndex++; + assert.sameValue(value, array[this.arrayIndex], "Value mismatch in mapFn at index " + index + "."); + assert.sameValue(index, this.arrayIndex, "Index mismatch in mapFn."); + + return value; } var a = Array.from(array, mapFn, this); diff --git a/test/built-ins/Array/from/source-object-iterator-1.js b/test/built-ins/Array/from/source-object-iterator-1.js index 94834b5cf0..6ac364ac54 100644 --- a/test/built-ins/Array/from/source-object-iterator-1.js +++ b/test/built-ins/Array/from/source-object-iterator-1.js @@ -8,23 +8,25 @@ es6id: 22.1.2.1 features: [Symbol.iterator] ---*/ -var array = [ 2, 4, 8, 16, 32, 64, 128 ]; +var array = [2, 4, 8, 16, 32, 64, 128]; var obj = { - [Symbol.iterator]() { - return { - index: 0, - next() { - throw new Test262Error(); - }, - isDone : false, - get val() { - this.index++; - if (this.index > 7) { - this.isDone = true; - } - return 1 << this.index; - } - }; - } + [Symbol.iterator]() { + return { + index: 0, + next() { + throw new Test262Error(); + }, + isDone: false, + get val() { + this.index++; + if (this.index > 7) { + this.isDone = true; + } + return 1 << this.index; + } + }; + } }; -assert.throws(Test262Error, function(){Array.from(obj);}); +assert.throws(Test262Error, function() { + Array.from(obj); +}); diff --git a/test/built-ins/Array/from/source-object-iterator-2.js b/test/built-ins/Array/from/source-object-iterator-2.js index 9bcd570537..619405c347 100644 --- a/test/built-ins/Array/from/source-object-iterator-2.js +++ b/test/built-ins/Array/from/source-object-iterator-2.js @@ -8,30 +8,30 @@ es6id: 22.1.2.1 features: [Symbol.iterator] ---*/ -var array = [ 2, 4, 8, 16, 32, 64, 128 ]; +var array = [2, 4, 8, 16, 32, 64, 128]; var obj = { - [Symbol.iterator]() { + [Symbol.iterator]() { + return { + index: 0, + next() { return { - index: 0, - next() { - return { - value: this.val, - done: this.isDone - }; - }, - isDone : false, - get val() { - this.index++; - if (this.index > 7) { - this.isDone = true; - } - return 1 << this.index; - } + value: this.val, + done: this.isDone }; - } + }, + isDone: false, + get val() { + this.index++; + if (this.index > 7) { + this.isDone = true; + } + return 1 << this.index; + } + }; + } }; var a = Array.from.call(Object, obj); assert.sameValue(typeof a, typeof {}, "The returned type is expected to be object."); for (var j = 0; j < a.length; j++) { - assert.sameValue(a[j], array[j], "Elements mismatch at " + j + "."); + assert.sameValue(a[j], array[j], "Elements mismatch at " + j + "."); } diff --git a/test/built-ins/Array/from/source-object-length.js b/test/built-ins/Array/from/source-object-length.js index 75c46dfc4b..4127f5ec07 100644 --- a/test/built-ins/Array/from/source-object-length.js +++ b/test/built-ins/Array/from/source-object-length.js @@ -12,14 +12,14 @@ es6id: 22.1.2.1 var array = [2, 4, 0, 16]; var expectedArray = [2, 4, , 16]; var obj = { - length : 4, - 0 : 2, - 1 : 4, - 2 : 0, - 3 : 16 + length: 4, + 0: 2, + 1: 4, + 2: 0, + 3: 16 }; delete obj[2]; var a = Array.from(obj); for (var j = 0; j < expectedArray.length; j++) { - assert.sameValue(a[j], expectedArray[j], "Elements mismatch at " + j + "."); + assert.sameValue(a[j], expectedArray[j], "Elements mismatch at " + j + "."); } diff --git a/test/built-ins/Array/from/source-object-missing.js b/test/built-ins/Array/from/source-object-missing.js index ad5a6055dc..3c55030dac 100644 --- a/test/built-ins/Array/from/source-object-missing.js +++ b/test/built-ins/Array/from/source-object-missing.js @@ -9,14 +9,14 @@ es6id: 22.1.2.1 var array = [2, 4, , 16]; var obj = { - length: 4, - 0: 2, - 1: 4, - 3: 16 + length: 4, + 0: 2, + 1: 4, + 3: 16 }; var a = Array.from.call(Object, obj); assert.sameValue(typeof a, "object", "The returned type is expected to be object."); for (var j = 0; j < a.length; j++) { - assert.sameValue(a[j], array[j], "Elements mismatch at " + j + "."); + assert.sameValue(a[j], array[j], "Elements mismatch at " + j + "."); } diff --git a/test/built-ins/Array/from/source-object-without.js b/test/built-ins/Array/from/source-object-without.js index 96ec31c25a..fbb1877822 100644 --- a/test/built-ins/Array/from/source-object-without.js +++ b/test/built-ins/Array/from/source-object-without.js @@ -8,10 +8,10 @@ es6id: 22.1.2.1 ---*/ var obj = { - 0: 2, - 1: 4, - 2: 8, - 3: 16 + 0: 2, + 1: 4, + 2: 8, + 3: 16 } var a = Array.from(obj); diff --git a/test/built-ins/Array/isArray/15.4.3.2-0-4.js b/test/built-ins/Array/isArray/15.4.3.2-0-4.js index f422cc1442..79302299fb 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-0-4.js +++ b/test/built-ins/Array/isArray/15.4.3.2-0-4.js @@ -7,12 +7,12 @@ es5id: 15.4.3.2-0-4 description: Array.isArray return false if its argument is not an Array ---*/ -var b_num = Array.isArray(42); +var b_num = Array.isArray(42); var b_undef = Array.isArray(undefined); -var b_bool = Array.isArray(true); -var b_str = Array.isArray("abc"); -var b_obj = Array.isArray({}); -var b_null = Array.isArray(null); +var b_bool = Array.isArray(true); +var b_str = Array.isArray("abc"); +var b_obj = Array.isArray({}); +var b_null = Array.isArray(null); assert.sameValue(b_num, false, 'b_num'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-1-13.js b/test/built-ins/Array/isArray/15.4.3.2-1-13.js index 9a55d9a0c6..cbc0721a67 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-1-13.js +++ b/test/built-ins/Array/isArray/15.4.3.2-1-13.js @@ -10,7 +10,7 @@ description: Array.isArray applied to Arguments object var arg; (function fun() { - arg = arguments; + arg = arguments; }(1, 2, 3)); assert.sameValue(Array.isArray(arg), false, 'Array.isArray(arg)'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-1-7.js b/test/built-ins/Array/isArray/15.4.3.2-1-7.js index 6f807595c9..412226c330 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-1-7.js +++ b/test/built-ins/Array/isArray/15.4.3.2-1-7.js @@ -7,4 +7,4 @@ es5id: 15.4.3.2-1-7 description: Array.isArray applied to Function object ---*/ -assert.sameValue(Array.isArray(function () { }), false, 'Array.isArray(function () { })'); +assert.sameValue(Array.isArray(function() {}), false, 'Array.isArray(function () { })'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-2-1.js b/test/built-ins/Array/isArray/15.4.3.2-2-1.js index 302f9cbe81..d0a5ed7fca 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-2-1.js +++ b/test/built-ins/Array/isArray/15.4.3.2-2-1.js @@ -8,7 +8,7 @@ description: Array.isArray applied to an object with an array as the prototype ---*/ var proto = []; -var Con = function () { }; +var Con = function() {}; Con.prototype = proto; var child = new Con(); diff --git a/test/built-ins/Array/isArray/15.4.3.2-2-2.js b/test/built-ins/Array/isArray/15.4.3.2-2-2.js index 84a6e929ea..d0bec2d468 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-2-2.js +++ b/test/built-ins/Array/isArray/15.4.3.2-2-2.js @@ -9,10 +9,10 @@ description: > prototype ---*/ - var proto = Array.prototype; - var Con = function () { }; - Con.prototype = proto; +var proto = Array.prototype; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); +var child = new Con(); assert.sameValue(Array.isArray(child), false, 'Array.isArray(child)'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-2-3.js b/test/built-ins/Array/isArray/15.4.3.2-2-3.js index 626e837206..02da7c1431 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-2-3.js +++ b/test/built-ins/Array/isArray/15.4.3.2-2-3.js @@ -9,4 +9,8 @@ description: > indexed properties ---*/ -assert.sameValue(Array.isArray({ 0: 12, 1: 9, length: 2 }), false, 'Array.isArray({ 0: 12, 1: 9, length: 2 })'); +assert.sameValue(Array.isArray({ + 0: 12, + 1: 9, + length: 2 +}), false, 'Array.isArray({ 0: 12, 1: 9, length: 2 })'); diff --git a/test/built-ins/Array/length/15.4.5.1-3.d-1.js b/test/built-ins/Array/length/15.4.5.1-3.d-1.js index 651cf5c117..9525856720 100644 --- a/test/built-ins/Array/length/15.4.5.1-3.d-1.js +++ b/test/built-ins/Array/length/15.4.5.1-3.d-1.js @@ -11,5 +11,5 @@ description: > assert.throws(RangeError, function() { - [].length = 4294967296 ; + [].length = 4294967296; }); diff --git a/test/built-ins/Array/length/15.4.5.1-3.d-2.js b/test/built-ins/Array/length/15.4.5.1-3.d-2.js index 7e1dc6a255..2162edb4a2 100644 --- a/test/built-ins/Array/length/15.4.5.1-3.d-2.js +++ b/test/built-ins/Array/length/15.4.5.1-3.d-2.js @@ -11,5 +11,5 @@ description: > assert.throws(RangeError, function() { - [].length = 4294967297 ; + [].length = 4294967297; }); diff --git a/test/built-ins/Array/length/15.4.5.1-3.d-3.js b/test/built-ins/Array/length/15.4.5.1-3.d-3.js index 38e3542247..7c03867da7 100644 --- a/test/built-ins/Array/length/15.4.5.1-3.d-3.js +++ b/test/built-ins/Array/length/15.4.5.1-3.d-3.js @@ -7,7 +7,7 @@ es5id: 15.4.5.1-3.d-3 description: Set array length property to max value 4294967295 (2**32-1,) ---*/ - var a =[]; - a.length = 4294967295 ; +var a = []; +a.length = 4294967295; assert.sameValue(a.length, 4294967295, 'a.length'); diff --git a/test/built-ins/Array/length/S15.4.2.2_A2.2_T1.js b/test/built-ins/Array/length/S15.4.2.2_A2.2_T1.js index 0b659bf9bc..d0c216a967 100644 --- a/test/built-ins/Array/length/S15.4.2.2_A2.2_T1.js +++ b/test/built-ins/Array/length/S15.4.2.2_A2.2_T1.js @@ -14,7 +14,7 @@ description: Use try statement. len = -1, 4294967296, 4294967297 try { new Array(-1); $ERROR('#1.1: new Array(-1) throw RangeError. Actual: ' + (new Array(-1))); -} catch(e) { +} catch (e) { if ((e instanceof RangeError) !== true) { $ERROR('#1.2: new Array(-1) throw RangeError. Actual: ' + (e)); } @@ -24,7 +24,7 @@ try { try { new Array(4294967296); $ERROR('#2.1: new Array(4294967296) throw RangeError. Actual: ' + (new Array(4294967296))); -} catch(e) { +} catch (e) { if ((e instanceof RangeError) !== true) { $ERROR('#2.2: new Array(4294967296) throw RangeError. Actual: ' + (e)); } @@ -34,7 +34,7 @@ try { try { new Array(4294967297); $ERROR('#3.1: new Array(4294967297) throw RangeError. Actual: ' + (new Array(4294967297))); -} catch(e) { +} catch (e) { if ((e instanceof RangeError) !== true) { $ERROR('#3.2: new Array(4294967297) throw RangeError. Actual: ' + (e)); } diff --git a/test/built-ins/Array/length/S15.4.2.2_A2.2_T2.js b/test/built-ins/Array/length/S15.4.2.2_A2.2_T2.js index abe3b60e71..3c117d19c6 100644 --- a/test/built-ins/Array/length/S15.4.2.2_A2.2_T2.js +++ b/test/built-ins/Array/length/S15.4.2.2_A2.2_T2.js @@ -14,7 +14,7 @@ description: Use try statement. len = NaN, +/-Infinity try { new Array(NaN); $ERROR('#1.1: new Array(NaN) throw RangeError. Actual: ' + (new Array(NaN))); -} catch(e) { +} catch (e) { if ((e instanceof RangeError) !== true) { $ERROR('#1.2: new Array(NaN) throw RangeError. Actual: ' + (e)); } @@ -24,7 +24,7 @@ try { try { new Array(Number.POSITIVE_INFINITY); $ERROR('#2.1: new Array(Number.POSITIVE_INFINITY) throw RangeError. Actual: ' + (new Array(Number.POSITIVE_INFINITY))); -} catch(e) { +} catch (e) { if ((e instanceof RangeError) !== true) { $ERROR('#2.2: new Array(Number.POSITIVE_INFINITY) throw RangeError. Actual: ' + (e)); } @@ -34,7 +34,7 @@ try { try { new Array(Number.NEGATIVE_INFINITY); $ERROR('#3.1: new Array(Number.NEGATIVE_INFINITY) throw RangeError. Actual: ' + (new Array(Number.NEGATIVE_INFINITY))); -} catch(e) { +} catch (e) { if ((e instanceof RangeError) !== true) { $ERROR('#3.2: new Array(Number.NEGATIVE_INFINITY) throw RangeError. Actual: ' + (e)); } diff --git a/test/built-ins/Array/length/S15.4.2.2_A2.2_T3.js b/test/built-ins/Array/length/S15.4.2.2_A2.2_T3.js index 9822c925c3..6cd2130372 100644 --- a/test/built-ins/Array/length/S15.4.2.2_A2.2_T3.js +++ b/test/built-ins/Array/length/S15.4.2.2_A2.2_T3.js @@ -14,7 +14,7 @@ description: Use try statement. len = 1.5, Number.MAX_VALUE, Number.MIN_VALUE try { new Array(1.5); $ERROR('#1.1: new Array(1.5) throw RangeError. Actual: ' + (new Array(1.5))); -} catch(e) { +} catch (e) { if ((e instanceof RangeError) !== true) { $ERROR('#1.2: new Array(1.5) throw RangeError. Actual: ' + (e)); } @@ -24,7 +24,7 @@ try { try { new Array(Number.MAX_VALUE); $ERROR('#2.1: new Array(Number.MAX_VALUE) throw RangeError. Actual: ' + (new Array(Number.MAX_VALUE))); -} catch(e) { +} catch (e) { if ((e instanceof RangeError) !== true) { $ERROR('#2.2: new Array(Number.MAX_VALUE) throw RangeError. Actual: ' + (e)); } @@ -34,7 +34,7 @@ try { try { new Array(Number.MIN_VALUE); $ERROR('#3.1: new Array(Number.MIN_VALUE) throw RangeError. Actual: ' + (new Array(Number.MIN_VALUE))); -} catch(e) { +} catch (e) { if ((e instanceof RangeError) !== true) { $ERROR('#3.2: new Array(Number.MIN_VALUE) throw RangeError. Actual: ' + (e)); } diff --git a/test/built-ins/Array/length/S15.4.5.1_A1.1_T1.js b/test/built-ins/Array/length/S15.4.5.1_A1.1_T1.js index 7435827c66..c09ba6e72f 100644 --- a/test/built-ins/Array/length/S15.4.5.1_A1.1_T1.js +++ b/test/built-ins/Array/length/S15.4.5.1_A1.1_T1.js @@ -13,7 +13,7 @@ try { var x = []; x.length = 4294967296; $ERROR('#1.1: x = []; x.length = 4294967296 throw RangeError. Actual: x.length === ' + (x.length)); -} catch(e) { +} catch (e) { if ((e instanceof RangeError) !== true) { $ERROR('#1.2: x = []; x.length = 4294967296 throw RangeError. Actual: ' + (e)); } @@ -24,7 +24,7 @@ try { x = []; x.length = -1; $ERROR('#2.1: x = []; x.length = -1 throw RangeError. Actual: x.length === ' + (x.length)); -} catch(e) { +} catch (e) { if ((e instanceof RangeError) !== true) { $ERROR('#2.2: x = []; x.length = -1 throw RangeError. Actual: ' + (e)); } @@ -35,7 +35,7 @@ try { x = []; x.length = 1.5; $ERROR('#3.1: x = []; x.length = 1.5 throw RangeError. Actual: x.length === ' + (x.length)); -} catch(e) { +} catch (e) { if ((e instanceof RangeError) !== true) { $ERROR('#3.2: x = []; x.length = 1.5 throw RangeError. Actual: ' + (e)); } diff --git a/test/built-ins/Array/length/S15.4.5.1_A1.1_T2.js b/test/built-ins/Array/length/S15.4.5.1_A1.1_T2.js index 55ce904877..e8ac8faa90 100644 --- a/test/built-ins/Array/length/S15.4.5.1_A1.1_T2.js +++ b/test/built-ins/Array/length/S15.4.5.1_A1.1_T2.js @@ -13,7 +13,7 @@ try { var x = []; x.length = NaN; $ERROR('#1.1: x = []; x.length = NaN throw RangeError. Actual: x.length === ' + (x.length)); -} catch(e) { +} catch (e) { if ((e instanceof RangeError) !== true) { $ERROR('#1.2: x = []; x.length = NaN throw RangeError. Actual: ' + (e)); } @@ -24,7 +24,7 @@ try { x = []; x.length = Number.POSITIVE_INFINITY; $ERROR('#2.1: x = []; x.length = Number.POSITIVE_INFINITY throw RangeError. Actual: x.length === ' + (x.length)); -} catch(e) { +} catch (e) { if ((e instanceof RangeError) !== true) { $ERROR('#2.2: x = []; x.length = Number.POSITIVE_INFINITY throw RangeError. Actual: ' + (e)); } @@ -35,7 +35,7 @@ try { x = []; x.length = Number.NEGATIVE_INFINITY; $ERROR('#3.1: x = []; x.length = Number.NEGATIVE_INFINITY throw RangeError. Actual: x.length === ' + (x.length)); -} catch(e) { +} catch (e) { if ((e instanceof RangeError) !== true) { $ERROR('#3.2: x = []; x.length = Number.NEGATIVE_INFINITY throw RangeError. Actual: ' + (e)); } @@ -46,7 +46,7 @@ try { x = []; x.length = undefined; $ERROR('#4.1: x = []; x.length = undefined throw RangeError. Actual: x.length === ' + (x.length)); -} catch(e) { +} catch (e) { if ((e instanceof RangeError) !== true) { $ERROR('#4.2: x = []; x.length = undefined throw RangeError. Actual: ' + (e)); } diff --git a/test/built-ins/Array/length/S15.4.5.1_A1.2_T1.js b/test/built-ins/Array/length/S15.4.5.1_A1.2_T1.js index d213067fe7..24bccec08f 100644 --- a/test/built-ins/Array/length/S15.4.5.1_A1.2_T1.js +++ b/test/built-ins/Array/length/S15.4.5.1_A1.2_T1.js @@ -13,7 +13,7 @@ description: Change length of array ---*/ //CHECK#1 -var x = [0,,2,,4]; +var x = [0, , 2, , 4]; x.length = 4; if (x[4] !== undefined) { $ERROR('#1: x = [0,,2,,4]; x.length = 4; x[4] === undefined. Actual: ' + (x[4])); diff --git a/test/built-ins/Array/length/S15.4.5.1_A1.2_T3.js b/test/built-ins/Array/length/S15.4.5.1_A1.2_T3.js index 0594a6b6a1..f9800a66e3 100644 --- a/test/built-ins/Array/length/S15.4.5.1_A1.2_T3.js +++ b/test/built-ins/Array/length/S15.4.5.1_A1.2_T3.js @@ -14,7 +14,7 @@ description: Checking an inherited property //CHECK#1 Array.prototype[2] = 2; -var x = [0,1]; +var x = [0, 1]; x.length = 3; if (x.hasOwnProperty('2') !== false) { $ERROR('#1: Array.prototype[2] = 2; x = [0,1]; x.length = 3; x.hasOwnProperty(\'2\') === false. Actual: ' + (x.hasOwnProperty('2'))); diff --git a/test/built-ins/Array/length/S15.4.5.1_A1.3_T2.js b/test/built-ins/Array/length/S15.4.5.1_A1.3_T2.js index c9b7615f95..5344842318 100644 --- a/test/built-ins/Array/length/S15.4.5.1_A1.3_T2.js +++ b/test/built-ins/Array/length/S15.4.5.1_A1.3_T2.js @@ -10,21 +10,39 @@ description: Uint32 use ToNumber and ToPrimitve //CHECK#1 var x = []; -x.length = {valueOf: function() {return 2}}; +x.length = { + valueOf: function() { + return 2 + } +}; if (x.length !== 2) { $ERROR('#1: x = []; x.length = {valueOf: function() {return 2}}; x.length === 2. Actual: ' + (x.length)); } //CHECK#2 x = []; -x.length = {valueOf: function() {return 2}, toString: function() {return 1}}; +x.length = { + valueOf: function() { + return 2 + }, + toString: function() { + return 1 + } +}; if (x.length !== 2) { $ERROR('#0: x = []; x.length = {valueOf: function() {return 2}, toString: function() {return 1}}; x.length === 2. Actual: ' + (x.length)); } //CHECK#3 x = []; -x.length = {valueOf: function() {return 2}, toString: function() {return {}}}; +x.length = { + valueOf: function() { + return 2 + }, + toString: function() { + return {} + } +}; if (x.length !== 2) { $ERROR('#3: x = []; x.length = {valueOf: function() {return 2}, toString: function() {return {}}}; x.length === 2. Actual: ' + (x.length)); } @@ -32,7 +50,14 @@ if (x.length !== 2) { //CHECK#4 try { x = []; - x.length = {valueOf: function() {return 2}, toString: function() {throw "error"}}; + x.length = { + valueOf: function() { + return 2 + }, + toString: function() { + throw "error" + } + }; if (x.length !== 2) { $ERROR('#4.1: x = []; x.length = {valueOf: function() {return 2}, toString: function() {throw "error"}}; x.length === ",". Actual: ' + (x.length)); } @@ -47,14 +72,25 @@ catch (e) { //CHECK#5 x = []; -x.length = {toString: function() {return 1}}; +x.length = { + toString: function() { + return 1 + } +}; if (x.length !== 1) { $ERROR('#5: x = []; x.length = {toString: function() {return 1}}; x.length === 1. Actual: ' + (x.length)); } //CHECK#6 x = []; -x.length = {valueOf: function() {return {}}, toString: function() {return 1}} +x.length = { + valueOf: function() { + return {} + }, + toString: function() { + return 1 + } +} if (x.length !== 1) { $ERROR('#6: x = []; x.length = {valueOf: function() {return {}}, toString: function() {return 1}}; x.length === 1. Actual: ' + (x.length)); } @@ -62,7 +98,14 @@ if (x.length !== 1) { //CHECK#7 try { x = []; - x.length = {valueOf: function() {throw "error"}, toString: function() {return 1}}; + x.length = { + valueOf: function() { + throw "error" + }, + toString: function() { + return 1 + } + }; x.length; $ERROR('#7.1: x = []; x.length = {valueOf: function() {throw "error"}, toString: function() {return 1}}; x.length throw "error". Actual: ' + (x.length)); } @@ -75,7 +118,14 @@ catch (e) { //CHECK#8 try { x = []; - x.length = {valueOf: function() {return {}}, toString: function() {return {}}}; + x.length = { + valueOf: function() { + return {} + }, + toString: function() { + return {} + } + }; x.length; $ERROR('#8.1: x = []; x.length = {valueOf: function() {return {}}, toString: function() {return {}}} x.length throw TypeError. Actual: ' + (x.length)); } diff --git a/test/built-ins/Array/length/S15.4.5.2_A3_T4.js b/test/built-ins/Array/length/S15.4.5.2_A3_T4.js index 1bcbb6f975..afd9985b10 100644 --- a/test/built-ins/Array/length/S15.4.5.2_A3_T4.js +++ b/test/built-ins/Array/length/S15.4.5.2_A3_T4.js @@ -13,7 +13,7 @@ description: > ---*/ //CHECK#1 -var x = [0,1,2]; +var x = [0, 1, 2]; x[4294967294] = 4294967294; x.length = 2; diff --git a/test/built-ins/Array/prototype/concat/15.4.4.4-5-b-iii-3-b-1.js b/test/built-ins/Array/prototype/concat/15.4.4.4-5-b-iii-3-b-1.js index 121bcd6df9..3910be2f08 100644 --- a/test/built-ins/Array/prototype/concat/15.4.4.4-5-b-iii-3-b-1.js +++ b/test/built-ins/Array/prototype/concat/15.4.4.4-5-b-iii-3-b-1.js @@ -9,33 +9,33 @@ description: > (read-only) exists in Array.prototype (Step 5.b.iii.3.b) ---*/ - Object.defineProperty(Array.prototype, "0", { - value: 100, - writable: false, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + value: 100, + writable: false, + configurable: true +}); - var oldArr = [101]; +var oldArr = [101]; - var newArr = Array.prototype.concat.call(oldArr); +var newArr = Array.prototype.concat.call(oldArr); - var verifyValue = false; - verifyValue = newArr[0] === 101; +var verifyValue = false; +verifyValue = newArr[0] === 101; - var verifyEnumerable = false; - for (var p in newArr) { - if (p === "0" && newArr.hasOwnProperty("0")) { - verifyEnumerable = true; - } - } +var verifyEnumerable = false; +for (var p in newArr) { + if (p === "0" && newArr.hasOwnProperty("0")) { + verifyEnumerable = true; + } +} - var verifyWritable = false; - newArr[0] = 12; - verifyWritable = newArr[0] === 12; +var verifyWritable = false; +newArr[0] = 12; +verifyWritable = newArr[0] === 12; - var verifyConfigurable = false; - delete newArr[0]; - verifyConfigurable = newArr.hasOwnProperty("0"); +var verifyConfigurable = false; +delete newArr[0]; +verifyConfigurable = newArr.hasOwnProperty("0"); assert(verifyValue, 'verifyValue !== true'); assert.sameValue(verifyConfigurable, false, 'verifyConfigurable'); diff --git a/test/built-ins/Array/prototype/concat/15.4.4.4-5-c-i-1.js b/test/built-ins/Array/prototype/concat/15.4.4.4-5-c-i-1.js index f51ca7107e..61ecb1a260 100644 --- a/test/built-ins/Array/prototype/concat/15.4.4.4-5-c-i-1.js +++ b/test/built-ins/Array/prototype/concat/15.4.4.4-5-c-i-1.js @@ -9,35 +9,35 @@ description: > (read-only) exists in Array.prototype (Step 5.c.i) ---*/ - Object.defineProperty(Array.prototype, "0", { - value: 100, - writable: false, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + value: 100, + writable: false, + configurable: true +}); - var newArr = Array.prototype.concat.call(101); +var newArr = Array.prototype.concat.call(101); - var hasProperty = newArr.hasOwnProperty("0"); +var hasProperty = newArr.hasOwnProperty("0"); - var instanceOfVerify = typeof newArr[0]==="object"; +var instanceOfVerify = typeof newArr[0] === "object"; - var verifyValue = false; - verifyValue = newArr[0] == 101; +var verifyValue = false; +verifyValue = newArr[0] == 101; - var verifyEnumerable = false; - for (var p in newArr) { - if (p === "0" && newArr.hasOwnProperty("0")) { - verifyEnumerable = true; - } - } +var verifyEnumerable = false; +for (var p in newArr) { + if (p === "0" && newArr.hasOwnProperty("0")) { + verifyEnumerable = true; + } +} - var verifyWritable = false; - newArr[0] = 12; - verifyWritable = newArr[0] === 12; +var verifyWritable = false; +newArr[0] = 12; +verifyWritable = newArr[0] === 12; - var verifyConfigurable = false; - delete newArr[0]; - verifyConfigurable = newArr.hasOwnProperty("0"); +var verifyConfigurable = false; +delete newArr[0]; +verifyConfigurable = newArr.hasOwnProperty("0"); assert(hasProperty, 'hasProperty !== true'); assert(instanceOfVerify, 'instanceOfVerify !== true'); diff --git a/test/built-ins/Array/prototype/concat/Array.prototype.concat_array-like-length-to-string-throws.js b/test/built-ins/Array/prototype/concat/Array.prototype.concat_array-like-length-to-string-throws.js index 00fea1dd7a..3baf72a4a6 100644 --- a/test/built-ins/Array/prototype/concat/Array.prototype.concat_array-like-length-to-string-throws.js +++ b/test/built-ins/Array/prototype/concat/Array.prototype.concat_array-like-length-to-string-throws.js @@ -10,9 +10,11 @@ features: [Symbol.isConcatSpreadable] ---*/ function MyError() {} var obj = { - "length": { toString: function() { + "length": { + toString: function() { throw new MyError(); - }, valueOf: null + }, + valueOf: null }, "1": "A", "3": "B", diff --git a/test/built-ins/Array/prototype/concat/Array.prototype.concat_array-like-primitive-non-number-length.js b/test/built-ins/Array/prototype/concat/Array.prototype.concat_array-like-primitive-non-number-length.js index 14de922be8..82cf5a7677 100644 --- a/test/built-ins/Array/prototype/concat/Array.prototype.concat_array-like-primitive-non-number-length.js +++ b/test/built-ins/Array/prototype/concat/Array.prototype.concat_array-like-primitive-non-number-length.js @@ -15,7 +15,17 @@ var obj = { "5": "C" }; obj[Symbol.isConcatSpreadable] = true; -obj.length = {toString: function() { return "SIX"; }, valueOf: null }; +obj.length = { + toString: function() { + return "SIX"; + }, + valueOf: null +}; assert(compareArray([].concat(obj), [])); -obj.length = {toString: null, valueOf: function() { return "SIX"; } }; +obj.length = { + toString: null, + valueOf: function() { + return "SIX"; + } +}; assert(compareArray([].concat(obj), [])); diff --git a/test/built-ins/Array/prototype/concat/Array.prototype.concat_array-like-string-length.js b/test/built-ins/Array/prototype/concat/Array.prototype.concat_array-like-string-length.js index 1c63b62f4c..8b94d65940 100644 --- a/test/built-ins/Array/prototype/concat/Array.prototype.concat_array-like-string-length.js +++ b/test/built-ins/Array/prototype/concat/Array.prototype.concat_array-like-string-length.js @@ -16,7 +16,12 @@ var obj = { "5": "C" }; obj[Symbol.isConcatSpreadable] = true; -var obj2 = { length: 3, "0": "0", "1": "1", "2": "2" }; +var obj2 = { + length: 3, + "0": "0", + "1": "1", + "2": "2" +}; var arr = ["X", "Y", "Z"]; var expected = [ diff --git a/test/built-ins/Array/prototype/concat/Array.prototype.concat_array-like-to-length-throws.js b/test/built-ins/Array/prototype/concat/Array.prototype.concat_array-like-to-length-throws.js index 0322eaf1e2..907a30b7b3 100644 --- a/test/built-ins/Array/prototype/concat/Array.prototype.concat_array-like-to-length-throws.js +++ b/test/built-ins/Array/prototype/concat/Array.prototype.concat_array-like-to-length-throws.js @@ -9,13 +9,21 @@ description: Array.prototype.concat array like to length throws features: [Symbol.isConcatSpreadable] ---*/ var obj = { - "length": {valueOf: null, toString: null}, + "length": { + valueOf: null, + toString: null + }, "1": "A", "3": "B", "5": "C" }; obj[Symbol.isConcatSpreadable] = true; -var obj2 = { length: 3, "0": "0", "1": "1", "2": "2" }; +var obj2 = { + length: 3, + "0": "0", + "1": "1", + "2": "2" +}; var arr = ["X", "Y", "Z"]; assert.throws(TypeError, function() { Array.prototype.concat.call(obj, obj2, arr); diff --git a/test/built-ins/Array/prototype/concat/Array.prototype.concat_array-like.js b/test/built-ins/Array/prototype/concat/Array.prototype.concat_array-like.js index 3b747f931f..bfdf3c8e9d 100644 --- a/test/built-ins/Array/prototype/concat/Array.prototype.concat_array-like.js +++ b/test/built-ins/Array/prototype/concat/Array.prototype.concat_array-like.js @@ -17,7 +17,12 @@ var obj = { "5": "C" }; obj[Symbol.isConcatSpreadable] = true; -var obj2 = { length: 3, "0": "0", "1": "1", "2": "2" }; +var obj2 = { + length: 3, + "0": "0", + "1": "1", + "2": "2" +}; var arr = ["X", "Y", "Z"]; var expected = [ diff --git a/test/built-ins/Array/prototype/concat/Array.prototype.concat_holey-sloppy-arguments.js b/test/built-ins/Array/prototype/concat/Array.prototype.concat_holey-sloppy-arguments.js index d8bab8d4af..44082769bb 100644 --- a/test/built-ins/Array/prototype/concat/Array.prototype.concat_holey-sloppy-arguments.js +++ b/test/built-ins/Array/prototype/concat/Array.prototype.concat_holey-sloppy-arguments.js @@ -10,7 +10,9 @@ description: Array.prototype.concat holey sloppy arguments includes: [compareArray.js] features: [Symbol.isConcatSpreadable] ---*/ -var args = (function(a) { return arguments; })(1,2,3); +var args = (function(a) { + return arguments; +})(1, 2, 3); delete args[1]; args[Symbol.isConcatSpreadable] = true; assert(compareArray([1, void 0, 3, 1, void 0, 3], [].concat(args, args))); diff --git a/test/built-ins/Array/prototype/concat/Array.prototype.concat_large-typed-array.js b/test/built-ins/Array/prototype/concat/Array.prototype.concat_large-typed-array.js index dcf5939078..cb37746a29 100644 --- a/test/built-ins/Array/prototype/concat/Array.prototype.concat_large-typed-array.js +++ b/test/built-ins/Array/prototype/concat/Array.prototype.concat_large-typed-array.js @@ -31,7 +31,9 @@ function concatTypedArray(type, elems, modulo) { var expected = new Array(4000); expected[0] = defValue; - Object.defineProperty(ta, "length", { value: 4000 }); + Object.defineProperty(ta, "length", { + value: 4000 + }); ta[Symbol.isConcatSpreadable] = true; assert(compareArray([].concat(ta), expected)); } diff --git a/test/built-ins/Array/prototype/concat/Array.prototype.concat_length-throws.js b/test/built-ins/Array/prototype/concat/Array.prototype.concat_length-throws.js index 3aef5b7827..c040d94a1f 100644 --- a/test/built-ins/Array/prototype/concat/Array.prototype.concat_length-throws.js +++ b/test/built-ins/Array/prototype/concat/Array.prototype.concat_length-throws.js @@ -13,7 +13,9 @@ function MyError() {} var obj = {}; obj[Symbol.isConcatSpreadable] = true; Object.defineProperty(obj, "length", { - get: function() { throw new MyError(); } + get: function() { + throw new MyError(); + } }); assert.throws(MyError, function() { diff --git a/test/built-ins/Array/prototype/concat/Array.prototype.concat_non-array.js b/test/built-ins/Array/prototype/concat/Array.prototype.concat_non-array.js index f6ed9cf11a..bd080ee42b 100644 --- a/test/built-ins/Array/prototype/concat/Array.prototype.concat_non-array.js +++ b/test/built-ins/Array/prototype/concat/Array.prototype.concat_non-array.js @@ -19,8 +19,8 @@ class NonArray { } } -var obj = new NonArray(1,2,3); +var obj = new NonArray(1, 2, 3); var result = Array.prototype.concat.call(obj, 4, 5, 6); assert.sameValue(Array, result.constructor); assert.sameValue(result instanceof NonArray, false); -assert(compareArray(result, [obj,4,5,6])); +assert(compareArray(result, [obj, 4, 5, 6])); diff --git a/test/built-ins/Array/prototype/concat/Array.prototype.concat_sloppy-arguments-throws.js b/test/built-ins/Array/prototype/concat/Array.prototype.concat_sloppy-arguments-throws.js index 8aefe98daf..605330051c 100644 --- a/test/built-ins/Array/prototype/concat/Array.prototype.concat_sloppy-arguments-throws.js +++ b/test/built-ins/Array/prototype/concat/Array.prototype.concat_sloppy-arguments-throws.js @@ -10,9 +10,13 @@ description: Array.prototype.concat sloppy arguments throws features: [Symbol.isConcatSpreadable] ---*/ function MyError() {} -var args = (function(a) { return arguments; })(1,2,3); +var args = (function(a) { + return arguments; +})(1, 2, 3); Object.defineProperty(args, 0, { - get: function() { throw new MyError(); } + get: function() { + throw new MyError(); + } }); args[Symbol.isConcatSpreadable] = true; assert.throws(MyError, function() { diff --git a/test/built-ins/Array/prototype/concat/Array.prototype.concat_sloppy-arguments-with-dupes.js b/test/built-ins/Array/prototype/concat/Array.prototype.concat_sloppy-arguments-with-dupes.js index effb606b31..a6bca8a0d2 100644 --- a/test/built-ins/Array/prototype/concat/Array.prototype.concat_sloppy-arguments-with-dupes.js +++ b/test/built-ins/Array/prototype/concat/Array.prototype.concat_sloppy-arguments-with-dupes.js @@ -11,9 +11,13 @@ flags: [noStrict] includes: [compareArray.js] features: [Symbol.isConcatSpreadable] ---*/ -var args = (function(a, a, a) { return arguments; })(1,2,3); +var args = (function(a, a, a) { + return arguments; +})(1, 2, 3); args[Symbol.isConcatSpreadable] = true; assert(compareArray([].concat(args, args), [1, 2, 3, 1, 2, 3])); -Object.defineProperty(args, "length", { value: 6 }); +Object.defineProperty(args, "length", { + value: 6 +}); assert(compareArray([].concat(args), [1, 2, 3, void 0, void 0, void 0])); diff --git a/test/built-ins/Array/prototype/concat/Array.prototype.concat_sloppy-arguments.js b/test/built-ins/Array/prototype/concat/Array.prototype.concat_sloppy-arguments.js index d805456206..54e80acef2 100644 --- a/test/built-ins/Array/prototype/concat/Array.prototype.concat_sloppy-arguments.js +++ b/test/built-ins/Array/prototype/concat/Array.prototype.concat_sloppy-arguments.js @@ -10,9 +10,13 @@ description: Array.prototype.concat sloppy arguments includes: [compareArray.js] features: [Symbol.isConcatSpreadable] ---*/ -var args = (function(a, b, c) { return arguments; })(1,2,3); +var args = (function(a, b, c) { + return arguments; +})(1, 2, 3); args[Symbol.isConcatSpreadable] = true; assert(compareArray([].concat(args, args), [1, 2, 3, 1, 2, 3])); -Object.defineProperty(args, "length", { value: 6 }); +Object.defineProperty(args, "length", { + value: 6 +}); assert(compareArray([].concat(args), [1, 2, 3, void 0, void 0, void 0])); diff --git a/test/built-ins/Array/prototype/concat/Array.prototype.concat_small-typed-array.js b/test/built-ins/Array/prototype/concat/Array.prototype.concat_small-typed-array.js index 09fc40e0b0..1d5c1ecbbf 100644 --- a/test/built-ins/Array/prototype/concat/Array.prototype.concat_small-typed-array.js +++ b/test/built-ins/Array/prototype/concat/Array.prototype.concat_small-typed-array.js @@ -31,7 +31,9 @@ function concatTypedArray(type, elems, modulo) { var expected = new Array(4000); expected[0] = defValue; - Object.defineProperty(ta, "length", { value: 4000 }); + Object.defineProperty(ta, "length", { + value: 4000 + }); ta[Symbol.isConcatSpreadable] = true; assert(compareArray([].concat(ta), expected)); } diff --git a/test/built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-boolean-wrapper.js b/test/built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-boolean-wrapper.js index 00ec7689b1..ed021358fb 100644 --- a/test/built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-boolean-wrapper.js +++ b/test/built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-boolean-wrapper.js @@ -27,7 +27,7 @@ Boolean.prototype[0] = 1; Boolean.prototype[1] = 2; Boolean.prototype[2] = 3; Boolean.prototype.length = 3; -assert(compareArray([1,2,3], [].concat(new Boolean(true)))); +assert(compareArray([1, 2, 3], [].concat(new Boolean(true)))); // Boolean values are never concat-spreadable assert(compareArray([true], [].concat(true))); diff --git a/test/built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-function.js b/test/built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-function.js index 5b5b5aca45..8ed6bf21cf 100644 --- a/test/built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-function.js +++ b/test/built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-function.js @@ -21,11 +21,11 @@ assert(compareArray([1, 2, 3], [].concat(fn))); Function.prototype[Symbol.isConcatSpreadable] = true; // Functions may be concat-spreadable -assert(compareArray([void 0, void 0, void 0], [].concat(function(a,b,c) {}))); +assert(compareArray([void 0, void 0, void 0], [].concat(function(a, b, c) {}))); Function.prototype[0] = 1; Function.prototype[1] = 2; Function.prototype[2] = 3; -assert(compareArray([1,2,3], [].concat(function(a, b, c) {}))); +assert(compareArray([1, 2, 3], [].concat(function(a, b, c) {}))); delete Function.prototype[Symbol.isConcatSpreadable]; delete Function.prototype[0]; diff --git a/test/built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-getter-throws.js b/test/built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-getter-throws.js index 626f6d2921..8a0b64deee 100644 --- a/test/built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-getter-throws.js +++ b/test/built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-getter-throws.js @@ -12,7 +12,9 @@ features: [Symbol.isConcatSpreadable] function MyError() {} var obj = {}; Object.defineProperty(obj, Symbol.isConcatSpreadable, { - get: function() { throw new MyError(); } + get: function() { + throw new MyError(); + } }); assert.throws(MyError, function() { diff --git a/test/built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-number-wrapper.js b/test/built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-number-wrapper.js index 9ea803b4b6..d28acb7d15 100644 --- a/test/built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-number-wrapper.js +++ b/test/built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-number-wrapper.js @@ -27,7 +27,7 @@ Number.prototype[0] = 1; Number.prototype[1] = 2; Number.prototype[2] = 3; Number.prototype.length = 3; -assert(compareArray([1,2,3], [].concat(new Number(123)))); +assert(compareArray([1, 2, 3], [].concat(new Number(123)))); // Number values are never concat-spreadable assert(compareArray([true], [].concat(true))); diff --git a/test/built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-reg-exp.js b/test/built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-reg-exp.js index 4003fe33cd..6a11c8eca0 100644 --- a/test/built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-reg-exp.js +++ b/test/built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-reg-exp.js @@ -27,7 +27,7 @@ assert(compareArray([].concat(/abc/), [void 0, void 0, void 0])); RegExp.prototype[0] = 1; RegExp.prototype[1] = 2; RegExp.prototype[2] = 3; -assert(compareArray([].concat(/abc/), [1,2,3])); +assert(compareArray([].concat(/abc/), [1, 2, 3])); delete RegExp.prototype[Symbol.isConcatSpreadable]; delete RegExp.prototype[0]; diff --git a/test/built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-sparse-object.js b/test/built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-sparse-object.js index 4b3f40d188..1c4aa7f2db 100644 --- a/test/built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-sparse-object.js +++ b/test/built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-sparse-object.js @@ -10,7 +10,9 @@ description: Array.prototype.concat Symbol.isConcatSpreadable sparse object includes: [compareArray.js] features: [Symbol.isConcatSpreadable] ---*/ -var obj = { length: 5 }; +var obj = { + length: 5 +}; obj[Symbol.isConcatSpreadable] = true; assert(compareArray([void 0, void 0, void 0, void 0, void 0], [].concat(obj))); diff --git a/test/built-ins/Array/prototype/concat/Array.prototype.concat_strict-arguments.js b/test/built-ins/Array/prototype/concat/Array.prototype.concat_strict-arguments.js index 2d8b5868a9..49dfc415c9 100644 --- a/test/built-ins/Array/prototype/concat/Array.prototype.concat_strict-arguments.js +++ b/test/built-ins/Array/prototype/concat/Array.prototype.concat_strict-arguments.js @@ -10,9 +10,14 @@ description: Array.prototype.concat strict arguments includes: [compareArray.js] features: [Symbol.isConcatSpreadable] ---*/ -var args = (function(a, b, c) { "use strict"; return arguments; })(1,2,3); +var args = (function(a, b, c) { + "use strict"; + return arguments; +})(1, 2, 3); args[Symbol.isConcatSpreadable] = true; assert(compareArray([].concat(args, args), [1, 2, 3, 1, 2, 3])); -Object.defineProperty(args, "length", { value: 6 }); +Object.defineProperty(args, "length", { + value: 6 +}); assert(compareArray([].concat(args), [1, 2, 3, void 0, void 0, void 0])); diff --git a/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T1.js b/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T1.js index 7a590596d8..e06836b678 100644 --- a/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T1.js +++ b/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T1.js @@ -12,9 +12,9 @@ description: Checking this algorithm, items are Array object ---*/ var x = new Array(); -var y = new Array(0,1); -var z = new Array(2,3,4); -var arr = x.concat(y,z); +var y = new Array(0, 1); +var z = new Array(2, 3, 4); +var arr = x.concat(y, z); //CHECK#0 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T2.js b/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T2.js index 4024275a2d..100ecaa9d1 100644 --- a/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T2.js +++ b/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T2.js @@ -13,8 +13,8 @@ description: Checking this algorithm, items are objects and primitives var x = [0]; var y = new Object(); -var z = new Array(1,2); -var arr = x.concat(y,z, -1, true, "NaN"); +var z = new Array(1, 2); +var arr = x.concat(y, z, -1, true, "NaN"); //CHECK#0 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T3.js b/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T3.js index bb88eba5e4..82a8d6f002 100644 --- a/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T3.js +++ b/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T3.js @@ -11,7 +11,7 @@ es5id: 15.4.4.4_A1_T3 description: Checking this algorithm with no items ---*/ -var x = [0,1]; +var x = [0, 1]; var arr = x.concat(); //CHECK#0 diff --git a/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T4.js b/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T4.js index 0282070519..44ca8f91f0 100644 --- a/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T4.js +++ b/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T4.js @@ -11,8 +11,8 @@ es5id: 15.4.4.4_A1_T4 description: Checking this algorithm, items are [], [,] ---*/ -var x = [,1]; -var arr = x.concat([], [,]); +var x = [, 1]; +var arr = x.concat([], [, ]); //CHECK#0 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/concat/S15.4.4.4_A2_T1.js b/test/built-ins/Array/prototype/concat/S15.4.4.4_A2_T1.js index ce825917a9..a77b0e07ca 100644 --- a/test/built-ins/Array/prototype/concat/S15.4.4.4_A2_T1.js +++ b/test/built-ins/Array/prototype/concat/S15.4.4.4_A2_T1.js @@ -13,8 +13,8 @@ description: Checking this for Object object, items are objects and primitives var x = {}; x.concat = Array.prototype.concat; var y = new Object(); -var z = new Array(1,2); -var arr = x.concat(y,z, -1, true, "NaN"); +var z = new Array(1, 2); +var arr = x.concat(y, z, -1, true, "NaN"); //CHECK#0 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/concat/S15.4.4.4_A3_T1.js b/test/built-ins/Array/prototype/concat/S15.4.4.4_A3_T1.js index e98d9e41d8..ed7c03c9f2 100644 --- a/test/built-ins/Array/prototype/concat/S15.4.4.4_A3_T1.js +++ b/test/built-ins/Array/prototype/concat/S15.4.4.4_A3_T1.js @@ -33,7 +33,9 @@ if (arr.hasOwnProperty('1') !== true) { Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.concat = Array.prototype.concat; -x = {0:0}; +x = { + 0: 0 +}; var arr = x.concat(); //CHECK#4 diff --git a/test/built-ins/Array/prototype/concat/S15.4.4.4_A3_T2.js b/test/built-ins/Array/prototype/concat/S15.4.4.4_A3_T2.js index b58435329b..8434102963 100644 --- a/test/built-ins/Array/prototype/concat/S15.4.4.4_A3_T2.js +++ b/test/built-ins/Array/prototype/concat/S15.4.4.4_A3_T2.js @@ -62,4 +62,3 @@ if (b.hasOwnProperty('1') !== false) { if (b.hasOwnProperty('2') !== true) { $ERROR("expected b.hasOwnProperty('2') === true, actually " + b.hasOwnProperty('2')); } - diff --git a/test/built-ins/Array/prototype/concat/S15.4.4.4_A3_T3.js b/test/built-ins/Array/prototype/concat/S15.4.4.4_A3_T3.js index c86f736cbe..e1eacc545e 100644 --- a/test/built-ins/Array/prototype/concat/S15.4.4.4_A3_T3.js +++ b/test/built-ins/Array/prototype/concat/S15.4.4.4_A3_T3.js @@ -62,4 +62,3 @@ if (b.hasOwnProperty('1') !== false) { if (b.hasOwnProperty('2') !== true) { $ERROR("expected b.hasOwnProperty('2') === true, actually " + b.hasOwnProperty('2')); } - diff --git a/test/built-ins/Array/prototype/concat/create-non-array.js b/test/built-ins/Array/prototype/concat/create-non-array.js index 171e2baab4..b33667a9a8 100644 --- a/test/built-ins/Array/prototype/concat/create-non-array.js +++ b/test/built-ins/Array/prototype/concat/create-non-array.js @@ -15,7 +15,9 @@ info: | 4. If isArray is false, return ? ArrayCreate(length). ---*/ -var obj = { length: 0 }; +var obj = { + length: 0 +}; var callCount = 0; var result; Object.defineProperty(obj, 'constructor', { diff --git a/test/built-ins/Array/prototype/copyWithin/coerced-values-end.js b/test/built-ins/Array/prototype/copyWithin/coerced-values-end.js index 9cb416ae1d..a1d4e04a47 100644 --- a/test/built-ins/Array/prototype/copyWithin/coerced-values-end.js +++ b/test/built-ins/Array/prototype/copyWithin/coerced-values-end.js @@ -17,48 +17,42 @@ includes: [compareArray.js] assert( compareArray( - [0, 1, 2, 3].copyWithin(1, 0, null), - [0, 1, 2, 3] + [0, 1, 2, 3].copyWithin(1, 0, null), [0, 1, 2, 3] ), 'null value coerced to 0' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(1, 0, NaN), - [0, 1, 2, 3] + [0, 1, 2, 3].copyWithin(1, 0, NaN), [0, 1, 2, 3] ), 'NaN value coerced to 0' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(1, 0, false), - [0, 1, 2, 3] + [0, 1, 2, 3].copyWithin(1, 0, false), [0, 1, 2, 3] ), 'false value coerced to 0' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(1, 0, true), - [0, 0, 2, 3] + [0, 1, 2, 3].copyWithin(1, 0, true), [0, 0, 2, 3] ), 'true value coerced to 1' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(1, 0, '-2'), - [0, 0, 1, 3] + [0, 1, 2, 3].copyWithin(1, 0, '-2'), [0, 0, 1, 3] ), 'string "-2" value coerced to integer -2' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(1, 0, -2.5), - [0, 0, 1, 3] + [0, 1, 2, 3].copyWithin(1, 0, -2.5), [0, 0, 1, 3] ), 'float -2.5 value coerced to integer -2' ); diff --git a/test/built-ins/Array/prototype/copyWithin/coerced-values-start.js b/test/built-ins/Array/prototype/copyWithin/coerced-values-start.js index 182655bf5f..5789f7edea 100644 --- a/test/built-ins/Array/prototype/copyWithin/coerced-values-start.js +++ b/test/built-ins/Array/prototype/copyWithin/coerced-values-start.js @@ -16,32 +16,28 @@ includes: [compareArray.js] assert( compareArray( - [0, 1, 2, 3].copyWithin(1, undefined), - [0, 0, 1, 2] + [0, 1, 2, 3].copyWithin(1, undefined), [0, 0, 1, 2] ), 'undefined value coerced to 0' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(1, false), - [0, 0, 1, 2] + [0, 1, 2, 3].copyWithin(1, false), [0, 0, 1, 2] ), 'false value coerced to 0' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(1, NaN), - [0, 0, 1, 2] + [0, 1, 2, 3].copyWithin(1, NaN), [0, 0, 1, 2] ), 'NaN value coerced to 0' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(1, null), - [0, 0, 1, 2] + [0, 1, 2, 3].copyWithin(1, null), [0, 0, 1, 2] ), 'null value coerced to 0' ); @@ -49,8 +45,7 @@ assert( assert( compareArray( - [0, 1, 2, 3].copyWithin(0, true), - [1, 2, 3, 3] + [0, 1, 2, 3].copyWithin(0, true), [1, 2, 3, 3] ), 'true value coerced to 1' ); @@ -58,24 +53,21 @@ assert( assert( compareArray( - [0, 1, 2, 3].copyWithin(0, '1'), - [1, 2, 3, 3] + [0, 1, 2, 3].copyWithin(0, '1'), [1, 2, 3, 3] ), 'string "1" value coerced to 1' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(1, 0.5), - [0, 0, 1, 2] + [0, 1, 2, 3].copyWithin(1, 0.5), [0, 0, 1, 2] ), '0.5 float value coerced to integer 0' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(0, 1.5), - [1, 2, 3, 3] + [0, 1, 2, 3].copyWithin(0, 1.5), [1, 2, 3, 3] ), '1.5 float value coerced to integer 1' ); diff --git a/test/built-ins/Array/prototype/copyWithin/coerced-values-target.js b/test/built-ins/Array/prototype/copyWithin/coerced-values-target.js index 2646b19f22..54465b97ab 100644 --- a/test/built-ins/Array/prototype/copyWithin/coerced-values-target.js +++ b/test/built-ins/Array/prototype/copyWithin/coerced-values-target.js @@ -16,32 +16,28 @@ includes: [compareArray.js] assert( compareArray( - [0, 1, 2, 3].copyWithin(undefined, 1), - [1, 2, 3, 3] + [0, 1, 2, 3].copyWithin(undefined, 1), [1, 2, 3, 3] ), 'undefined value coerced to 0' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(false, 1), - [1, 2, 3, 3] + [0, 1, 2, 3].copyWithin(false, 1), [1, 2, 3, 3] ), 'false value coerced to 0' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(NaN, 1), - [1, 2, 3, 3] + [0, 1, 2, 3].copyWithin(NaN, 1), [1, 2, 3, 3] ), 'NaN value coerced to 0' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(null, 1), - [1, 2, 3, 3] + [0, 1, 2, 3].copyWithin(null, 1), [1, 2, 3, 3] ), 'null value coerced to 0' ); @@ -49,8 +45,7 @@ assert( assert( compareArray( - [0, 1, 2, 3].copyWithin(true, 0), - [0, 0, 1, 2] + [0, 1, 2, 3].copyWithin(true, 0), [0, 0, 1, 2] ), 'true value coerced to 1' ); @@ -58,24 +53,21 @@ assert( assert( compareArray( - [0, 1, 2, 3].copyWithin('1', 0), - [0, 0, 1, 2] + [0, 1, 2, 3].copyWithin('1', 0), [0, 0, 1, 2] ), 'string "1" value coerced to 1' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(0.5, 1), - [1, 2, 3, 3] + [0, 1, 2, 3].copyWithin(0.5, 1), [1, 2, 3, 3] ), '0.5 float value coerced to integer 0' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(1.5, 0), - [0, 0, 1, 2] + [0, 1, 2, 3].copyWithin(1.5, 0), [0, 0, 1, 2] ), '1.5 float value coerced to integer 1' ); diff --git a/test/built-ins/Array/prototype/copyWithin/negative-end.js b/test/built-ins/Array/prototype/copyWithin/negative-end.js index 70aa0e0e23..81e97abfd8 100644 --- a/test/built-ins/Array/prototype/copyWithin/negative-end.js +++ b/test/built-ins/Array/prototype/copyWithin/negative-end.js @@ -20,64 +20,56 @@ includes: [compareArray.js] assert( compareArray( - [0, 1, 2, 3].copyWithin(0, 1, -1), - [1, 2, 2, 3] + [0, 1, 2, 3].copyWithin(0, 1, -1), [1, 2, 2, 3] ), '[0, 1, 2, 3].copyWithin(0, 1, -1) -> [1, 2, 2, 3]' ); assert( compareArray( - [0, 1, 2, 3, 4].copyWithin(2, 0, -1), - [0, 1, 0, 1, 2] + [0, 1, 2, 3, 4].copyWithin(2, 0, -1), [0, 1, 0, 1, 2] ), '[0, 1, 2, 3, 4].copyWithin(2, 0, -1) -> [0, 1, 0, 1, 2]' ); assert( compareArray( - [0, 1, 2, 3, 4].copyWithin(1, 2, -2), - [0, 2, 2, 3, 4] + [0, 1, 2, 3, 4].copyWithin(1, 2, -2), [0, 2, 2, 3, 4] ), '[0, 1, 2, 3, 4].copyWithin(1, 2, -2) -> [0, 2, 2, 3, 4]' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(0, -2, -1), - [2, 1, 2, 3] + [0, 1, 2, 3].copyWithin(0, -2, -1), [2, 1, 2, 3] ), '[0, 1, 2, 3].copyWithin(0, -2, -1) -> [2, 1, 2, 3]' ); assert( compareArray( - [0, 1, 2, 3, 4].copyWithin(2, -2, -1), - [0, 1, 3, 3, 4] + [0, 1, 2, 3, 4].copyWithin(2, -2, -1), [0, 1, 3, 3, 4] ), '[0, 1, 2, 3, 4].copyWithin(2, -2, 1) -> [0, 1, 3, 3, 4]' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(-3, -2, -1), - [0, 2, 2, 3] + [0, 1, 2, 3].copyWithin(-3, -2, -1), [0, 2, 2, 3] ), '[0, 1, 2, 3].copyWithin(-3, -2, -1) -> [0, 2, 2, 3]' ); assert( compareArray( - [0, 1, 2, 3, 4].copyWithin(-2, -3, -1), - [0, 1, 2, 2, 3] + [0, 1, 2, 3, 4].copyWithin(-2, -3, -1), [0, 1, 2, 2, 3] ), '[0, 1, 2, 3, 4].copyWithin(-2, -3, -1) -> [0, 1, 2, 2, 3]' ); assert( compareArray( - [0, 1, 2, 3, 4].copyWithin(-5, -2, -1), - [3, 1, 2, 3, 4] + [0, 1, 2, 3, 4].copyWithin(-5, -2, -1), [3, 1, 2, 3, 4] ), '[0, 1, 2, 3, 4].copyWithin(-5, -2, -1) -> [3, 1, 2, 3, 4]' ); diff --git a/test/built-ins/Array/prototype/copyWithin/negative-out-of-bounds-end.js b/test/built-ins/Array/prototype/copyWithin/negative-out-of-bounds-end.js index 072d03e704..34b8374611 100644 --- a/test/built-ins/Array/prototype/copyWithin/negative-out-of-bounds-end.js +++ b/test/built-ins/Array/prototype/copyWithin/negative-out-of-bounds-end.js @@ -20,80 +20,70 @@ includes: [compareArray.js] assert( compareArray( - [0, 1, 2, 3].copyWithin(0, 1, -10), - [0, 1, 2, 3] + [0, 1, 2, 3].copyWithin(0, 1, -10), [0, 1, 2, 3] ), '[0, 1, 2, 3].copyWithin(0, 1, -10) -> [0, 1, 2, 3]' ); assert( compareArray( - [1, 2, 3, 4, 5].copyWithin(0, 1, -Infinity), - [1, 2, 3, 4, 5] + [1, 2, 3, 4, 5].copyWithin(0, 1, -Infinity), [1, 2, 3, 4, 5] ), '[1, 2, 3, 4, 5].copyWithin(0, 1, -Infinity) -> [1, 2, 3, 4, 5]' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(0, -2, -10), - [0, 1, 2, 3] + [0, 1, 2, 3].copyWithin(0, -2, -10), [0, 1, 2, 3] ), '[0, 1, 2, 3].copyWithin(0, -2, -10) -> [0, 1, 2, 3]' ); assert( compareArray( - [1, 2, 3, 4, 5].copyWithin(0, -2, -Infinity), - [1, 2, 3, 4, 5] + [1, 2, 3, 4, 5].copyWithin(0, -2, -Infinity), [1, 2, 3, 4, 5] ), '[1, 2, 3, 4, 5].copyWithin(0, -2, -Infinity) -> [1, 2, 3, 4, 5]' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(0, -9, -10), - [0, 1, 2, 3] + [0, 1, 2, 3].copyWithin(0, -9, -10), [0, 1, 2, 3] ), '[0, 1, 2, 3].copyWithin(0, -9, -10) -> [0, 1, 2, 3]' ); assert( compareArray( - [1, 2, 3, 4, 5].copyWithin(0, -9, -Infinity), - [1, 2, 3, 4, 5] + [1, 2, 3, 4, 5].copyWithin(0, -9, -Infinity), [1, 2, 3, 4, 5] ), '[1, 2, 3, 4, 5].copyWithin(0, -9, -Infinity) -> [1, 2, 3, 4, 5]' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(-3, -2, -10), - [0, 1, 2, 3] + [0, 1, 2, 3].copyWithin(-3, -2, -10), [0, 1, 2, 3] ), '[0, 1, 2, 3].copyWithin(-3, -2, -10) -> [0, 1, 2, 3]' ); assert( compareArray( - [1, 2, 3, 4, 5].copyWithin(-3, -2, -Infinity), - [1, 2, 3, 4, 5] + [1, 2, 3, 4, 5].copyWithin(-3, -2, -Infinity), [1, 2, 3, 4, 5] ), '[1, 2, 3, 4, 5].copyWithin(-3, -2, -Infinity) -> [1, 2, 3, 4, 5]' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(-7, -8, -9), - [0, 1, 2, 3] + [0, 1, 2, 3].copyWithin(-7, -8, -9), [0, 1, 2, 3] ), '[0, 1, 2, 3].copyWithin(-7, -8, -9) -> [0, 1, 2, 3]' ); assert( compareArray( - [1, 2, 3, 4, 5].copyWithin(-7, -8, -Infinity), - [1, 2, 3, 4, 5] + [1, 2, 3, 4, 5].copyWithin(-7, -8, -Infinity), [1, 2, 3, 4, 5] ), '[1, 2, 3, 4, 5].copyWithin(-7, -8, -Infinity) -> [1, 2, 3, 4, 5]' ); diff --git a/test/built-ins/Array/prototype/copyWithin/negative-out-of-bounds-start.js b/test/built-ins/Array/prototype/copyWithin/negative-out-of-bounds-start.js index 1f31fc9eb9..e3002b70f0 100644 --- a/test/built-ins/Array/prototype/copyWithin/negative-out-of-bounds-start.js +++ b/test/built-ins/Array/prototype/copyWithin/negative-out-of-bounds-start.js @@ -17,32 +17,28 @@ includes: [compareArray.js] assert( compareArray( - [0, 1, 2, 3].copyWithin(0, -10), - [0, 1, 2, 3] + [0, 1, 2, 3].copyWithin(0, -10), [0, 1, 2, 3] ), '[0, 1, 2, 3].copyWithin(0, -10) -> [0, 1, 2, 3]' ); assert( compareArray( - [1, 2, 3, 4, 5].copyWithin(0, -Infinity), - [1, 2, 3, 4, 5] + [1, 2, 3, 4, 5].copyWithin(0, -Infinity), [1, 2, 3, 4, 5] ), '[1, 2, 3, 4, 5].copyWithin(0, -Infinity) -> [1, 2, 3, 4, 5]' ); assert( compareArray( - [0, 1, 2, 3, 4].copyWithin(2, -10), - [0, 1, 0, 1, 2] + [0, 1, 2, 3, 4].copyWithin(2, -10), [0, 1, 0, 1, 2] ), '[0, 1, 2, 3, 4].copyWithin(2, -2) -> [0, 1, 0, 1, 2]' ); assert( compareArray( - [1, 2, 3, 4, 5].copyWithin(2, -Infinity), - [1, 2, 1, 2, 3] + [1, 2, 3, 4, 5].copyWithin(2, -Infinity), [1, 2, 1, 2, 3] ), '[1, 2, 3, 4, 5].copyWithin(2, -Infinity) -> [1, 2, 1, 2, 3]' ); @@ -50,16 +46,14 @@ assert( assert( compareArray( - [0, 1, 2, 3, 4].copyWithin(10, -10), - [0, 1, 2, 3, 4] + [0, 1, 2, 3, 4].copyWithin(10, -10), [0, 1, 2, 3, 4] ), '[0, 1, 2, 3, 4].copyWithin(10, -10) -> [0, 1, 2, 3, 4]' ); assert( compareArray( - [1, 2, 3, 4, 5].copyWithin(10, -Infinity), - [1, 2, 3, 4, 5] + [1, 2, 3, 4, 5].copyWithin(10, -Infinity), [1, 2, 3, 4, 5] ), '[1, 2, 3, 4, 5].copyWithin(10, -Infinity) -> [1, 2, 3, 4, 5]' ); @@ -67,16 +61,14 @@ assert( assert( compareArray( - [0, 1, 2, 3].copyWithin(-9, -10), - [0, 1, 2, 3] + [0, 1, 2, 3].copyWithin(-9, -10), [0, 1, 2, 3] ), '[0, 1, 2, 3].copyWithin(-9, -10) -> [0, 1, 2, 3]' ); assert( compareArray( - [1, 2, 3, 4, 5].copyWithin(-9, -Infinity), - [1, 2, 3, 4, 5] + [1, 2, 3, 4, 5].copyWithin(-9, -Infinity), [1, 2, 3, 4, 5] ), '[1, 2, 3, 4, 5].copyWithin(-9, -Infinity) -> [1, 2, 3, 4, 5]' ); diff --git a/test/built-ins/Array/prototype/copyWithin/negative-out-of-bounds-target.js b/test/built-ins/Array/prototype/copyWithin/negative-out-of-bounds-target.js index 72b95dcace..f17ab8a8a6 100644 --- a/test/built-ins/Array/prototype/copyWithin/negative-out-of-bounds-target.js +++ b/test/built-ins/Array/prototype/copyWithin/negative-out-of-bounds-target.js @@ -17,32 +17,28 @@ includes: [compareArray.js] assert( compareArray( - [0, 1, 2, 3].copyWithin(-10, 0), - [0, 1, 2, 3] + [0, 1, 2, 3].copyWithin(-10, 0), [0, 1, 2, 3] ), '[0, 1, 2, 3].copyWithin(-10, 0) -> [0, 1, 2, 3]' ); assert( compareArray( - [1, 2, 3, 4, 5].copyWithin(-Infinity, 0), - [1, 2, 3, 4, 5] + [1, 2, 3, 4, 5].copyWithin(-Infinity, 0), [1, 2, 3, 4, 5] ), '[1, 2, 3, 4, 5].copyWithin(-Infinity, 0) -> [1, 2, 3, 4, 5]' ); assert( compareArray( - [0, 1, 2, 3, 4].copyWithin(-10, 2), - [2, 3, 4, 3, 4] + [0, 1, 2, 3, 4].copyWithin(-10, 2), [2, 3, 4, 3, 4] ), '[0, 1, 2, 3, 4].copyWithin(-10, 2) -> [2, 3, 4, 3, 4]' ); assert( compareArray( - [1, 2, 3, 4, 5].copyWithin(-Infinity, 2), - [3, 4, 5, 4, 5] + [1, 2, 3, 4, 5].copyWithin(-Infinity, 2), [3, 4, 5, 4, 5] ), '[1, 2, 3, 4, 5].copyWithin(-Infinity, 2) -> [3, 4, 5, 4, 5]' ); diff --git a/test/built-ins/Array/prototype/copyWithin/negative-start.js b/test/built-ins/Array/prototype/copyWithin/negative-start.js index 4cec365ad5..3989b288db 100644 --- a/test/built-ins/Array/prototype/copyWithin/negative-start.js +++ b/test/built-ins/Array/prototype/copyWithin/negative-start.js @@ -17,48 +17,42 @@ includes: [compareArray.js] assert( compareArray( - [0, 1, 2, 3].copyWithin(0, -1), - [3, 1, 2, 3] + [0, 1, 2, 3].copyWithin(0, -1), [3, 1, 2, 3] ), '[0, 1, 2, 3].copyWithin(0, -1) -> [3, 1, 2, 3]' ); assert( compareArray( - [0, 1, 2, 3, 4].copyWithin(2, -2), - [0, 1, 3, 4, 4] + [0, 1, 2, 3, 4].copyWithin(2, -2), [0, 1, 3, 4, 4] ), '[0, 1, 2, 3, 4].copyWithin(2, -2) -> [0, 1, 3, 4, 4]' ); assert( compareArray( - [0, 1, 2, 3, 4].copyWithin(1, -2), - [0, 3, 4, 3, 4] + [0, 1, 2, 3, 4].copyWithin(1, -2), [0, 3, 4, 3, 4] ), '[0, 1, 2, 3, 4].copyWithin(1, -2) -> [0, 3, 4, 3, 4]' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(-1, -2), - [0, 1, 2, 2] + [0, 1, 2, 3].copyWithin(-1, -2), [0, 1, 2, 2] ), '[0, 1, 2, 3].copyWithin(-1, -2) -> [ 0, 1, 2, 2 ]' ); assert( compareArray( - [0, 1, 2, 3, 4].copyWithin(-2, -3), - [0, 1, 2, 2, 3] + [0, 1, 2, 3, 4].copyWithin(-2, -3), [0, 1, 2, 2, 3] ), '[0, 1, 2, 3, 4].copyWithin(-2, -3) -> [0, 1, 2, 2, 3]' ); assert( compareArray( - [0, 1, 2, 3, 4].copyWithin(-5, -2), - [3, 4, 2, 3, 4] + [0, 1, 2, 3, 4].copyWithin(-5, -2), [3, 4, 2, 3, 4] ), '[0, 1, 2, 3, 4].copyWithin(-5, -2) -> [3, 4, 2, 3, 4]' ); diff --git a/test/built-ins/Array/prototype/copyWithin/negative-target.js b/test/built-ins/Array/prototype/copyWithin/negative-target.js index 29fd249755..99844a4b8e 100644 --- a/test/built-ins/Array/prototype/copyWithin/negative-target.js +++ b/test/built-ins/Array/prototype/copyWithin/negative-target.js @@ -17,24 +17,21 @@ includes: [compareArray.js] assert( compareArray( - [0, 1, 2, 3].copyWithin(-1, 0), - [0, 1, 2, 0] + [0, 1, 2, 3].copyWithin(-1, 0), [0, 1, 2, 0] ), '[0, 1, 2, 3].copyWithin(-1, 0) -> [0, 1, 2, 0]' ); assert( compareArray( - [0, 1, 2, 3, 4].copyWithin(-2, 2), - [0, 1, 2, 2, 3] + [0, 1, 2, 3, 4].copyWithin(-2, 2), [0, 1, 2, 2, 3] ), '[0, 1, 2, 3, 4].copyWithin(-2, 2) -> [0, 1, 2, 2, 3]' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(-1, 2), - [0, 1, 2, 2] + [0, 1, 2, 3].copyWithin(-1, 2), [0, 1, 2, 2] ), '[0, 1, 2, 3].copyWithin(-1, 2) -> [0, 1, 2, 2]' ); diff --git a/test/built-ins/Array/prototype/copyWithin/non-negative-out-of-bounds-end.js b/test/built-ins/Array/prototype/copyWithin/non-negative-out-of-bounds-end.js index 6af95e7244..d20bc64c24 100644 --- a/test/built-ins/Array/prototype/copyWithin/non-negative-out-of-bounds-end.js +++ b/test/built-ins/Array/prototype/copyWithin/non-negative-out-of-bounds-end.js @@ -36,32 +36,28 @@ includes: [compareArray.js] assert( compareArray( - [0, 1, 2, 3].copyWithin(0, 1, 6), - [1, 2, 3, 3] + [0, 1, 2, 3].copyWithin(0, 1, 6), [1, 2, 3, 3] ), '[0, 1, 2, 3].copyWithin(0, 1, 6) -> [1, 2, 3, 3]' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(0, 1, Infinity), - [1, 2, 3, 3] + [0, 1, 2, 3].copyWithin(0, 1, Infinity), [1, 2, 3, 3] ), '[0, 1, 2, 3].copyWithin(0, 1, Infinity) -> [1, 2, 3, 3]' ); assert( compareArray( - [0, 1, 2, 3, 4, 5].copyWithin(1, 3, 6), - [0, 3, 4, 5, 4, 5] + [0, 1, 2, 3, 4, 5].copyWithin(1, 3, 6), [0, 3, 4, 5, 4, 5] ), '[0, 1, 2, 3, 4, 5].copyWithin(1, 3, 6) -> [0, 3, 4, 5, 4, 5]' ); assert( compareArray( - [0, 1, 2, 3, 4, 5].copyWithin(1, 3, Infinity), - [0, 3, 4, 5, 4, 5] + [0, 1, 2, 3, 4, 5].copyWithin(1, 3, Infinity), [0, 3, 4, 5, 4, 5] ), '[0, 1, 2, 3, 4, 5].copyWithin(1, 3, Infinity) -> [0, 3, 4, 5, 4, 5]' ); diff --git a/test/built-ins/Array/prototype/copyWithin/non-negative-out-of-bounds-target-and-start.js b/test/built-ins/Array/prototype/copyWithin/non-negative-out-of-bounds-target-and-start.js index e38edecd72..64f3c58540 100644 --- a/test/built-ins/Array/prototype/copyWithin/non-negative-out-of-bounds-target-and-start.js +++ b/test/built-ins/Array/prototype/copyWithin/non-negative-out-of-bounds-target-and-start.js @@ -30,64 +30,56 @@ includes: [compareArray.js] assert( compareArray( - [0, 1, 2, 3, 4, 5].copyWithin(6, 0), - [0, 1, 2, 3, 4, 5] + [0, 1, 2, 3, 4, 5].copyWithin(6, 0), [0, 1, 2, 3, 4, 5] ), '[0, 1, 2, 3, 4, 5].copyWithin(6, 0) => [0, 1, 2, 3, 4, 5]' ); assert( compareArray( - [0, 1, 2, 3, 4, 5].copyWithin(7, 0), - [0, 1, 2, 3, 4, 5] + [0, 1, 2, 3, 4, 5].copyWithin(7, 0), [0, 1, 2, 3, 4, 5] ), '[0, 1, 2, 3, 4, 5].copyWithin(6, 0) => [0, 1, 2, 3, 4, 5]' ); assert( compareArray( - [0, 1, 2, 3, 4, 5].copyWithin(Infinity, 0), - [0, 1, 2, 3, 4, 5] + [0, 1, 2, 3, 4, 5].copyWithin(Infinity, 0), [0, 1, 2, 3, 4, 5] ), '[0, 1, 2, 3, 4, 5].copyWithin(Infinity, 0) => [0, 1, 2, 3, 4, 5]' ); assert( compareArray( - [0, 1, 2, 3, 4, 5].copyWithin(6, 2), - [0, 1, 2, 3, 4, 5] + [0, 1, 2, 3, 4, 5].copyWithin(6, 2), [0, 1, 2, 3, 4, 5] ), '[0, 1, 2, 3, 4, 5].copyWithin(6, 2) => [0, 1, 2, 3, 4, 5]' ); assert( compareArray( - [0, 1, 2, 3, 4, 5].copyWithin(7, 2), - [0, 1, 2, 3, 4, 5] + [0, 1, 2, 3, 4, 5].copyWithin(7, 2), [0, 1, 2, 3, 4, 5] ), '[0, 1, 2, 3, 4, 5].copyWithin(7, 2) => [0, 1, 2, 3, 4, 5]' ); assert( compareArray( - [0, 1, 2, 3, 4, 5].copyWithin(Infinity, 2), - [0, 1, 2, 3, 4, 5] + [0, 1, 2, 3, 4, 5].copyWithin(Infinity, 2), [0, 1, 2, 3, 4, 5] ), '[0, 1, 2, 3, 4, 5].copyWithin(Infinity, 2) => [0, 1, 2, 3, 4, 5]' ); assert( compareArray( - [0, 1, 2, 3, 4, 5].copyWithin(0, 6), - [0, 1, 2, 3, 4, 5] + [0, 1, 2, 3, 4, 5].copyWithin(0, 6), [0, 1, 2, 3, 4, 5] ), '[0, 1, 2, 3, 4, 5].copyWithin(0, 6) => [0, 1, 2, 3, 4, 5]' ); assert( compareArray( - [0, 1, 2, 3, 4, 5].copyWithin(0, 7), - [0, 1, 2, 3, 4, 5] + [0, 1, 2, 3, 4, 5].copyWithin(0, 7), [0, 1, 2, 3, 4, 5] ), '[0, 1, 2, 3, 4, 5].copyWithin(0, 7) => [0, 1, 2, 3, 4, 5]' ); @@ -95,24 +87,21 @@ assert( assert( compareArray( - [0, 1, 2, 3, 4, 5].copyWithin(0, Infinity), - [0, 1, 2, 3, 4, 5] + [0, 1, 2, 3, 4, 5].copyWithin(0, Infinity), [0, 1, 2, 3, 4, 5] ), '[0, 1, 2, 3, 4, 5].copyWithin(0, Infinity) => [0, 1, 2, 3, 4, 5]' ); assert( compareArray( - [0, 1, 2, 3, 4, 5].copyWithin(2, 6), - [0, 1, 2, 3, 4, 5] + [0, 1, 2, 3, 4, 5].copyWithin(2, 6), [0, 1, 2, 3, 4, 5] ), '[0, 1, 2, 3, 4, 5].copyWithin(2, 6) => [0, 1, 2, 3, 4, 5]' ); assert( compareArray( - [0, 1, 2, 3, 4, 5].copyWithin(1, 7), - [0, 1, 2, 3, 4, 5] + [0, 1, 2, 3, 4, 5].copyWithin(1, 7), [0, 1, 2, 3, 4, 5] ), '[0, 1, 2, 3, 4, 5].copyWithin(1, 7) => [0, 1, 2, 3, 4, 5]' ); @@ -120,32 +109,28 @@ assert( assert( compareArray( - [0, 1, 2, 3, 4, 5].copyWithin(3, Infinity), - [0, 1, 2, 3, 4, 5] + [0, 1, 2, 3, 4, 5].copyWithin(3, Infinity), [0, 1, 2, 3, 4, 5] ), '[0, 1, 2, 3, 4, 5].copyWithin(3, Infinity) => [0, 1, 2, 3, 4, 5]' ); assert( compareArray( - [0, 1, 2, 3, 4, 5].copyWithin(6, 6), - [0, 1, 2, 3, 4, 5] + [0, 1, 2, 3, 4, 5].copyWithin(6, 6), [0, 1, 2, 3, 4, 5] ), '[0, 1, 2, 3, 4, 5].copyWithin(6, 6) => [0, 1, 2, 3, 4, 5]' ); assert( compareArray( - [0, 1, 2, 3, 4, 5].copyWithin(10, 10), - [0, 1, 2, 3, 4, 5] + [0, 1, 2, 3, 4, 5].copyWithin(10, 10), [0, 1, 2, 3, 4, 5] ), '[0, 1, 2, 3, 4, 5].copyWithin(10, 10) => [0, 1, 2, 3, 4, 5]' ); assert( compareArray( - [0, 1, 2, 3, 4, 5].copyWithin(Infinity, Infinity), - [0, 1, 2, 3, 4, 5] + [0, 1, 2, 3, 4, 5].copyWithin(Infinity, Infinity), [0, 1, 2, 3, 4, 5] ), '[0, 1, 2, 3, 4, 5].copyWithin(Infinity, Infinity) => [0, 1, 2, 3, 4, 5]' ); diff --git a/test/built-ins/Array/prototype/copyWithin/non-negative-target-and-start.js b/test/built-ins/Array/prototype/copyWithin/non-negative-target-and-start.js index 9704fcc622..02a6bc4e78 100644 --- a/test/built-ins/Array/prototype/copyWithin/non-negative-target-and-start.js +++ b/test/built-ins/Array/prototype/copyWithin/non-negative-target-and-start.js @@ -34,28 +34,24 @@ includes: [compareArray.js] assert( compareArray( - ['a', 'b', 'c', 'd', 'e', 'f'].copyWithin(0, 0), - ['a', 'b', 'c', 'd', 'e', 'f'] + ['a', 'b', 'c', 'd', 'e', 'f'].copyWithin(0, 0), ['a', 'b', 'c', 'd', 'e', 'f'] ) ); assert( compareArray( - ['a', 'b', 'c', 'd', 'e', 'f'].copyWithin(0, 2), - ['c', 'd', 'e', 'f', 'e', 'f'] + ['a', 'b', 'c', 'd', 'e', 'f'].copyWithin(0, 2), ['c', 'd', 'e', 'f', 'e', 'f'] ) ); assert( compareArray( - ['a', 'b', 'c', 'd', 'e', 'f'].copyWithin(3, 0), - ['a', 'b', 'c', 'a', 'b', 'c'] + ['a', 'b', 'c', 'd', 'e', 'f'].copyWithin(3, 0), ['a', 'b', 'c', 'a', 'b', 'c'] ) ); assert( compareArray( - [0, 1, 2, 3, 4, 5].copyWithin(1, 4), - [0, 4, 5, 3, 4, 5] + [0, 1, 2, 3, 4, 5].copyWithin(1, 4), [0, 4, 5, 3, 4, 5] ) ); diff --git a/test/built-ins/Array/prototype/copyWithin/non-negative-target-start-and-end.js b/test/built-ins/Array/prototype/copyWithin/non-negative-target-start-and-end.js index 89a665ad5d..4dbc5479cd 100644 --- a/test/built-ins/Array/prototype/copyWithin/non-negative-target-start-and-end.js +++ b/test/built-ins/Array/prototype/copyWithin/non-negative-target-start-and-end.js @@ -36,24 +36,21 @@ includes: [compareArray.js] assert( compareArray( - [0, 1, 2, 3].copyWithin(0, 0, 0), - [0, 1, 2, 3] + [0, 1, 2, 3].copyWithin(0, 0, 0), [0, 1, 2, 3] ), '[0, 1, 2, 3].copyWithin(0, 0, 0) -> [0, 1, 2, 3]' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(0, 0, 2), - [0, 1, 2, 3] + [0, 1, 2, 3].copyWithin(0, 0, 2), [0, 1, 2, 3] ), '[0, 1, 2, 3].copyWithin(0, 0, 2) -> [0, 1, 2, 3]' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(0, 1, 2), - [1, 1, 2, 3] + [0, 1, 2, 3].copyWithin(0, 1, 2), [1, 1, 2, 3] ), '[0, 1, 2, 3].copyWithin(0, 1, 2) -> [1, 1, 2, 3]' ); @@ -71,16 +68,14 @@ assert( */ assert( compareArray( - [0, 1, 2, 3].copyWithin(1, 0, 2), - [0, 0, 1, 3] + [0, 1, 2, 3].copyWithin(1, 0, 2), [0, 0, 1, 3] ), '[0, 1, 2, 3].copyWithin(1, 0, 2) -> [0, 0, 1, 3]' ); assert( compareArray( - [0, 1, 2, 3, 4, 5].copyWithin(1, 3, 5), - [0, 3, 4, 3, 4, 5] + [0, 1, 2, 3, 4, 5].copyWithin(1, 3, 5), [0, 3, 4, 3, 4, 5] ), '[0, 1, 2, 3, 4, 5].copyWithin(1, 3, 5) -> [0, 3, 4, 3, 4, 5]' ); diff --git a/test/built-ins/Array/prototype/copyWithin/return-abrupt-from-end.js b/test/built-ins/Array/prototype/copyWithin/return-abrupt-from-end.js index 6d69262ff5..a81b4ac32e 100644 --- a/test/built-ins/Array/prototype/copyWithin/return-abrupt-from-end.js +++ b/test/built-ins/Array/prototype/copyWithin/return-abrupt-from-end.js @@ -23,4 +23,3 @@ var o1 = { assert.throws(Test262Error, function() { [].copyWithin(0, 0, o1); }); - diff --git a/test/built-ins/Array/prototype/copyWithin/return-abrupt-from-start.js b/test/built-ins/Array/prototype/copyWithin/return-abrupt-from-start.js index 37768729c6..6694044417 100644 --- a/test/built-ins/Array/prototype/copyWithin/return-abrupt-from-start.js +++ b/test/built-ins/Array/prototype/copyWithin/return-abrupt-from-start.js @@ -22,4 +22,3 @@ var o1 = { assert.throws(Test262Error, function() { [].copyWithin(0, o1); }); - diff --git a/test/built-ins/Array/prototype/copyWithin/undefined-end.js b/test/built-ins/Array/prototype/copyWithin/undefined-end.js index 93c75620ee..6ef024c756 100644 --- a/test/built-ins/Array/prototype/copyWithin/undefined-end.js +++ b/test/built-ins/Array/prototype/copyWithin/undefined-end.js @@ -17,16 +17,14 @@ includes: [compareArray.js] assert( compareArray( - [0, 1, 2, 3].copyWithin(0, 1, undefined), - [1, 2, 3, 3] + [0, 1, 2, 3].copyWithin(0, 1, undefined), [1, 2, 3, 3] ), '[0, 1, 2, 3].copyWithin(0, 1, undefined) -> [1, 2, 3]' ); assert( compareArray( - [0, 1, 2, 3].copyWithin(0, 1), - [1, 2, 3, 3] + [0, 1, 2, 3].copyWithin(0, 1), [1, 2, 3, 3] ), '[0, 1, 2, 3].copyWithin(0, 1) -> [1, 2, 3, 3]' ); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-1-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-1-4.js index 32c5b4f6a8..0d88f961ed 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-1-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-1-4.js @@ -8,6 +8,7 @@ description: Array.prototype.every applied to Boolean object ---*/ var accessed = false; + function callbackfn(val, idx, obj) { accessed = true; return obj instanceof Boolean; diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-1-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-1-5.js index 91827adfcd..7bd133c740 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-1-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-1-5.js @@ -8,6 +8,7 @@ description: Array.prototype.every applied to number primitive ---*/ var accessed = false; + function callbackfn(val, idx, obj) { accessed = true; return obj instanceof Number; diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-1-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-1-6.js index 09439db09c..255a5afc24 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-1-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-1-6.js @@ -8,6 +8,7 @@ description: Array.prototype.every applied to Number object ---*/ var accessed = false; + function callbackfn(val, idx, obj) { accessed = true; return obj instanceof Number; diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-1-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-1-9.js index f33885b890..bf6992cf13 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-1-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-1-9.js @@ -11,7 +11,7 @@ function callbackfn(val, idx, obj) { return !(obj instanceof Function); } -var obj = function (a, b) { +var obj = function(a, b) { return a + b; }; obj[0] = 11; diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-10.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-10.js index 88dc9700a5..c895c286c2 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-10.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-10.js @@ -17,16 +17,16 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var proto = { }; +var proto = {}; Object.defineProperty(proto, "length", { - get: function () { - return 2; + get: function() { + return 2; }, configurable: true }); -var Con = function () { }; +var Con = function() {}; Con.prototype = proto; var child = new Con(); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-11.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-11.js index 135cc936d0..9f2497b6aa 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-11.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-11.js @@ -21,7 +21,7 @@ var obj = { 1: 8 }; Object.defineProperty(obj, "length", { - set: function () { }, + set: function() {}, configurable: true }); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-12.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-12.js index 2f71539f42..4cc13deab8 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-12.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-12.js @@ -17,16 +17,19 @@ function callbackfn(val, idx, obj) { } Object.defineProperty(Object.prototype, "length", { - get: function () { - return 2; - }, - configurable: true + get: function() { + return 2; + }, + configurable: true }); -var obj = { 0: 9, 1: 8 }; +var obj = { + 0: 9, + 1: 8 +}; Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true + set: function() {}, + configurable: true }); assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-13.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-13.js index 07dc5015eb..0c03deb22d 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-13.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-13.js @@ -12,17 +12,17 @@ description: > var accessed = false; function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; + accessed = true; + return val > 10; } var proto = {}; Object.defineProperty(proto, "length", { - set: function () { }, - configurable: true + set: function() {}, + configurable: true }); -var Con = function () { }; +var Con = function() {}; Con.prototype = proto; var child = new Con(); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-14.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-14.js index f885895242..eb91b3e56c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-14.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-14.js @@ -16,7 +16,10 @@ function callbackfn(val, idx, obj) { return val > 10; } -var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-17.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-17.js index bf6fcd0c87..7d4e3200c2 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-17.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-17.js @@ -17,10 +17,10 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var func = function (a, b) { +var func = function(a, b) { arguments[2] = 9; return Array.prototype.every.call(arguments, callbackfn1) && - !Array.prototype.every.call(arguments, callbackfn2); + !Array.prototype.every.call(arguments, callbackfn2); }; assert(func(12, 11), 'func(12, 11) !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-19.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-19.js index 89977f2223..c7c9512351 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-19.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-19.js @@ -17,7 +17,7 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var fun = function (a, b) { +var fun = function(a, b) { return a + b; }; fun[0] = 12; diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-3.js index 57c559260c..203eaee8a3 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-3.js @@ -17,9 +17,11 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var proto = { length: 3 }; +var proto = { + length: 3 +}; -var Con = function () { }; +var Con = function() {}; Con.prototype = proto; var child = new Con(); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-4.js index c071a88752..cebdab0872 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-4.js @@ -10,6 +10,7 @@ description: > ---*/ var arrProtoLen = 0; + function callbackfn1(val, idx, obj) { return val > 10; } diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-5.js index 6cd638bdb8..1f4ffc7a82 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-5.js @@ -17,16 +17,16 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var proto = { }; +var proto = {}; Object.defineProperty(proto, "length", { - get: function () { - return 3; + get: function() { + return 3; }, configurable: true }); -var Con = function () { }; +var Con = function() {}; Con.prototype = proto; var child = new Con(); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-6.js index b464e41512..264d43dd2b 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-6.js @@ -17,9 +17,11 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var proto = { length: 2 }; +var proto = { + length: 2 +}; -var Con = function () { }; +var Con = function() {}; Con.prototype = proto; var child = new Con(); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-7.js index bcc252a2be..9e29cd7151 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-7.js @@ -17,11 +17,11 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var obj = { }; +var obj = {}; Object.defineProperty(obj, "length", { - get: function () { - return 2; + get: function() { + return 2; }, configurable: true }); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-8.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-8.js index 298e148b07..d3a3e96abc 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-8.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-8.js @@ -17,16 +17,18 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var proto = { length: 3 }; +var proto = { + length: 3 +}; -var Con = function () { }; +var Con = function() {}; Con.prototype = proto; var child = new Con(); Object.defineProperty(child, "length", { - get: function () { - return 2; + get: function() { + return 2; }, configurable: true }); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-9.js index 48387126bf..4dd430d1b1 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-9.js @@ -20,20 +20,20 @@ function callbackfn2(val, idx, obj) { var proto = {}; Object.defineProperty(proto, "length", { - get: function () { - return 3; + get: function() { + return 3; }, configurable: true }); -var Con = function () { }; +var Con = function() {}; Con.prototype = proto; var child = new Con(); Object.defineProperty(child, "length", { - get: function () { - return 2; + get: function() { + return 2; }, configurable: true }); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-1.js index b745f20c1f..a72ca6863d 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-1.js @@ -14,7 +14,10 @@ function callbackfn(val, idx, obj) { return val > 10; } -var obj = { 0: 9, length: undefined }; +var obj = { + 0: 9, + length: undefined +}; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-10.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-10.js index c8029d4a0f..b381ef7d23 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-10.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-10.js @@ -16,7 +16,10 @@ function callbackfn(val, idx, obj) { return val > 10; } -var obj = { 0: 9, length: NaN }; +var obj = { + 0: 9, + length: NaN +}; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-11.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-11.js index 9b27d025a8..ab5fa5744c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-11.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-11.js @@ -17,7 +17,12 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var obj = { 0: 12, 1: 11, 2: 9, length: "2" }; +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: "2" +}; assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-12.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-12.js index 0c2a3f97e1..bdf1ee93eb 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-12.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-12.js @@ -17,7 +17,12 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var obj = { 0: 11, 1: 12, 2: 9, length: "-4294967294" }; +var obj = { + 0: 11, + 1: 12, + 2: 9, + length: "-4294967294" +}; assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); assert(Array.prototype.every.call(obj, callbackfn2), 'Array.prototype.every.call(obj, callbackfn2) !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-13.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-13.js index 0043f34eec..23c7342510 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-13.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-13.js @@ -17,7 +17,12 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var obj = { 0: 12, 1: 11, 2: 9, length: "2.5" }; +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: "2.5" +}; assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-14.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-14.js index 1d99f1e2e3..c20b8194a2 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-14.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-14.js @@ -10,13 +10,22 @@ description: Array.prototype.every - 'length' is a string containing +/-Infinity var accessed = false; function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; + accessed = true; + return val > 10; } -var objOne = { 0: 9, length: "Infinity" }; -var objTwo = { 0: 9, length: "+Infinity" }; -var objThree = { 0: 9, length: "-Infinity" }; +var objOne = { + 0: 9, + length: "Infinity" +}; +var objTwo = { + 0: 9, + length: "+Infinity" +}; +var objThree = { + 0: 9, + length: "-Infinity" +}; assert.sameValue(Array.prototype.every.call(objOne, callbackfn), false, 'Array.prototype.every.call(objOne, callbackfn)'); assert.sameValue(Array.prototype.every.call(objTwo, callbackfn), false, 'Array.prototype.every.call(objTwo, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-15.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-15.js index dcdda5faee..63ceb586e8 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-15.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-15.js @@ -17,7 +17,12 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var obj = { 0: 12, 1: 11, 2: 9, length: "2E0" }; +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: "2E0" +}; assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-16.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-16.js index 4e7f6f97cb..ea0e8386cd 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-16.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-16.js @@ -17,7 +17,12 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var obj = { 0: 12, 1: 11, 2: 9, length: "0x0002" }; +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: "0x0002" +}; assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-17.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-17.js index eb35d70b13..0125b2b77b 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-17.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-17.js @@ -17,7 +17,12 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var obj = { 0: 12, 1: 11, 2: 9, length: "0002.00" }; +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: "0002.00" +}; assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-18.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-18.js index 96846f1062..c06bc6c27f 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-18.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-18.js @@ -16,7 +16,11 @@ function callbackfn(val, idx, obj) { return val > 10; } -var obj = { 0: 9, 1: 8, length: "two" }; +var obj = { + 0: 9, + 1: 8, + length: "two" +}; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-19.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-19.js index 15d3f5af93..a2bc1211f7 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-19.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-19.js @@ -10,25 +10,25 @@ description: > ---*/ function callbackfn1(val, idx, obj) { - return val > 10; + return val > 10; } function callbackfn2(val, idx, obj) { - return val > 11; + return val > 11; } var toStringAccessed = false; var obj = { - 0: 12, - 1: 11, - 2: 9, + 0: 12, + 1: 11, + 2: 9, - length: { - toString: function () { - toStringAccessed = true; - return '2'; - } + length: { + toString: function() { + toStringAccessed = true; + return '2'; } + } }; // objects inherit the default valueOf() method from Object diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-2.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-2.js index bb2431acb9..fb8444d54d 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-2.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-2.js @@ -17,7 +17,11 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var obj = { 0: 11, 1: 9, length: true }; +var obj = { + 0: 11, + 1: 9, + length: true +}; assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-20.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-20.js index 4f12b7bd7d..a642c0ad1c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-20.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-20.js @@ -24,10 +24,10 @@ var obj = { 1: 11, 2: 9, length: { - valueOf: function () { - valueOfAccessed = true; - return 2; - } + valueOf: function() { + valueOfAccessed = true; + return 2; + } } }; diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-21.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-21.js index cc83597903..7f57fb9f28 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-21.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-21.js @@ -11,30 +11,30 @@ description: > ---*/ function callbackfn1(val, idx, obj) { - return val > 10; + return val > 10; } function callbackfn2(val, idx, obj) { - return val > 11; + return val > 11; } var toStringAccessed = false; var valueOfAccessed = false; var obj = { - 0: 12, - 1: 11, - 2: 9, - length: { - valueOf: function () { - valueOfAccessed = true; - return {}; - }, - toString: function () { - toStringAccessed = true; - return '2'; - } + 0: 12, + 1: 11, + 2: 9, + length: { + valueOf: function() { + valueOfAccessed = true; + return {}; + }, + toString: function() { + toStringAccessed = true; + return '2'; } + } }; assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-22.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-22.js index 44c8deb758..a0f549b953 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-22.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-22.js @@ -10,32 +10,32 @@ description: > primitive values ---*/ - var callbackfnAccessed = false; - var toStringAccessed = false; - var valueOfAccessed = false; +var callbackfnAccessed = false; +var toStringAccessed = false; +var valueOfAccessed = false; - function callbackfn(val, idx, obj) { - callbackfnAccessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + callbackfnAccessed = true; + return val > 10; +} - var obj = { - 0: 11, - 1: 12, +var obj = { + 0: 11, + 1: 12, - length: { - valueOf: function () { - valueOfAccessed = true; - return {}; - }, - toString: function () { - toStringAccessed = true; - return {}; - } - } - }; + length: { + valueOf: function() { + valueOfAccessed = true; + return {}; + }, + toString: function() { + toStringAccessed = true; + return {}; + } + } +}; assert.throws(TypeError, function() { - Array.prototype.every.call(obj, callbackfn); + Array.prototype.every.call(obj, callbackfn); }); assert(toStringAccessed, 'toStringAccessed !== true'); assert(valueOfAccessed, 'valueOfAccessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-23.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-23.js index e282dd269e..19f4be0b2d 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-23.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-23.js @@ -9,40 +9,40 @@ description: > is an object with an own toString and inherited valueOf methods ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var valueOfAccessed = false; - var toStringAccessed = false; +var valueOfAccessed = false; +var toStringAccessed = false; - var proto = { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - }; +var proto = { + valueOf: function() { + valueOfAccessed = true; + return 2; + } +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); +var child = new Con(); - child.toString = function () { - toStringAccessed = true; - return '1'; - }; +child.toString = function() { + toStringAccessed = true; + return '1'; +}; - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: child - }; +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: child +}; assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-24.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-24.js index 61c2e627b4..88db175593 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-24.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-24.js @@ -9,15 +9,20 @@ description: > non-integer, ensure truncation occurs in the proper direction ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var obj = { 0: 12, 1: 11, 2: 9, length: 2.685 }; +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: 2.685 +}; assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-25.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-25.js index 3d052320a4..d6a174f875 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-25.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-25.js @@ -7,20 +7,20 @@ es5id: 15.4.4.16-3-25 description: Array.prototype.every - value of 'length' is a negative non-integer ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: -4294967294.5 - }; +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: -4294967294.5 +}; assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); assert(Array.prototype.every.call(obj, callbackfn2), 'Array.prototype.every.call(obj, callbackfn2) !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-29.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-29.js index 9abe0e9365..eaf990b5b7 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-29.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-29.js @@ -9,19 +9,19 @@ description: > + 1) ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var obj = { - 0: 11, - 1: 9, - length: 4294967297 - }; +var obj = { + 0: 11, + 1: 9, + length: 4294967297 +}; assert.sameValue(Array.prototype.every.call(obj, callbackfn1), false, 'Array.prototype.every.call(obj, callbackfn1)'); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-3.js index c792c27c66..4636ccf3ec 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-3.js @@ -7,14 +7,17 @@ es5id: 15.4.4.16-3-3 description: Array.prototype.every - value of 'length' is a number (value is 0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var obj = { 0: 9, length: 0 }; +var obj = { + 0: 9, + length: 0 +}; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-4.js index c17e335a4e..68a0bf50a7 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-4.js @@ -7,14 +7,17 @@ es5id: 15.4.4.16-3-4 description: Array.prototype.every - value of 'length' is a number (value is +0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var obj = { 0: 9, length: +0 }; +var obj = { + 0: 9, + length: +0 +}; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-5.js index eb9f48ba3c..d041e7add3 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-5.js @@ -7,14 +7,17 @@ es5id: 15.4.4.16-3-5 description: Array.prototype.every - value of 'length' is a number (value is -0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var obj = { 0: 9, length: -0 }; +var obj = { + 0: 9, + length: -0 +}; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-6.js index 1d1b15ef18..0ea6839cb5 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-6.js @@ -9,15 +9,20 @@ description: > positive) ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var obj = { 0: 12, 1: 11, 2: 9, length: 2 }; +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: 2 +}; assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-7.js index 977bb65f9f..880c26aab8 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-7.js @@ -9,15 +9,20 @@ description: > negative) ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var obj = { 0: 12, 1: 11, 2: 9, length: -4294967294 }; //length used to exec while loop is 0 +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: -4294967294 +}; //length used to exec while loop is 0 assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); assert(Array.prototype.every.call(obj, callbackfn2), 'Array.prototype.every.call(obj, callbackfn2) !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-8.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-8.js index 6496da4f0a..47a09300da 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-8.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-8.js @@ -9,14 +9,17 @@ description: > Infinity) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var obj = { 0: 9, length: Infinity }; +var obj = { + 0: 9, + length: Infinity +}; assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-9.js index 9499801b8e..7166e98b84 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-9.js @@ -9,14 +9,17 @@ description: > -Infinity) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var obj = { 0: 9, length: -Infinity }; +var obj = { + 0: 9, + length: -Infinity +}; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-4-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-4-1.js index 8cefedbe04..c0d6ba0cb4 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-4-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-4-1.js @@ -7,7 +7,7 @@ es5id: 15.4.4.16-4-1 description: Array.prototype.every throws TypeError if callbackfn is undefined ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.every(); + arr.every(); }); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-4-10.js b/test/built-ins/Array/prototype/every/15.4.4.16-4-10.js index abbff39d21..2f458442b8 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-4-10.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-4-10.js @@ -9,15 +9,18 @@ description: > was thrown by step 2 ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - Object.defineProperty(obj, "length", { - get: function () { - throw new Test262Error(); - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + throw new Test262Error(); + }, + configurable: true +}); assert.throws(Test262Error, function() { - Array.prototype.every.call(obj, undefined); + Array.prototype.every.call(obj, undefined); }); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-4-11.js b/test/built-ins/Array/prototype/every/15.4.4.16-4-11.js index 4e4b09b69c..2cd9bba54c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-4-11.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-4-11.js @@ -9,19 +9,22 @@ description: > was thrown by step 3 ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - throw new Test262Error(); - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + toString: function() { + throw new Test262Error(); + } + }; + }, + configurable: true +}); assert.throws(Test262Error, function() { - Array.prototype.every.call(obj, undefined); + Array.prototype.every.call(obj, undefined); }); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-4-12.js b/test/built-ins/Array/prototype/every/15.4.4.16-4-12.js index ded81c8a43..a137acbc31 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-4-12.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-4-12.js @@ -7,8 +7,8 @@ es5id: 15.4.4.16-4-12 description: Array.prototype.every - 'callbackfn' is a function ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} assert.sameValue([11, 9].every(callbackfn), false, '[11, 9].every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-4-15.js b/test/built-ins/Array/prototype/every/15.4.4.16-4-15.js index 2f4fa8f8ca..207a615ffe 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-4-15.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-4-15.js @@ -9,27 +9,29 @@ description: > passing undefined for callbackfn ---*/ - var obj = { 10: 10 }; - var lengthAccessed = false; - var loopAccessed = false; +var obj = { + 10: 10 +}; +var lengthAccessed = false; +var loopAccessed = false; - Object.defineProperty(obj, "length", { - get: function () { - lengthAccessed = true; - return 20; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + lengthAccessed = true; + return 20; + }, + configurable: true +}); - Object.defineProperty(obj, "0", { - get: function () { - loopAccessed = true; - return 10; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + loopAccessed = true; + return 10; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.every.call(obj); + Array.prototype.every.call(obj); }); assert(lengthAccessed, 'lengthAccessed !== true'); assert.sameValue(loopAccessed, false, 'loopAccessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-4-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-4-3.js index 103f22d6a0..2613f1cf33 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-4-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-4-3.js @@ -7,7 +7,7 @@ es5id: 15.4.4.16-4-3 description: Array.prototype.every throws TypeError if callbackfn is null ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.every(null); + arr.every(null); }); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-4-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-4-4.js index 1b76313323..6a1c037720 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-4-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-4-4.js @@ -7,7 +7,7 @@ es5id: 15.4.4.16-4-4 description: Array.prototype.every throws TypeError if callbackfn is boolean ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.every(true); + arr.every(true); }); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-4-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-4-5.js index deb04c6f25..a2d5c7aefa 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-4-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-4-5.js @@ -7,7 +7,7 @@ es5id: 15.4.4.16-4-5 description: Array.prototype.every throws TypeError if callbackfn is number ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.every(5); + arr.every(5); }); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-4-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-4-6.js index 6597e45998..eb07314b17 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-4-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-4-6.js @@ -7,7 +7,7 @@ es5id: 15.4.4.16-4-6 description: Array.prototype.every throws TypeError if callbackfn is string ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.every("abc"); + arr.every("abc"); }); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-4-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-4-7.js index f512f2151b..51e13d6d18 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-4-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-4-7.js @@ -9,7 +9,7 @@ description: > without a Call internal method ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.every( {} ); + arr.every({}); }); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-4-8.js b/test/built-ins/Array/prototype/every/15.4.4.16-4-8.js index a3e75ff59e..cb6ef73b10 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-4-8.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-4-8.js @@ -9,18 +9,21 @@ description: > visible when an exception occurs ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - var accessed = false; +var accessed = false; - Object.defineProperty(obj, "length", { - get: function () { - accessed = true; - return 2; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + accessed = true; + return 2; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.every.call(obj, null); + Array.prototype.every.call(obj, null); }); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-4-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-4-9.js index fc1acaa02d..efe205eb4a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-4-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-4-9.js @@ -9,22 +9,25 @@ description: > visible when an exception occurs ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - var accessed = false; +var accessed = false; - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - accessed = true; - return "2"; - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + toString: function() { + accessed = true; + return "2"; + } + }; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.every.call(obj, null); + Array.prototype.every.call(obj, null); }); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-1-s.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-1-s.js index 989a6ee203..2d906315f2 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-1-s.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-1-s.js @@ -8,14 +8,14 @@ description: Array.prototype.every - thisArg not passed to strict callbackfn flags: [noStrict] ---*/ - var innerThisCorrect = false; +var innerThisCorrect = false; - function callbackfn(val, idx, obj) { - "use strict"; - innerThisCorrect = this===undefined; - return true; - } +function callbackfn(val, idx, obj) { + "use strict"; + innerThisCorrect = this === undefined; + return true; +} - [1].every(callbackfn); +[1].every(callbackfn); assert(innerThisCorrect, 'innerThisCorrect !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-1.js index 360f9850fb..a3bdbc170c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-1.js @@ -10,11 +10,11 @@ flags: [noStrict] var global = this; - function callbackfn(val, idx, obj) - { - return this === global; - } +function callbackfn(val, idx, obj) +{ + return this === global; +} - var arr = [1]; +var arr = [1]; assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-10.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-10.js index 5d7c8a6e9a..087f9c2a38 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-10.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-10.js @@ -7,13 +7,13 @@ es5id: 15.4.4.16-5-10 description: Array.prototype.every - Array Object can be used as thisArg ---*/ - var accessed = false; - var objArray = []; +var accessed = false; +var objArray = []; - function callbackfn(val, idx, obj) { - accessed = true; - return this === objArray; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === objArray; +} diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-11.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-11.js index 41792ec1d0..dce15d0f46 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-11.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-11.js @@ -7,13 +7,13 @@ es5id: 15.4.4.16-5-11 description: Array.prototype.every - String Object can be used as thisArg ---*/ - var accessed = false; - var objString = new String(); +var accessed = false; +var objString = new String(); - function callbackfn(val, idx, obj) { - accessed = true; - return this === objString; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === objString; +} diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-12.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-12.js index cbb7ddf8b0..97b5771b3f 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-12.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-12.js @@ -7,13 +7,13 @@ es5id: 15.4.4.16-5-12 description: Array.prototype.every - Boolean Object can be used as thisArg ---*/ - var accessed = false; - var objBoolean = new Boolean(); +var accessed = false; +var objBoolean = new Boolean(); - function callbackfn(val, idx, obj) { - accessed = true; - return this === objBoolean; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === objBoolean; +} diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-13.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-13.js index 34e73df321..da8f799386 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-13.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-13.js @@ -7,13 +7,13 @@ es5id: 15.4.4.16-5-13 description: Array.prototype.every - Number Object can be used as thisArg ---*/ - var accessed = false; - var objNumber = new Number(); +var accessed = false; +var objNumber = new Number(); - function callbackfn(val, idx, obj) { - accessed = true; - return this === objNumber; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === objNumber; +} assert([11].every(callbackfn, objNumber), '[11].every(callbackfn, objNumber) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-14.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-14.js index 697ef848e9..a5cc48fbf7 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-14.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-14.js @@ -7,12 +7,12 @@ es5id: 15.4.4.16-5-14 description: Array.prototype.every - the Math object can be used as thisArg ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return this === Math; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === Math; +} assert([11].every(callbackfn, Math), '[11].every(callbackfn, Math) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-15.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-15.js index 66a64d987f..7133cd487a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-15.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-15.js @@ -7,13 +7,13 @@ es5id: 15.4.4.16-5-15 description: Array.prototype.every - Date Object can be used as thisArg ---*/ - var accessed = false; - var objDate = new Date(); +var accessed = false; +var objDate = new Date(); - function callbackfn(val, idx, obj) { - accessed = true; - return this === objDate; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === objDate; +} assert([11].every(callbackfn, objDate), '[11].every(callbackfn, objDate) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-16.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-16.js index 091caa14c3..1edd76714c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-16.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-16.js @@ -7,13 +7,13 @@ es5id: 15.4.4.16-5-16 description: Array.prototype.every - RegExp Object can be used as thisArg ---*/ - var accessed = false; - var objRegExp = new RegExp(); +var accessed = false; +var objRegExp = new RegExp(); - function callbackfn(val, idx, obj) { - accessed = true; - return this === objRegExp; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === objRegExp; +} assert([11].every(callbackfn, objRegExp), '[11].every(callbackfn, objRegExp) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-17.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-17.js index 9e9bd18e83..2a5162a9cd 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-17.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-17.js @@ -7,12 +7,12 @@ es5id: 15.4.4.16-5-17 description: Array.prototype.every - the JSON object can be used as thisArg ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return this === JSON; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === JSON; +} assert([11].every(callbackfn, JSON), '[11].every(callbackfn, JSON) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-18.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-18.js index a944bff817..bae882c7c6 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-18.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-18.js @@ -7,13 +7,13 @@ es5id: 15.4.4.16-5-18 description: Array.prototype.every - Error Object can be used as thisArg ---*/ - var accessed = false; - var objError = new RangeError(); +var accessed = false; +var objError = new RangeError(); - function callbackfn(val, idx, obj) { - accessed = true; - return this === objError; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === objError; +} assert([11].every(callbackfn, objError), '[11].every(callbackfn, objError) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-19.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-19.js index 7a3e06e099..3b39e1826f 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-19.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-19.js @@ -7,17 +7,17 @@ es5id: 15.4.4.16-5-19 description: Array.prototype.every - the Arguments object can be used as thisArg ---*/ - var accessed = false; - var arg; +var accessed = false; +var arg; - function callbackfn(val, idx, obj) { - accessed = true; - return this === arg; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === arg; +} - (function fun() { - arg = arguments; - }(1, 2, 3)); +(function fun() { + arg = arguments; +}(1, 2, 3)); assert([11].every(callbackfn, arg), '[11].every(callbackfn, arg) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-2.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-2.js index f15102c641..96c0d39a49 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-2.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-2.js @@ -7,14 +7,15 @@ es5id: 15.4.4.16-5-2 description: Array.prototype.every - thisArg is Object ---*/ - var res = false; - var o = new Object(); - o.res = true; - function callbackfn(val, idx, obj) - { - return this.res; - } +var res = false; +var o = new Object(); +o.res = true; - var arr = [1]; +function callbackfn(val, idx, obj) +{ + return this.res; +} + +var arr = [1]; assert.sameValue(arr.every(callbackfn, o), true, 'arr.every(callbackfn, o)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-21.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-21.js index 7da5e81930..50d36ddce6 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-21.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-21.js @@ -8,12 +8,12 @@ description: Array.prototype.every - the global object can be used as thisArg ---*/ var global = this; - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return this === global; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === global; +} assert([11].every(callbackfn, global), '[11].every(callbackfn, global) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-22.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-22.js index d580818a68..90dcfb2dfd 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-22.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-22.js @@ -7,12 +7,12 @@ es5id: 15.4.4.16-5-22 description: Array.prototype.every - boolean primitive can be used as thisArg ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return this.valueOf() === false; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this.valueOf() === false; +} assert([11].every(callbackfn, false), '[11].every(callbackfn, false) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-23.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-23.js index 7953a70064..ba19fd209f 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-23.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-23.js @@ -7,12 +7,12 @@ es5id: 15.4.4.16-5-23 description: Array.prototype.every - number primitive can be used as thisArg ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return this.valueOf() === 101; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this.valueOf() === 101; +} assert([11].every(callbackfn, 101), '[11].every(callbackfn, 101) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-24.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-24.js index c9da3d9910..4439dca25a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-24.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-24.js @@ -7,12 +7,12 @@ es5id: 15.4.4.16-5-24 description: Array.prototype.every - string primitive can be used as thisArg ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return this.valueOf() === "abc"; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this.valueOf() === "abc"; +} assert([11].every(callbackfn, "abc"), '[11].every(callbackfn, "abc") !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-3.js index 69f614ff84..1a1bb9b7da 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-3.js @@ -7,14 +7,15 @@ es5id: 15.4.4.16-5-3 description: Array.prototype.every - thisArg is Array ---*/ - var res = false; - var a = new Array(); - a.res = true; - function callbackfn(val, idx, obj) - { - return this.res; - } +var res = false; +var a = new Array(); +a.res = true; - var arr = [1]; +function callbackfn(val, idx, obj) +{ + return this.res; +} + +var arr = [1]; assert.sameValue(arr.every(callbackfn, a), true, 'arr.every(callbackfn, a)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-4.js index 45ee186d17..b3e03058ab 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-4.js @@ -9,15 +9,16 @@ description: > template(prototype) ---*/ - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } +var res = false; - function foo(){} - foo.prototype.res = true; - var f = new foo(); - var arr = [1]; +function callbackfn(val, idx, obj) +{ + return this.res; +} -assert.sameValue(arr.every(callbackfn,f), true, 'arr.every(callbackfn,f)'); +function foo() {} +foo.prototype.res = true; +var f = new foo(); +var arr = [1]; + +assert.sameValue(arr.every(callbackfn, f), true, 'arr.every(callbackfn,f)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-5.js index c0447933fd..47ce23ac64 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-5.js @@ -7,15 +7,16 @@ es5id: 15.4.4.16-5-5 description: Array.prototype.every - thisArg is object from object template ---*/ - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } +var res = false; - function foo(){} - var f = new foo(); - f.res = true; - var arr = [1]; +function callbackfn(val, idx, obj) +{ + return this.res; +} -assert.sameValue(arr.every(callbackfn,f), true, 'arr.every(callbackfn,f)'); +function foo() {} +var f = new foo(); +f.res = true; +var arr = [1]; + +assert.sameValue(arr.every(callbackfn, f), true, 'arr.every(callbackfn,f)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-6.js index f871e3a43f..a71c98ee2f 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-6.js @@ -7,14 +7,15 @@ es5id: 15.4.4.16-5-6 description: Array.prototype.every - thisArg is function ---*/ - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } +var res = false; - function foo(){} - foo.res = true; - var arr = [1]; +function callbackfn(val, idx, obj) +{ + return this.res; +} -assert.sameValue(arr.every(callbackfn,foo), true, 'arr.every(callbackfn,foo)'); +function foo() {} +foo.res = true; +var arr = [1]; + +assert.sameValue(arr.every(callbackfn, foo), true, 'arr.every(callbackfn,foo)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-7.js index 3fa6fc9e7b..ff38fcdc42 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-7.js @@ -7,12 +7,12 @@ es5id: 15.4.4.16-5-7 description: Array.prototype.every - built-in functions can be used as thisArg ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return this === eval; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === eval; +} assert([11].every(callbackfn, eval), '[11].every(callbackfn, eval) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-9.js index 400c0ca845..2757891428 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-9.js @@ -7,13 +7,13 @@ es5id: 15.4.4.16-5-9 description: Array.prototype.every - Function Object can be used as thisArg ---*/ - var accessed = false; - var objFunction = function () { }; +var accessed = false; +var objFunction = function() {}; - function callbackfn(val, idx, obj) { - accessed = true; - return this === objFunction; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === objFunction; +} assert([11].every(callbackfn, objFunction), '[11].every(callbackfn, objFunction) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-1.js index e8d6745dde..22bcfaff63 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-1.js @@ -9,18 +9,18 @@ description: > the call ---*/ - var calledForThree = false; +var calledForThree = false; - function callbackfn(val, Idx, obj) - { - arr[2] = 3; - if(val == 3) - calledForThree = true; - return true; - } +function callbackfn(val, Idx, obj) +{ + arr[2] = 3; + if (val == 3) + calledForThree = true; + return true; +} - var arr = [1,2,,4,5]; +var arr = [1, 2, , 4, 5]; - var res = arr.every(callbackfn); +var res = arr.every(callbackfn); assert(calledForThree, 'calledForThree !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-2.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-2.js index fcb91af176..47d3ed4e52 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-2.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-2.js @@ -9,16 +9,16 @@ description: > after the call ---*/ - function callbackfn(val, Idx, obj) - { - arr[4] = 6; - if(val < 6) - return true; - else - return false; - } +function callbackfn(val, Idx, obj) +{ + arr[4] = 6; + if (val < 6) + return true; + else + return false; +} - var arr = [1,2,3,4,5]; +var arr = [1, 2, 3, 4, 5]; assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-3.js index 2145752959..08531fe619 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-3.js @@ -9,16 +9,16 @@ description: > after the call ---*/ - function callbackfn(val, Idx, obj) - { - delete arr[2]; - if(val == 3) - return false; - else - return true; - } +function callbackfn(val, Idx, obj) +{ + delete arr[2]; + if (val == 3) + return false; + else + return true; +} - var arr = [1,2,3,4,5]; +var arr = [1, 2, 3, 4, 5]; assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-4.js index 0cfdd4ebce..9cbb2eda08 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-4.js @@ -9,16 +9,16 @@ description: > Array.length is decreased ---*/ - function callbackfn(val, Idx, obj) - { - arr.length = 3; - if(val < 4) - return true; - else - return false; - } +function callbackfn(val, Idx, obj) +{ + arr.length = 3; + if (val < 4) + return true; + else + return false; +} - var arr = [1,2,3,4,6]; +var arr = [1, 2, 3, 4, 6]; assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-5.js index c7cfcd23ee..c4c062bdff 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-5.js @@ -9,18 +9,18 @@ description: > sparse array ---*/ - function callbackfn(val, Idx, obj) - { - arr[1000] = 3; - if(val < 3) - return true; - else - return false; - } +function callbackfn(val, Idx, obj) +{ + arr[1000] = 3; + if (val < 3) + return true; + else + return false; +} - var arr = new Array(10); - arr[1] = 1; - arr[2] = 2; +var arr = new Array(10); +arr[1] = 1; +arr[2] = 2; assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-6.js index 1cf937c7cd..45bcdd29a1 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-6.js @@ -9,19 +9,19 @@ description: > call when same index is also present in prototype ---*/ - function callbackfn(val, Idx, obj) - { - delete arr[2]; - if(val == 3) - return false; - else - return true; - } +function callbackfn(val, Idx, obj) +{ + delete arr[2]; + if (val == 3) + return false; + else + return true; +} - Array.prototype[2] = 3; - var arr = [1,2,3,4,5]; +Array.prototype[2] = 3; +var arr = [1, 2, 3, 4, 5]; - var res = arr.every(callbackfn); - delete Array.prototype[2]; +var res = arr.every(callbackfn); +delete Array.prototype[2]; assert.sameValue(res, false, 'res'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-7.js index 7eaab50788..d25bd744d2 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-7.js @@ -10,16 +10,16 @@ description: > Array.prototype.every is called for all elements ---*/ - var o = new Object(); - o.arr = [1, 2, 3, 4, 5]; +var o = new Object(); +o.arr = [1, 2, 3, 4, 5]; - function callbackfn(val, Idx, obj) { - delete o.arr; - if (val === Idx + 1) - return true; - else - return false; - } +function callbackfn(val, Idx, obj) { + delete o.arr; + if (val === Idx + 1) + return true; + else + return false; +} assert(o.arr.every(callbackfn), 'o.arr.every(callbackfn) !== true'); assert.sameValue(o.hasOwnProperty("arr"), false, 'o.hasOwnProperty("arr")'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-8.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-8.js index 079db7b2d0..ff2f0f8bed 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-8.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-8.js @@ -7,14 +7,18 @@ es5id: 15.4.4.16-7-8 description: Array.prototype.every - no observable effects occur if len is 0 ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var obj = { 0: 11, 1: 12, length: 0 }; +var obj = { + 0: 11, + 1: 12, + length: 0 +}; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-9.js index ded5d48e25..c1bbdfc1b1 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-9.js @@ -9,22 +9,26 @@ description: > number of iterations ---*/ - var called = 0; +var called = 0; - function callbackfn(val, idx, obj) { - called++; - return val > 10; - } +function callbackfn(val, idx, obj) { + called++; + return val > 10; +} - var obj = { 1: 12, 2: 9, length: 2 }; +var obj = { + 1: 12, + 2: 9, + length: 2 +}; - Object.defineProperty(obj, "0", { - get: function () { - obj.length = 3; - return 11; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + obj.length = 3; + return 11; + }, + configurable: true +}); assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-1.js index e0f07ee54e..abcf91365c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-1.js @@ -9,15 +9,16 @@ description: > been assigned values ---*/ - var callCnt = 0.; - function callbackfn(val, Idx, obj) - { - callCnt++; - return true; - } +var callCnt = 0.; - var arr = new Array(10); - arr[1] = undefined; - arr.every(callbackfn); +function callbackfn(val, Idx, obj) +{ + callCnt++; + return true; +} + +var arr = new Array(10); +arr[1] = undefined; +arr.every(callbackfn); assert.sameValue(callCnt, 1, 'callCnt'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-10.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-10.js index e27ff642f6..913796b1f9 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-10.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-10.js @@ -9,22 +9,26 @@ description: > prototype index property not to be visited on an Array-like Object ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx !== 1; - } - var arr = { 2: 2, length: 20 }; +var accessed = false; - Object.defineProperty(arr, "0", { - get: function () { - delete Object.prototype[1]; - return 0; - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + accessed = true; + return idx !== 1; +} +var arr = { + 2: 2, + length: 20 +}; - Object.prototype[1] = 1; +Object.defineProperty(arr, "0", { + get: function() { + delete Object.prototype[1]; + return 0; + }, + configurable: true +}); + +Object.prototype[1] = 1; assert(Array.prototype.every.call(arr, callbackfn), 'Array.prototype.every.call(arr, callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-11.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-11.js index 54c86d50ed..c9ff957cba 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-11.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-11.js @@ -9,22 +9,23 @@ description: > prototype index property not to be visited on an Array ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx !== 1; - } - var arr = [0, , 2]; +var accessed = false; - Object.defineProperty(arr, "0", { - get: function () { - delete Array.prototype[1]; - return 0; - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + accessed = true; + return idx !== 1; +} +var arr = [0, , 2]; - Array.prototype[1] = 1; +Object.defineProperty(arr, "0", { + get: function() { + delete Array.prototype[1]; + return 0; + }, + configurable: true +}); + +Array.prototype[1] = 1; assert(arr.every(callbackfn), 'arr.every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-12.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-12.js index fda1fe2a7e..63282ca554 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-12.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-12.js @@ -10,23 +10,28 @@ description: > Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - return false; - } else { - return true; - } - } - var arr = { 0: 0, 1: 111, 2: 2, length: 10 }; +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + return false; + } else { + return true; + } +} +var arr = { + 0: 0, + 1: 111, + 2: 2, + length: 10 +}; - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); - Object.prototype[1] = 1; +Object.prototype[1] = 1; assert.sameValue(Array.prototype.every.call(arr, callbackfn), false, 'Array.prototype.every.call(arr, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-13.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-13.js index 4032502e51..26f3f17d17 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-13.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-13.js @@ -9,23 +9,23 @@ description: > property causes prototype index property to be visited on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - return false; - } else { - return true; - } - } - var arr = [0, 111, 2]; +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + return false; + } else { + return true; + } +} +var arr = [0, 111, 2]; - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); - Array.prototype[1] = 1; +Array.prototype[1] = 1; assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-14.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-14.js index 5115a27a35..a017ff9643 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-14.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-14.js @@ -9,20 +9,21 @@ description: > property not to be visited ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx !== 3; - } - var arr = [0, 1, 2, "last"]; +var accessed = false; - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 3; - return 0; - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + accessed = true; + return idx !== 3; +} +var arr = [0, 1, 2, "last"]; + +Object.defineProperty(arr, "0", { + get: function() { + arr.length = 3; + return 0; + }, + configurable: true +}); assert(arr.every(callbackfn), 'arr.every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-15.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-15.js index 03fa5344fe..eeb2786e3b 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-15.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-15.js @@ -9,28 +9,28 @@ description: > property causes prototype index property to be visited ---*/ - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "prototype") { - return false; - } else { - return true; - } - } - var arr = [0, 1, 2]; +function callbackfn(val, idx, obj) { + if (idx === 2 && val === "prototype") { + return false; + } else { + return true; + } +} +var arr = [0, 1, 2]; - Object.defineProperty(Array.prototype, "2", { - get: function () { - return "prototype"; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "2", { + get: function() { + return "prototype"; + }, + configurable: true +}); - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + arr.length = 2; + return 1; + }, + configurable: true +}); assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-16.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-16.js index 602b4b80c2..2bd39ef0ab 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-16.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-16.js @@ -10,29 +10,29 @@ description: > flags: [noStrict] ---*/ - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "unconfigurable") { - return false; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 2 && val === "unconfigurable") { + return false; + } else { + return true; + } +} - var arr = [0, 1, 2]; +var arr = [0, 1, 2]; - Object.defineProperty(arr, "2", { - get: function () { - return "unconfigurable"; - }, - configurable: false - }); +Object.defineProperty(arr, "2", { + get: function() { + return "unconfigurable"; + }, + configurable: false +}); - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + arr.length = 2; + return 1; + }, + configurable: true +}); assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-2.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-2.js index fca306466a..56c5b404f3 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-2.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-2.js @@ -7,22 +7,22 @@ es5id: 15.4.4.16-7-b-2 description: Array.prototype.every - added properties in step 2 are visible here ---*/ - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "length") { - return false; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 2 && val === "length") { + return false; + } else { + return true; + } +} - var arr = { }; +var arr = {}; - Object.defineProperty(arr, "length", { - get: function () { - arr[2] = "length"; - return 3; - }, - configurable: true - }); +Object.defineProperty(arr, "length", { + get: function() { + arr[2] = "length"; + return 3; + }, + configurable: true +}); assert.sameValue(Array.prototype.every.call(arr, callbackfn), false, 'Array.prototype.every.call(arr, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-3.js index 9c7afe89ae..ca526b8ca2 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-3.js @@ -9,20 +9,24 @@ description: > here ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx !== 2; - } - var arr = { 2: 6.99, 8: 19}; +var accessed = false; - Object.defineProperty(arr, "length", { - get: function () { - delete arr[2]; - return 10; - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + accessed = true; + return idx !== 2; +} +var arr = { + 2: 6.99, + 8: 19 +}; + +Object.defineProperty(arr, "length", { + get: function() { + delete arr[2]; + return 10; + }, + configurable: true +}); assert(Array.prototype.every.call(arr, callbackfn), 'Array.prototype.every.call(arr, callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-4.js index dbcbe21dd1..691affd2cc 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-4.js @@ -9,27 +9,29 @@ description: > current position are visited on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - return false; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + return false; + } else { + return true; + } +} - var arr = { length: 2 }; +var arr = { + length: 2 +}; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(arr, "1", { + get: function() { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); assert.sameValue(Array.prototype.every.call(arr, callbackfn), false, 'Array.prototype.every.call(arr, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-5.js index 5fd08b67e9..75cff0bfed 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-5.js @@ -9,27 +9,27 @@ description: > current position are visited on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - return false; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + return false; + } else { + return true; + } +} - var arr = [0, , 2]; +var arr = [0, , 2]; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(arr, "1", { + get: function() { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-6.js index 4a71a83894..27663980cc 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-6.js @@ -9,26 +9,28 @@ description: > current position are visited on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 6.99) { - return false; - } else { - return true; - } - } - var arr = { length: 2 }; +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 6.99) { + return false; + } else { + return true; + } +} +var arr = { + length: 2 +}; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(Object.prototype, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); assert.sameValue(Array.prototype.every.call(arr, callbackfn), false, 'Array.prototype.every.call(arr, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-7.js index 692c399de5..92daa04a19 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-7.js @@ -9,26 +9,26 @@ description: > current position are visited on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 6.99) { - return false; - } else { - return true; - } - } - var arr = [0, , 2]; +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 6.99) { + return false; + } else { + return true; + } +} +var arr = [0, , 2]; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(Array.prototype, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-8.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-8.js index 4bb911375b..76f5f1cc01 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-8.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-8.js @@ -9,27 +9,30 @@ description: > property not to be visited on an Array-like object ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx !== 1; - } - var obj = { length: 2 }; +var accessed = false; - Object.defineProperty(obj, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + accessed = true; + return idx !== 1; +} +var obj = { + length: 2 +}; - Object.defineProperty(obj, "0", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + return 6.99; + }, + configurable: true +}); + +Object.defineProperty(obj, "0", { + get: function() { + delete obj[1]; + return 0; + }, + configurable: true +}); assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-9.js index 2c340f8d63..9159db9860 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-9.js @@ -9,27 +9,28 @@ description: > property not to be visited on an Array ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx !== 1; - } - var arr = [1, 2]; +var accessed = false; - Object.defineProperty(arr, "1", { - get: function () { - return "6.99"; - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + accessed = true; + return idx !== 1; +} +var arr = [1, 2]; - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + return "6.99"; + }, + configurable: true +}); + +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); assert(arr.every(callbackfn), 'arr.every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-1.js index 579deb13d2..fd1e28b5f0 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-1.js @@ -9,15 +9,19 @@ description: > property on an Array-like object ---*/ - var kValue = { }; - function callbackfn(val, idx, obj) { - if (idx === 5) { - return val !== kValue; - } else { - return true; - } - } +var kValue = {}; - var obj = { 5: kValue, length: 100 }; +function callbackfn(val, idx, obj) { + if (idx === 5) { + return val !== kValue; + } else { + return true; + } +} + +var obj = { + 5: kValue, + length: 100 +}; assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-10.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-10.js index 1357bbb23a..653e5e2445 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-10.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-10.js @@ -9,21 +9,21 @@ description: > property on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 2) { - return val !== 12; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 2) { + return val !== 12; + } else { + return true; + } +} - var arr = []; +var arr = []; - Object.defineProperty(arr, "2", { - get: function () { - return 12; - }, - configurable: true - }); +Object.defineProperty(arr, "2", { + get: function() { + return 12; + }, + configurable: true +}); assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-11.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-11.js index 9527daf83e..4168c98f94 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-11.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-11.js @@ -10,27 +10,30 @@ description: > Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 5; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 5; + } else { + return true; + } +} - var proto = { 0: 5, 1: 6 }; +var proto = { + 0: 5, + 1: 6 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 10; +var child = new Con(); +child.length = 10; - Object.defineProperty(child, "0", { - get: function () { - return 11; - }, - configurable: true - }); +Object.defineProperty(child, "0", { + get: function() { + return 11; + }, + configurable: true +}); assert.sameValue(Array.prototype.every.call(child, callbackfn), false, 'Array.prototype.every.call(child, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-12.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-12.js index 54751e5662..c1f29b18b8 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-12.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-12.js @@ -9,23 +9,23 @@ description: > property that overrides an inherited data property on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 10; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 10; + } else { + return true; + } +} - var arr = []; +var arr = []; - Array.prototype[0] = 10; +Array.prototype[0] = 10; - Object.defineProperty(arr, "0", { - get: function () { - return 111; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + return 111; + }, + configurable: true +}); assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-13.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-13.js index aff2f0b0e6..5ffb1d5444 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-13.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-13.js @@ -10,35 +10,35 @@ description: > Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val === 6; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + return val === 6; + } else { + return true; + } +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "1", { - get: function () { - return 6; - }, - configurable: true - }); +Object.defineProperty(proto, "1", { + get: function() { + return 6; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 10; +var child = new Con(); +child.length = 10; - Object.defineProperty(child, "1", { - get: function () { - return 12; - }, - configurable: true - }); +Object.defineProperty(child, "1", { + get: function() { + return 12; + }, + configurable: true +}); assert.sameValue(Array.prototype.every.call(child, callbackfn), false, 'Array.prototype.every.call(child, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-14.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-14.js index 544ef938b3..1cf1f75a2b 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-14.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-14.js @@ -9,28 +9,28 @@ description: > property that overrides an inherited accessor property on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 5; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 5; + } else { + return true; + } +} - var arr = []; +var arr = []; - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 5; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return 5; + }, + configurable: true +}); - Object.defineProperty(arr, "0", { - get: function () { - return 11; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + return 11; + }, + configurable: true +}); assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-15.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-15.js index bc8906dfcb..aab698397b 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-15.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-15.js @@ -9,27 +9,27 @@ description: > accessor property on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val !== 11; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + return val !== 11; + } else { + return true; + } +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "1", { - get: function () { - return 11; - }, - configurable: true - }); +Object.defineProperty(proto, "1", { + get: function() { + return 11; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 20; +var child = new Con(); +child.length = 20; assert.sameValue(Array.prototype.every.call(child, callbackfn), false, 'Array.prototype.every.call(child, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-16.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-16.js index 20a2741807..c249d76b1e 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-16.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-16.js @@ -9,19 +9,19 @@ description: > accessor property on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val !== 11; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val !== 11; + } else { + return true; + } +} - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 11; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return 11; + }, + configurable: true +}); assert.sameValue([, , , ].every(callbackfn), false, '[, , , ].every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-17.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-17.js index 948c741bd8..9b52fef8fa 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-17.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-17.js @@ -9,18 +9,20 @@ description: > property without a get function on an Array-like object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return typeof val === "undefined"; - } +function callbackfn(val, idx, obj) { + accessed = true; + return typeof val === "undefined"; +} - var obj = { length: 2 }; - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); +var obj = { + length: 2 +}; +Object.defineProperty(obj, "1", { + set: function() {}, + configurable: true +}); assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-18.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-18.js index 7911ea384b..300d32b828 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-18.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-18.js @@ -9,19 +9,19 @@ description: > property without a get function on an Array ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return typeof val === "undefined"; - } +function callbackfn(val, idx, obj) { + accessed = true; + return typeof val === "undefined"; +} - var arr = []; +var arr = []; - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(arr, "0", { + set: function() {}, + configurable: true +}); assert(arr.every(callbackfn), 'arr.every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-19.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-19.js index 26ae16c5a3..cc150375a8 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-19.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-19.js @@ -10,20 +10,22 @@ description: > accessor property on an Array-like object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return typeof val === "undefined"; - } +function callbackfn(val, idx, obj) { + accessed = true; + return typeof val === "undefined"; +} - var obj = { length: 2 }; - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); +var obj = { + length: 2 +}; +Object.defineProperty(obj, "1", { + set: function() {}, + configurable: true +}); - Object.prototype[1] = 10; +Object.prototype[1] = 10; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-2.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-2.js index 5a201fde8b..5afcd1e0b7 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-2.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-2.js @@ -9,12 +9,12 @@ description: > property on an Array ---*/ - var called = 0; +var called = 0; - function callbackfn(val, idx, obj) { - called++; - return val === 11; - } +function callbackfn(val, idx, obj) { + called++; + return val === 11; +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert.sameValue(called, 1, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-20.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-20.js index 38e384bb23..8a5fa31391 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-20.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-20.js @@ -10,21 +10,21 @@ description: > accessor property on an Array ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return typeof val === "undefined"; - } +function callbackfn(val, idx, obj) { + accessed = true; + return typeof val === "undefined"; +} - var arr = []; +var arr = []; - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(arr, "0", { + set: function() {}, + configurable: true +}); - Array.prototype[0] = 100; +Array.prototype[0] = 100; assert(arr.every(callbackfn), 'arr.every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-21.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-21.js index c905856ef0..b6d06142ec 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-21.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-21.js @@ -9,24 +9,24 @@ description: > accessor property without a get function on an Array-like object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return typeof val === "undefined"; - } +function callbackfn(val, idx, obj) { + accessed = true; + return typeof val === "undefined"; +} - var proto = {}; - Object.defineProperty(proto, "1", { - set: function () { }, - configurable: true - }); +var proto = {}; +Object.defineProperty(proto, "1", { + set: function() {}, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 2; +var child = new Con(); +child.length = 2; assert(Array.prototype.every.call(child, callbackfn), 'Array.prototype.every.call(child, callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-22.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-22.js index aaa682d440..9477b201fd 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-22.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-22.js @@ -9,17 +9,17 @@ description: > accessor property without a get function on an Array ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return typeof val === "undefined"; - } +function callbackfn(val, idx, obj) { + accessed = true; + return typeof val === "undefined"; +} - Object.defineProperty(Array.prototype, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + set: function() {}, + configurable: true +}); assert([, ].every(callbackfn), '[, ].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-25.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-25.js index 2900f50338..c39d506641 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-25.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-25.js @@ -10,16 +10,16 @@ description: > less than number of parameters) ---*/ - var called = 0; +var called = 0; - function callbackfn(val, idx, obj) { - called++; - return val === 11; - } +function callbackfn(val, idx, obj) { + called++; + return val === 11; +} - var func = function (a, b) { - return Array.prototype.every.call(arguments, callbackfn); - }; +var func = function(a, b) { + return Array.prototype.every.call(arguments, callbackfn); +}; assert(func(11), 'func(11) !== true'); assert.sameValue(called, 1, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-26.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-26.js index 6e636fbb95..3e1c7da804 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-26.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-26.js @@ -10,22 +10,22 @@ description: > number of parameters) ---*/ - var called = 0; +var called = 0; - function callbackfn(val, idx, obj) { - called++; - if (idx === 0) { - return val === 11; - } else if (idx === 1) { - return val === 9; - } else { - return false; - } - } +function callbackfn(val, idx, obj) { + called++; + if (idx === 0) { + return val === 11; + } else if (idx === 1) { + return val === 9; + } else { + return false; + } +} - var func = function (a, b) { - return Array.prototype.every.call(arguments, callbackfn); - }; +var func = function(a, b) { + return Array.prototype.every.call(arguments, callbackfn); +}; assert(func(11, 9), 'func(11, 9) !== true'); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-27.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-27.js index c1c2719def..2002d812a1 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-27.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-27.js @@ -10,22 +10,22 @@ description: > greater than number of parameters) ---*/ - var called = 0; +var called = 0; - function callbackfn(val, idx, obj) { - called++; - if (idx < 2) { - return val > 10; - } else if (idx === 2) { - return val < 10; - } else { - return false; - } - } +function callbackfn(val, idx, obj) { + called++; + if (idx < 2) { + return val > 10; + } else if (idx === 2) { + return val < 10; + } else { + return false; + } +} - var func = function (a, b) { - return Array.prototype.every.call(arguments, callbackfn); - }; +var func = function(a, b) { + return Array.prototype.every.call(arguments, callbackfn); +}; assert(func(11, 12, 9), 'func(11, 12, 9) !== true'); assert.sameValue(called, 3, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-28.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-28.js index d39ed23c0e..425efe5899 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-28.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-28.js @@ -9,30 +9,30 @@ description: > iterations is observed on an Array ---*/ - var preIterVisible = false; - var arr = []; +var preIterVisible = false; +var arr = []; - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - Object.defineProperty(arr, "0", { - get: function () { - preIterVisible = true; - return 11; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + preIterVisible = true; + return 11; + }, + configurable: true +}); - Object.defineProperty(arr, "1", { - get: function () { - if (preIterVisible) { - return 9; - } else { - return 11; - } - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + if (preIterVisible) { + return 9; + } else { + return 11; + } + }, + configurable: true +}); assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-29.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-29.js index dbc91eb150..90c121c972 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-29.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-29.js @@ -9,30 +9,32 @@ description: > iterations is observed on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var preIterVisible = false; - var obj = { length: 2 }; +var preIterVisible = false; +var obj = { + length: 2 +}; - Object.defineProperty(obj, "0", { - get: function () { - preIterVisible = true; - return 11; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + preIterVisible = true; + return 11; + }, + configurable: true +}); - Object.defineProperty(obj, "1", { - get: function () { - if (preIterVisible) { - return 9; - } else { - return 13; - } - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + if (preIterVisible) { + return 9; + } else { + return 13; + } + }, + configurable: true +}); assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-3.js index c4fe3a8144..d0eac70c03 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-3.js @@ -9,21 +9,24 @@ description: > property that overrides an inherited data property on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 5) { - return val === 100; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 5) { + return val === 100; + } else { + return true; + } +} - var proto = { 0: 11, 5: 100 }; +var proto = { + 0: 11, + 5: 100 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[5] = "abc"; - child.length = 10; +var child = new Con(); +child[5] = "abc"; +child.length = 10; assert.sameValue(Array.prototype.every.call(child, callbackfn), false, 'Array.prototype.every.call(child, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-30.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-30.js index 3bd5fd6491..04f0d51381 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-30.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-30.js @@ -9,22 +9,28 @@ description: > terminate iteration on an Array-like object ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - if (idx > 1) { - accessed = true; - } - return true; - } +var accessed = false; - var obj = { 0: 11, 5: 10, 10: 8, length: 20 }; - Object.defineProperty(obj, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + if (idx > 1) { + accessed = true; + } + return true; +} + +var obj = { + 0: 11, + 5: 10, + 10: 8, + length: 20 +}; +Object.defineProperty(obj, "1", { + get: function() { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true +}); assert.throws(RangeError, function() { - Array.prototype.every.call(obj, callbackfn); + Array.prototype.every.call(obj, callbackfn); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-31.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-31.js index 3214e3376e..b28796ac80 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-31.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-31.js @@ -9,25 +9,26 @@ description: > terminate iteration on an Array ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - if (idx > 1) { - accessed = true; - } - return true; - } +var accessed = false; - var arr = []; - arr[5] = 10; - arr[10] = 100; +function callbackfn(val, idx, obj) { + if (idx > 1) { + accessed = true; + } + return true; +} - Object.defineProperty(arr, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); +var arr = []; +arr[5] = 10; +arr[10] = 100; + +Object.defineProperty(arr, "1", { + get: function() { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true +}); assert.throws(RangeError, function() { - arr.every(callbackfn); + arr.every(callbackfn); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-4.js index 9c598c783e..d9e81c6df3 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-4.js @@ -9,14 +9,15 @@ description: > property that overrides an inherited data property on an Array ---*/ - var called = 0; - function callbackfn(val, idx, obj) { - called++; - return val === 12; - } +var called = 0; - Array.prototype[0] = 11; - Array.prototype[1] = 11; +function callbackfn(val, idx, obj) { + called++; + return val === 12; +} + +Array.prototype[0] = 11; +Array.prototype[1] = 11; assert([12, 12].every(callbackfn), '[12, 12].every(callbackfn) !== true'); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-5.js index 988ac8f6e9..25c2670786 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-5.js @@ -10,32 +10,32 @@ description: > Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 5; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 5; + } else { + return true; + } +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "0", { - get: function () { - return 5; - }, - configurable: true - }); +Object.defineProperty(proto, "0", { + get: function() { + return 5; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 2; - Object.defineProperty(child, "0", { - value: 11, - configurable: true - }); - child[1] = 12; +var child = new Con(); +child.length = 2; +Object.defineProperty(child, "0", { + value: 11, + configurable: true +}); +child[1] = 12; assert.sameValue(Array.prototype.every.call(child, callbackfn), false, 'Array.prototype.every.call(child, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-6.js index da98350be5..9575fe8adb 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-6.js @@ -9,19 +9,19 @@ description: > property that overrides an inherited accessor property on an Array ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val === 11; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val === 11; +} - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 9; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return 9; + }, + configurable: true +}); assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-7.js index f0d11eb5bf..10d9ab7dbb 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-7.js @@ -9,22 +9,24 @@ description: > property on an Array-like object ---*/ - var kValue = 'abc'; +var kValue = 'abc'; - function callbackfn(val, idx, obj) { - if (idx === 5) { - return val !== kValue; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 5) { + return val !== kValue; + } else { + return true; + } +} - var proto = { 5: kValue }; +var proto = { + 5: kValue +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 10; +var child = new Con(); +child.length = 10; assert.sameValue(Array.prototype.every.call(child, callbackfn), false, 'Array.prototype.every.call(child, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-8.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-8.js index f36b542368..507af757aa 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-8.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-8.js @@ -9,14 +9,14 @@ description: > property on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val !== 13; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + return val !== 13; + } else { + return true; + } +} - Array.prototype[1] = 13; +Array.prototype[1] = 13; assert.sameValue([, , , ].every(callbackfn), false, '[, , , ].every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-9.js index 5b37f8ab44..49392cb8a7 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-9.js @@ -9,22 +9,25 @@ description: > property on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val !== 11; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val !== 11; + } else { + return true; + } +} - var obj = { 10: 10, length: 20 }; +var obj = { + 10: 10, + length: 20 +}; - Object.defineProperty(obj, "0", { - get: function () { - return 11; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + return 11; + }, + configurable: true +}); assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-1.js index 559925a696..fff7c361cd 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-1.js @@ -7,13 +7,13 @@ es5id: 15.4.4.16-7-c-ii-1 description: Array.prototype.every - callbackfn called with correct parameters ---*/ - function callbackfn(val, Idx, obj) - { - if(obj[Idx] === val) - return true; - } +function callbackfn(val, Idx, obj) +{ + if (obj[Idx] === val) + return true; +} - var arr = [0,1,2,3,4,5,6,7,8,9]; +var arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-10.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-10.js index 3a67002bfc..118130921c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-10.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-10.js @@ -9,12 +9,12 @@ description: > parameter ---*/ - var called = 0; +var called = 0; - function callbackfn(val) { - called++; - return val > 10; - } +function callbackfn(val) { + called++; + return val > 10; +} assert([11, 12].every(callbackfn), '[11, 12].every(callbackfn) !== true'); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-11.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-11.js index 41797d60cd..1ed6ecb0dc 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-11.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-11.js @@ -9,12 +9,12 @@ description: > parameter ---*/ - var called = 0; +var called = 0; - function callbackfn(val, idx) { - called++; - return val > 10 && arguments[2][idx] === val; - } +function callbackfn(val, idx) { + called++; + return val > 10 && arguments[2][idx] === val; +} assert([11, 12].every(callbackfn), '[11, 12].every(callbackfn) !== true'); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-12.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-12.js index 0724d0b3fa..62eefe55bb 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-12.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-12.js @@ -9,12 +9,12 @@ description: > parameter ---*/ - var called = 0; +var called = 0; - function callbackfn(val, idx, obj) { - called++; - return val > 10 && obj[idx] === val; - } +function callbackfn(val, idx, obj) { + called++; + return val > 10 && obj[idx] === val; +} assert([11, 12, 13].every(callbackfn), '[11, 12, 13].every(callbackfn) !== true'); assert.sameValue(called, 3, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-13.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-13.js index 340b49aff1..8f30c0a8c4 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-13.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-13.js @@ -9,12 +9,12 @@ description: > get parameter value ---*/ - var called = 0; +var called = 0; - function callbackfn() { - called++; - return arguments[2][arguments[1]] === arguments[0]; - } +function callbackfn() { + called++; + return arguments[2][arguments[1]] === arguments[0]; +} assert([11, 12].every(callbackfn), '[11, 12].every(callbackfn) !== true'); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-16.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-16.js index f9a5dc890a..379efe7654 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-16.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-16.js @@ -9,14 +9,17 @@ description: > when T is not an object (T is a boolean primitive) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return this.valueOf() !== false; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this.valueOf() !== false; +} - var obj = { 0: 11, length: 2 }; +var obj = { + 0: 11, + length: 2 +}; assert.sameValue(Array.prototype.every.call(obj, callbackfn, false), false, 'Array.prototype.every.call(obj, callbackfn, false)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-17.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-17.js index 3732ea4417..f9d83678ec 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-17.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-17.js @@ -9,14 +9,17 @@ description: > when T is not an object (T is a number primitive) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, o) { - accessed = true; - return 5 === this.valueOf(); - } +function callbackfn(val, idx, o) { + accessed = true; + return 5 === this.valueOf(); +} - var obj = { 0: 11, length: 2 }; +var obj = { + 0: 11, + length: 2 +}; assert(Array.prototype.every.call(obj, callbackfn, 5), 'Array.prototype.every.call(obj, callbackfn, 5) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-18.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-18.js index 3392433cbe..17c1668bc2 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-18.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-18.js @@ -9,14 +9,17 @@ description: > when T is not an object (T is a string primitive) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return 'hello' === this.valueOf(); - } +function callbackfn(val, idx, obj) { + accessed = true; + return 'hello' === this.valueOf(); +} - var obj = { 0: 11, length: 2 }; +var obj = { + 0: 11, + length: 2 +}; assert(Array.prototype.every.call(obj, callbackfn, "hello"), 'Array.prototype.every.call(obj, callbackfn, "hello") !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-19.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-19.js index f861f38e61..cc7626465e 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-19.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-19.js @@ -7,14 +7,19 @@ es5id: 15.4.4.16-7-c-ii-19 description: Array.prototype.every - non-indexed properties are not called ---*/ - var called = 0; +var called = 0; - function callbackfn(val, idx, obj) { - called++; - return val !== 8; - } +function callbackfn(val, idx, obj) { + called++; + return val !== 8; +} - var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 }; +var obj = { + 0: 11, + 10: 12, + non_index_property: 8, + length: 20 +}; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-2.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-2.js index 0194ce3871..daacdfda48 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-2.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-2.js @@ -7,14 +7,14 @@ es5id: 15.4.4.16-7-c-ii-2 description: Array.prototype.every - callbackfn takes 3 arguments ---*/ - function callbackfn(val, Idx, obj) - { - if(arguments.length === 3) //verify if callbackfn was called with 3 parameters - return true; - } +function callbackfn(val, Idx, obj) +{ + if (arguments.length === 3) //verify if callbackfn was called with 3 parameters + return true; +} - var arr = [0,1,true,null,new Object(),"five"]; - arr[999999] = -6.6; +var arr = [0, 1, true, null, new Object(), "five"]; +arr[999999] = -6.6; assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-20.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-20.js index 9cb001e0c8..23fe1f4c11 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-20.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-20.js @@ -9,15 +9,20 @@ description: > (thisArg is correct) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return 10 === this.threshold; - } +function callbackfn(val, idx, obj) { + accessed = true; + return 10 === this.threshold; +} - var thisArg = { threshold: 10 }; +var thisArg = { + threshold: 10 +}; - var obj = { 0: 11, length: 1 }; +var obj = { + 0: 11, + length: 1 +}; assert(Array.prototype.every.call(obj, callbackfn, thisArg), 'Array.prototype.every.call(obj, callbackfn, thisArg) !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-21.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-21.js index 2d193c698e..4153657136 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-21.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-21.js @@ -9,21 +9,25 @@ description: > (kValue is correct) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - if (idx === 0) { - return val === 11; - } +function callbackfn(val, idx, obj) { + accessed = true; + if (idx === 0) { + return val === 11; + } - if (idx === 1) { - return val === 12; - } + if (idx === 1) { + return val === 12; + } - } +} - var obj = { 0: 11, 1: 12, length: 2 }; +var obj = { + 0: 11, + 1: 12, + length: 2 +}; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-22.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-22.js index 524d619652..bd56fc0a95 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-22.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-22.js @@ -9,21 +9,25 @@ description: > (the index k is correct) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - if (val === 11) { - return idx === 0; - } +function callbackfn(val, idx, obj) { + accessed = true; + if (val === 11) { + return idx === 0; + } - if (val === 12) { - return idx === 1; - } + if (val === 12) { + return idx === 1; + } - } +} - var obj = { 0: 11, 1: 12, length: 2 }; +var obj = { + 0: 11, + 1: 12, + length: 2 +}; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-23.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-23.js index e5567884be..59a1e55662 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-23.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-23.js @@ -9,13 +9,17 @@ description: > (this object O is correct) ---*/ - var called = 0; - var obj = { 0: 11, 1: 12, length: 2 }; +var called = 0; +var obj = { + 0: 11, + 1: 12, + length: 2 +}; - function callbackfn(val, idx, o) { - called++; - return obj === o; - } +function callbackfn(val, idx, o) { + called++; + return obj === o; +} assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-3.js index 39da9d01fe..f35df89130 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-3.js @@ -9,17 +9,18 @@ description: > returns false ---*/ - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - if(idx > 5) - return false; - else - return true; - } +var callCnt = 0; - var arr = [0,1,2,3,4,5,6,7,8,9]; +function callbackfn(val, idx, obj) +{ + callCnt++; + if (idx > 5) + return false; + else + return true; +} + +var arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-4.js index 9a4216a673..07a4d691a6 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-4.js @@ -9,18 +9,19 @@ description: > order ---*/ - var arr = [0, 1, 2, 3, 4, 5]; - var lastIdx = 0; - var called = 0; - function callbackfn(val, idx, o) { - called++; - if (lastIdx !== idx) { - return false; - } else { - lastIdx++; - return true; - } - } +var arr = [0, 1, 2, 3, 4, 5]; +var lastIdx = 0; +var called = 0; + +function callbackfn(val, idx, o) { + called++; + if (lastIdx !== idx) { + return false; + } else { + lastIdx++; + return true; + } +} assert(arr.every(callbackfn), 'arr.every(callbackfn) !== true'); assert.sameValue(arr.length, called, 'arr.length'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-5.js index edd62427fb..f604f96720 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-5.js @@ -9,24 +9,24 @@ description: > iteration and not prior to starting the loop on an Array ---*/ - var called = 0; - var kIndex = []; +var called = 0; +var kIndex = []; - //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. - function callbackfn(val, idx, obj) { - called++; - //Each position should be visited one time, which means k is accessed one time during iterations. - if (typeof kIndex[idx] === "undefined") { - //when current position is visited, its previous index should has been visited. - if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") { - return false; - } - kIndex[idx] = 1; - return true; - } else { - return false; - } - } +//By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. +function callbackfn(val, idx, obj) { + called++; + //Each position should be visited one time, which means k is accessed one time during iterations. + if (typeof kIndex[idx] === "undefined") { + //when current position is visited, its previous index should has been visited. + if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") { + return false; + } + kIndex[idx] = 1; + return true; + } else { + return false; + } +} assert([11, 12, 13, 14].every(callbackfn, undefined), '[11, 12, 13, 14].every(callbackfn, undefined) !== true'); assert.sameValue(called, 4, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-6.js index d1c33e9674..df9f83143c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-6.js @@ -7,17 +7,20 @@ es5id: 15.4.4.16-7-c-ii-6 description: Array.prototype.every - arguments to callbackfn are self consistent ---*/ - var accessed = false; - var thisArg = {}; - var obj = { 0: 11, length: 1 }; +var accessed = false; +var thisArg = {}; +var obj = { + 0: 11, + length: 1 +}; - function callbackfn() { - accessed = true; - return this === thisArg && - arguments[0] === 11 && - arguments[1] === 0 && - arguments[2] === obj; - } +function callbackfn() { + accessed = true; + return this === thisArg && + arguments[0] === 11 && + arguments[1] === 0 && + arguments[2] === obj; +} assert(Array.prototype.every.call(obj, callbackfn, thisArg), 'Array.prototype.every.call(obj, callbackfn, thisArg) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-7.js index d3f0f8eff8..c1a6345d83 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-7.js @@ -9,20 +9,25 @@ description: > callbackfn terminate iteration ---*/ - var called = 0; +var called = 0; - function callbackfn(val, idx, obj) { - called++; - if (called === 1) { - throw new Test262Error("Exception occurred in callbackfn"); - } - return true; - } +function callbackfn(val, idx, obj) { + called++; + if (called === 1) { + throw new Test262Error("Exception occurred in callbackfn"); + } + return true; +} - var obj = { 0: 11, 4: 10, 10: 8, length: 20 }; +var obj = { + 0: 11, + 4: 10, + 10: 8, + length: 20 +}; assert.throws(Test262Error, function() { - Array.prototype.every.call(obj, callbackfn); + Array.prototype.every.call(obj, callbackfn); }); assert.sameValue(called, 1, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-8.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-8.js index 26fb2b97a9..6f015b207b 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-8.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-8.js @@ -9,14 +9,18 @@ description: > iterations is observed ---*/ - var obj = { 0: 11, 1: 12, length: 2 }; +var obj = { + 0: 11, + 1: 12, + length: 2 +}; - function callbackfn(val, idx, o) { - if (idx === 0) { - obj[idx + 1] = 8; - } - return val > 10; - } +function callbackfn(val, idx, o) { + if (idx === 0) { + obj[idx + 1] = 8; + } + return val > 10; +} diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-9.js index dfc3894db7..b033642755 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-9.js @@ -9,12 +9,12 @@ description: > parameter ---*/ - var called = 0; +var called = 0; - function callbackfn() { - called++; - return true; - } +function callbackfn() { + called++; + return true; +} assert([11, 12].every(callbackfn), '[11, 12].every(callbackfn) !== true'); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-1.js index f29e4f155b..bafc7b8411 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-1.js @@ -7,13 +7,16 @@ es5id: 15.4.4.16-7-c-iii-1 description: Array.prototype.every - return value of callbackfn is undefined ---*/ - var accessed = false; - var obj = { 0: 11, length: 1 }; +var accessed = false; +var obj = { + 0: 11, + length: 1 +}; - function callbackfn(val, idx, o) { - accessed = true; - return undefined; - } +function callbackfn(val, idx, o) { + accessed = true; + return undefined; +} diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-10.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-10.js index 6f806273d8..f495dd02c2 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-10.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-10.js @@ -9,12 +9,12 @@ description: > (value is Infinity) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return Infinity; - } +function callbackfn(val, idx, obj) { + accessed = true; + return Infinity; +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-11.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-11.js index 923f6e28b0..b761964aef 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-11.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-11.js @@ -9,12 +9,12 @@ description: > (value is -Infinity) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return -Infinity; - } +function callbackfn(val, idx, obj) { + accessed = true; + return -Infinity; +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-12.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-12.js index a8ee187e32..0ac2e55360 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-12.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-12.js @@ -9,12 +9,12 @@ description: > (value is NaN) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return NaN; - } +function callbackfn(val, idx, obj) { + accessed = true; + return NaN; +} assert.sameValue([11].every(callbackfn), false, '[11].every(callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-13.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-13.js index 4185bfa745..931cb99cae 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-13.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-13.js @@ -9,12 +9,12 @@ description: > string ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return ""; - } +function callbackfn(val, idx, obj) { + accessed = true; + return ""; +} assert.sameValue([11].every(callbackfn), false, '[11].every(callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-14.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-14.js index 5e7cbea1c6..ce75448e91 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-14.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-14.js @@ -9,12 +9,12 @@ description: > string ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return "non-empty string"; - } +function callbackfn(val, idx, obj) { + accessed = true; + return "non-empty string"; +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-15.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-15.js index 2b577983b9..0ab89ec096 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-15.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-15.js @@ -9,12 +9,12 @@ description: > object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return function () { }; - } +function callbackfn(val, idx, obj) { + accessed = true; + return function() {}; +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-16.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-16.js index eec81ccd62..f7f6f68734 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-16.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-16.js @@ -9,12 +9,12 @@ description: > object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return []; - } +function callbackfn(val, idx, obj) { + accessed = true; + return []; +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-17.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-17.js index bdf6d73141..273fb64fd0 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-17.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-17.js @@ -9,12 +9,12 @@ description: > object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return new String(); - } +function callbackfn(val, idx, obj) { + accessed = true; + return new String(); +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-18.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-18.js index 37d3ecc27e..7cde6eabfe 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-18.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-18.js @@ -9,12 +9,12 @@ description: > object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return new Boolean(); - } +function callbackfn(val, idx, obj) { + accessed = true; + return new Boolean(); +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-19.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-19.js index f9ef17f288..7306e5e453 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-19.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-19.js @@ -9,12 +9,12 @@ description: > object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return new Number(); - } +function callbackfn(val, idx, obj) { + accessed = true; + return new Number(); +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-2.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-2.js index 7084a37765..62e4d05893 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-2.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-2.js @@ -7,13 +7,16 @@ es5id: 15.4.4.16-7-c-iii-2 description: Array.prototype.every - return value of callbackfn is null ---*/ - var accessed = false; - var obj = { 0: 11, length: 1 }; +var accessed = false; +var obj = { + 0: 11, + length: 1 +}; - function callbackfn(val, idx, obj) { - accessed = true; - return null; - } +function callbackfn(val, idx, obj) { + accessed = true; + return null; +} diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-20.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-20.js index 7a68faf9f6..2026f6357a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-20.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-20.js @@ -9,12 +9,12 @@ description: > object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return Math; - } +function callbackfn(val, idx, obj) { + accessed = true; + return Math; +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-21.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-21.js index ef6432c3d6..3b16afa42c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-21.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-21.js @@ -7,12 +7,12 @@ es5id: 15.4.4.16-7-c-iii-21 description: Array.prototype.every - return value of callbackfn is a Date object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return new Date(); - } +function callbackfn(val, idx, obj) { + accessed = true; + return new Date(); +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-22.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-22.js index b7b1437a8e..3616be1410 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-22.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-22.js @@ -9,12 +9,12 @@ description: > object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return new RegExp(); - } +function callbackfn(val, idx, obj) { + accessed = true; + return new RegExp(); +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-23.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-23.js index 80b30b5f64..87151094b2 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-23.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-23.js @@ -9,12 +9,12 @@ description: > object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return JSON; - } +function callbackfn(val, idx, obj) { + accessed = true; + return JSON; +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-24.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-24.js index 3075fcdb68..7141b6a713 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-24.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-24.js @@ -9,12 +9,12 @@ description: > object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return new EvalError(); - } +function callbackfn(val, idx, obj) { + accessed = true; + return new EvalError(); +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-25.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-25.js index fcfc6b35ce..8efc3f1743 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-25.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-25.js @@ -9,12 +9,12 @@ description: > Arguments object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return arguments; - } +function callbackfn(val, idx, obj) { + accessed = true; + return arguments; +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-27.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-27.js index 5f962f32f2..2b650660b5 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-27.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-27.js @@ -10,12 +10,12 @@ description: > ---*/ var global = this; - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return global; - } +function callbackfn(val, idx, obj) { + accessed = true; + return global; +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-28.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-28.js index 7c1df38b40..0475c7ff59 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-28.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-28.js @@ -7,37 +7,39 @@ es5id: 15.4.4.16-7-c-iii-28 description: Array.prototype.every - false prevents further side effects ---*/ - var result = false; - var obj = { length: 20 }; +var result = false; +var obj = { + length: 20 +}; - function callbackfn(val, idx, obj) { - if (idx > 1) { - result = true; - } - return val > 10; - } +function callbackfn(val, idx, obj) { + if (idx > 1) { + result = true; + } + return val > 10; +} - Object.defineProperty(obj, "0", { - get: function () { - return 11; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + return 11; + }, + configurable: true +}); - Object.defineProperty(obj, "1", { - get: function () { - return 8; - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + return 8; + }, + configurable: true +}); - Object.defineProperty(obj, "2", { - get: function () { - result = true; - return 8; - }, - configurable: true - }); +Object.defineProperty(obj, "2", { + get: function() { + result = true; + return 8; + }, + configurable: true +}); assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); assert.sameValue(result, false, 'result'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-29.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-29.js index 796bd2ea58..7571d0ec3d 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-29.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-29.js @@ -9,12 +9,12 @@ description: > callbackfn is treated as true value ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return new Boolean(false); - } +function callbackfn(val, idx, obj) { + accessed = true; + return new Boolean(false); +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-3.js index c8583c061a..bcd7891c73 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-3.js @@ -9,13 +9,16 @@ description: > (value is false) ---*/ - var accessed = false; - var obj = { 0: 11, length: 1 }; +var accessed = false; +var obj = { + 0: 11, + length: 1 +}; - function callbackfn(val, idx, obj) { - accessed = true; - return false; - } +function callbackfn(val, idx, obj) { + accessed = true; + return false; +} assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-4.js index 31b4185b93..34469360ca 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-4.js @@ -9,13 +9,16 @@ description: > (value is true) ---*/ - var accessed = false; - var obj = { 0: 11, length: 1 }; +var accessed = false; +var obj = { + 0: 11, + length: 1 +}; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } +function callbackfn(val, idx, obj) { + accessed = true; + return true; +} diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-5.js index 93790b433d..b1ce805acc 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-5.js @@ -9,12 +9,12 @@ description: > (value is 0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return 0; - } +function callbackfn(val, idx, obj) { + accessed = true; + return 0; +} assert.sameValue([11].every(callbackfn), false, '[11].every(callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-6.js index fc0eaa0691..5ca0058652 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-6.js @@ -9,12 +9,12 @@ description: > (value is +0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return +0; - } +function callbackfn(val, idx, obj) { + accessed = true; + return +0; +} assert.sameValue([11].every(callbackfn), false, '[11].every(callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-7.js index 4ec5e4a5ee..3b152c86bd 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-7.js @@ -9,12 +9,12 @@ description: > (value is -0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return -0; - } +function callbackfn(val, idx, obj) { + accessed = true; + return -0; +} assert.sameValue([11].every(callbackfn), false, '[11].every(callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-8.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-8.js index 59a89680e6..0c2b63f001 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-8.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-8.js @@ -9,12 +9,12 @@ description: > (value is positive number) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return 5; - } +function callbackfn(val, idx, obj) { + accessed = true; + return 5; +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-9.js index 18ff44cc49..1830a7d9af 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-9.js @@ -9,12 +9,12 @@ description: > (value is negative number) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return -5; - } +function callbackfn(val, idx, obj) { + accessed = true; + return -5; +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-1.js index d074dbf346..e5fb2db836 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-1.js @@ -7,7 +7,7 @@ es5id: 15.4.4.16-8-1 description: Array.prototype.every returns true if 'length' is 0 (empty array) ---*/ - function cb() {} - var i = [].every(cb); +function cb() {} +var i = [].every(cb); assert.sameValue(i, true, 'i'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-10.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-10.js index e69633f911..a865a6c4b8 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-10.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-10.js @@ -7,19 +7,20 @@ es5id: 15.4.4.16-8-10 description: Array.prototype.every - subclassed array when length is reduced ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 2; +foo.prototype = new Array(1, 2, 3); - function cb(val) - { - if(val>2) - return false; - else - return true; - } - var i = f.every(cb); +function foo() {} +var f = new foo(); +f.length = 2; + +function cb(val) +{ + if (val > 2) + return false; + else + return true; +} +var i = f.every(cb); assert.sameValue(i, true, 'i'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-11.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-11.js index 9403b2acde..b407fe4e7a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-11.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-11.js @@ -9,14 +9,15 @@ description: > return true ---*/ - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - return true; - } +var callCnt = 0; - var arr = [0,1,2,3,4,5,6,7,8,9]; +function callbackfn(val, idx, obj) +{ + callCnt++; + return true; +} + +var arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-12.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-12.js index 844e0bf625..7100aecd52 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-12.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-12.js @@ -9,12 +9,12 @@ description: > called on ---*/ - function callbackfn(val, idx, obj) - { - return true; - } - var arr = [1,2,3,4,5]; - arr.every(callbackfn); +function callbackfn(val, idx, obj) +{ + return true; +} +var arr = [1, 2, 3, 4, 5]; +arr.every(callbackfn); assert.sameValue(arr[0], 1, 'arr[0]'); assert.sameValue(arr[1], 2, 'arr[1]'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-13.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-13.js index 3a41b2c363..66b56af96b 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-13.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-13.js @@ -7,16 +7,17 @@ es5id: 15.4.4.16-8-13 description: Array.prototype.every doesn't visit expandos ---*/ - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - return true; - } +var callCnt = 0; - var arr = [0,1,2,3,4,5,6,7,8,9]; - arr["i"] = 10; - arr[true] = 11; +function callbackfn(val, idx, obj) +{ + callCnt++; + return true; +} + +var arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; +arr["i"] = 10; +arr[true] = 11; assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-2.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-2.js index 9d9d694b14..90ef805f65 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-2.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-2.js @@ -9,13 +9,14 @@ description: > Array, length overridden to null (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = null; +foo.prototype = new Array(1, 2, 3); - function cb(){} - var i = f.every(cb); +function foo() {} +var f = new foo(); +f.length = null; + +function cb() {} +var i = f.every(cb); assert.sameValue(i, true, 'i'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-3.js index 6cf241998a..746ea3c4d9 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-3.js @@ -9,13 +9,14 @@ description: > Array, length overridden to false (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = false; +foo.prototype = new Array(1, 2, 3); - function cb(){} - var i = f.every(cb); +function foo() {} +var f = new foo(); +f.length = false; + +function cb() {} +var i = f.every(cb); assert.sameValue(i, true, 'i'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-4.js index f296ed79c6..802f85d327 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-4.js @@ -9,13 +9,14 @@ description: > Array, length overridden to 0 (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 0; +foo.prototype = new Array(1, 2, 3); - function cb(){} - var i = f.every(cb); +function foo() {} +var f = new foo(); +f.length = 0; + +function cb() {} +var i = f.every(cb); assert.sameValue(i, true, 'i'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-5.js index 49d510f6b7..cd8513fb49 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-5.js @@ -9,13 +9,14 @@ description: > Array, length overridden to '0' (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = '0'; +foo.prototype = new Array(1, 2, 3); - function cb(){} - var i = f.every(cb); +function foo() {} +var f = new foo(); +f.length = '0'; + +function cb() {} +var i = f.every(cb); assert.sameValue(i, true, 'i'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-6.js index de58615e38..17d0d88341 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-6.js @@ -9,15 +9,20 @@ description: > Array, length overridden with obj with valueOf) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - var o = { valueOf: function () { return 0;}}; - f.length = o; +function foo() {} +var f = new foo(); - function cb(){} - var i = f.every(cb); +var o = { + valueOf: function() { + return 0; + } +}; +f.length = o; + +function cb() {} +var i = f.every(cb); assert.sameValue(i, true, 'i'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-7.js index 170831065f..f23dc8cff1 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-7.js @@ -9,20 +9,25 @@ description: > Array, length overridden with obj w/o valueOf (toString)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - var o = { toString: function () { return '0';}}; - f.length = o; +function foo() {} +var f = new foo(); - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - function cb(){} - var i = f.every(cb); +var o = { + toString: function() { + return '0'; + } +}; +f.length = o; + +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. +function cb() {} +var i = f.every(cb); assert.sameValue(i, true, 'i'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-8.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-8.js index 8d1854e454..75f2878c3d 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-8.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-8.js @@ -9,28 +9,29 @@ description: > Array, length overridden with [] ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - f.length = []; +function foo() {} +var f = new foo(); - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. +f.length = []; - function cb(){} - var i = f.every(cb); +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. +// +// The toString( ) method on Array converts the array elements to strings, +// then returns the result of concatenating these strings, with commas in +// between. An array with no elements converts to the empty string, which +// converts to the number 0. If an array has a single element that is a +// number n, the array converts to a string representation of n, which is +// then converted back to n itself. If an array contains more than one element, +// or if its one element is not a number, the array converts to NaN. + +function cb() {} +var i = f.every(cb); assert.sameValue(i, true, 'i'); diff --git a/test/built-ins/Array/prototype/fill/fill-values-custom-start-and-end.js b/test/built-ins/Array/prototype/fill/fill-values-custom-start-and-end.js index d445b93044..ce34f42d8b 100644 --- a/test/built-ins/Array/prototype/fill/fill-values-custom-start-and-end.js +++ b/test/built-ins/Array/prototype/fill/fill-values-custom-start-and-end.js @@ -24,4 +24,4 @@ assert(compareArray([0, 0, 0].fill(8, 1, 2), [0, 8, 0])); assert(compareArray([0, 0, 0, 0, 0].fill(8, -3, 4), [0, 0, 8, 8, 0])); assert(compareArray([0, 0, 0, 0, 0].fill(8, -2, -1), [0, 0, 0, 8, 0])); assert(compareArray([0, 0, 0, 0, 0].fill(8, -1, -3), [0, 0, 0, 0, 0])); -assert(compareArray([ , , , , 0].fill(8, 1, 3), [, 8, 8, , 0])); +assert(compareArray([, , , , 0].fill(8, 1, 3), [, 8, 8, , 0])); diff --git a/test/built-ins/Array/prototype/fill/fill-values.js b/test/built-ins/Array/prototype/fill/fill-values.js index ab2cf19d0f..43f119f27e 100644 --- a/test/built-ins/Array/prototype/fill/fill-values.js +++ b/test/built-ins/Array/prototype/fill/fill-values.js @@ -28,8 +28,7 @@ includes: [compareArray.js] assert(compareArray([].fill(8), [])); assert(compareArray( - [0, 0].fill(), - [undefined, undefined] + [0, 0].fill(), [undefined, undefined] )); assert( diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-1.js index c9d8114390..c9b5616764 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-1.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-1.js @@ -9,5 +9,5 @@ description: Array.prototype.filter applied to undefined throws a TypeError assert.throws(TypeError, function() { - Array.prototype.filter.call(undefined); // TypeError is thrown if value is undefined + Array.prototype.filter.call(undefined); // TypeError is thrown if value is undefined }); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-10.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-10.js index f56c19437f..9fa42cba0a 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-10.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-10.js @@ -7,12 +7,12 @@ es5id: 15.4.4.20-1-10 description: Array.prototype.filter applied to the Math object ---*/ - function callbackfn(val, idx, obj) { - return '[object Math]' === Object.prototype.toString.call(obj); - } +function callbackfn(val, idx, obj) { + return '[object Math]' === Object.prototype.toString.call(obj); +} - Math.length = 1; - Math[0] = 1; - var newArr = Array.prototype.filter.call(Math, callbackfn); +Math.length = 1; +Math[0] = 1; +var newArr = Array.prototype.filter.call(Math, callbackfn); assert.sameValue(newArr[0], 1, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-11.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-11.js index d9e730234c..19703f1905 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-11.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-11.js @@ -7,14 +7,14 @@ es5id: 15.4.4.20-1-11 description: Array.prototype.filter applied to Date object ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof Date; - } +function callbackfn(val, idx, obj) { + return obj instanceof Date; +} - var obj = new Date(); - obj.length = 1; - obj[0] = 1; +var obj = new Date(); +obj.length = 1; +obj[0] = 1; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr[0], 1, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-12.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-12.js index 9a7404b58e..09a5dbb370 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-12.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-12.js @@ -7,14 +7,14 @@ es5id: 15.4.4.20-1-12 description: Array.prototype.filter applied to RegExp object ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof RegExp; - } +function callbackfn(val, idx, obj) { + return obj instanceof RegExp; +} - var obj = new RegExp(); - obj.length = 2; - obj[1] = true; +var obj = new RegExp(); +obj.length = 2; +obj[1] = true; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr[0], true, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-13.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-13.js index b5e4405121..fbeaacc89e 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-13.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-13.js @@ -7,12 +7,12 @@ es5id: 15.4.4.20-1-13 description: Array.prototype.filter applied to the JSON object ---*/ - function callbackfn(val, idx, obj) { - return '[object JSON]' === Object.prototype.toString.call(JSON); - } +function callbackfn(val, idx, obj) { + return '[object JSON]' === Object.prototype.toString.call(JSON); +} - JSON.length = 1; - JSON[0] = 1; - var newArr = Array.prototype.filter.call(JSON, callbackfn); +JSON.length = 1; +JSON[0] = 1; +var newArr = Array.prototype.filter.call(JSON, callbackfn); assert.sameValue(newArr[0], 1, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-14.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-14.js index 7e77b5403c..0b9f3060a5 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-14.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-14.js @@ -7,14 +7,14 @@ es5id: 15.4.4.20-1-14 description: Array.prototype.filter applied to Error object ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof Error; - } +function callbackfn(val, idx, obj) { + return obj instanceof Error; +} - var obj = new Error(); - obj.length = 1; - obj[0] = 1; +var obj = new Error(); +obj.length = 1; +obj[0] = 1; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr[0], 1, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-15.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-15.js index 314f8cf65d..0be84b2563 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-15.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-15.js @@ -7,15 +7,15 @@ es5id: 15.4.4.20-1-15 description: Array.prototype.filter applied to the Arguments object ---*/ - function callbackfn(val, idx, obj) { - return '[object Arguments]' === Object.prototype.toString.call(obj); - } +function callbackfn(val, idx, obj) { + return '[object Arguments]' === Object.prototype.toString.call(obj); +} - var obj = (function () { - return arguments; - }("a", "b")); +var obj = (function() { + return arguments; +}("a", "b")); - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr[0], "a", 'newArr[0]'); assert.sameValue(newArr[1], "b", 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-2.js index 3c4abb006b..70e775afee 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-2.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-2.js @@ -9,5 +9,5 @@ description: Array.prototype.filter applied to null throws a TypeError assert.throws(TypeError, function() { - Array.prototype.filter.call(null); + Array.prototype.filter.call(null); }); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-3.js index c8ed73db16..95aaebd9e2 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-3.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-3.js @@ -7,13 +7,13 @@ es5id: 15.4.4.20-1-3 description: Array.prototype.filter applied to boolean primitive ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof Boolean; - } +function callbackfn(val, idx, obj) { + return obj instanceof Boolean; +} - Boolean.prototype[0] = true; - Boolean.prototype.length = 1; +Boolean.prototype[0] = true; +Boolean.prototype.length = 1; - var newArr = Array.prototype.filter.call(false, callbackfn); +var newArr = Array.prototype.filter.call(false, callbackfn); assert.sameValue(newArr[0], true, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-4.js index 17517c5328..e7b7d2fdc2 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-4.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-4.js @@ -7,16 +7,16 @@ es5id: 15.4.4.20-1-4 description: Array.prototype.filter applied to Boolean Object ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof Boolean; - } +function callbackfn(val, idx, obj) { + return obj instanceof Boolean; +} - var obj = new Boolean(true); - obj.length = 2; - obj[0] = 11; - obj[1] = 12; +var obj = new Boolean(true); +obj.length = 2; +obj[0] = 11; +obj[1] = 12; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr[0], 11, 'newArr[0]'); assert.sameValue(newArr[1], 12, 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-5.js index 114e360ab1..4e8c4ffd54 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-5.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-5.js @@ -7,13 +7,13 @@ es5id: 15.4.4.20-1-5 description: Array.prototype.filter applied to number primitive ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof Number; - } +function callbackfn(val, idx, obj) { + return obj instanceof Number; +} - Number.prototype[0] = 1; - Number.prototype.length = 1; +Number.prototype[0] = 1; +Number.prototype.length = 1; - var newArr = Array.prototype.filter.call(2.5, callbackfn); +var newArr = Array.prototype.filter.call(2.5, callbackfn); assert.sameValue(newArr[0], 1, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-6.js index d73da1d91c..6f4bb4eb26 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-6.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-6.js @@ -7,16 +7,16 @@ es5id: 15.4.4.20-1-6 description: Array.prototype.filter applied to Number object ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof Number; - } +function callbackfn(val, idx, obj) { + return obj instanceof Number; +} - var obj = new Number(-128); - obj.length = 2; - obj[0] = 11; - obj[1] = 12; +var obj = new Number(-128); +obj.length = 2; +obj[0] = 11; +obj[1] = 12; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr[0], 11, 'newArr[0]'); assert.sameValue(newArr[1], 12, 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-7.js index 8e85e3a8dd..c7a70ad25a 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-7.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-7.js @@ -7,10 +7,10 @@ es5id: 15.4.4.20-1-7 description: Array.prototype.filter applied to string primitive ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof String; - } +function callbackfn(val, idx, obj) { + return obj instanceof String; +} - var newArr = Array.prototype.filter.call("abc", callbackfn); +var newArr = Array.prototype.filter.call("abc", callbackfn); assert.sameValue(newArr[0], "a", 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-8.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-8.js index 84df1f7aa5..35438987c0 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-8.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-8.js @@ -7,11 +7,11 @@ es5id: 15.4.4.20-1-8 description: Array.prototype.filter applied to String object ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof String; - } +function callbackfn(val, idx, obj) { + return obj instanceof String; +} - var obj = new String("abc"); - var newArr = Array.prototype.filter.call(obj, callbackfn); +var obj = new String("abc"); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr[0], "a", 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-9.js index b64de38118..01e194a56c 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-9.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-9.js @@ -7,17 +7,17 @@ es5id: 15.4.4.20-1-9 description: Array.prototype.filter applied to Function object ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof Function; - } +function callbackfn(val, idx, obj) { + return obj instanceof Function; +} - var obj = function (a, b) { - return a + b; - }; - obj[0] = 11; - obj[1] = 9; +var obj = function(a, b) { + return a + b; +}; +obj[0] = 11; +obj[1] = 9; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr[0], 11, 'newArr[0]'); assert.sameValue(newArr[1], 9, 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-10-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-10-1.js index d554b68502..8034699546 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-10-1.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-10-1.js @@ -9,12 +9,12 @@ description: > called on ---*/ - function callbackfn(val, idx, obj) - { - return true; - } - var srcArr = [1,2,3,4,5]; - srcArr.filter(callbackfn); +function callbackfn(val, idx, obj) +{ + return true; +} +var srcArr = [1, 2, 3, 4, 5]; +srcArr.filter(callbackfn); assert.sameValue(srcArr[0], 1, 'srcArr[0]'); assert.sameValue(srcArr[1], 2, 'srcArr[1]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-10-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-10-2.js index 4ef4c19abb..5bd456a8e8 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-10-2.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-10-2.js @@ -9,15 +9,15 @@ description: > number of true returned by callbackfn ---*/ - function callbackfn(val, idx, obj) - { - if(val % 2) - return true; - else - return false; - } - var srcArr = [1,2,3,4,5]; - var resArr = srcArr.filter(callbackfn); +function callbackfn(val, idx, obj) +{ + if (val % 2) + return true; + else + return false; +} +var srcArr = [1, 2, 3, 4, 5]; +var resArr = srcArr.filter(callbackfn); assert.sameValue(resArr.length, 3, 'resArr.length'); assert.sameValue(resArr[0], 1, 'resArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-10-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-10-3.js index 6d278d9623..a20ae4f186 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-10-3.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-10-3.js @@ -7,13 +7,16 @@ es5id: 15.4.4.20-10-3 description: Array.prototype.filter - subclassed array when length is reduced ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 1; +foo.prototype = new Array(1, 2, 3); - function cb(){return true;} - var a = f.filter(cb); +function foo() {} +var f = new foo(); +f.length = 1; + +function cb() { + return true; +} +var a = f.filter(cb); assert(Array.isArray(a), 'Array.isArray(a) !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-10-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-10-4.js index fa6b6603f2..10e8fa0292 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-10-4.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-10-4.js @@ -7,15 +7,16 @@ es5id: 15.4.4.20-10-4 description: Array.prototype.filter doesn't visit expandos ---*/ - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - } - var srcArr = [1,2,3,4,5]; - srcArr["i"] = 10; - srcArr[true] = 11; +var callCnt = 0; - var resArr = srcArr.filter(callbackfn); +function callbackfn(val, idx, obj) +{ + callCnt++; +} +var srcArr = [1, 2, 3, 4, 5]; +srcArr["i"] = 10; +srcArr[true] = 11; + +var resArr = srcArr.filter(callbackfn); assert.sameValue(callCnt, 5, 'callCnt'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-1.js index ef11a81727..68c19c6a66 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-1.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-1.js @@ -9,17 +9,17 @@ description: > own data property ---*/ - function callbackfn(val, idx, obj) { - return obj.length === 2; - } +function callbackfn(val, idx, obj) { + return obj.length === 2; +} - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: 2 - }; +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: 2 +}; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-10.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-10.js index 7ef4992981..683217637b 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-10.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-10.js @@ -9,27 +9,27 @@ description: > inherited accessor property ---*/ - function callbackfn(val, idx, obj) { - return obj.length === 2; - } +function callbackfn(val, idx, obj) { + return obj.length === 2; +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(proto, "length", { + get: function() { + return 2; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[0] = 12; - child[1] = 11; - child[2] = 9; +var child = new Con(); +child[0] = 12; +child[1] = 11; +child[2] = 9; - var newArr = Array.prototype.filter.call(child, callbackfn); +var newArr = Array.prototype.filter.call(child, callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-11.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-11.js index b707e51599..8a55f62fb7 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-11.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-11.js @@ -9,22 +9,23 @@ description: > own accessor property without a get function ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } +var accessed = false; - var obj = { - 0: 11, - 1: 12 - }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); +function callbackfn(val, idx, obj) { + accessed = true; + return true; +} - var newArr = Array.prototype.filter.call(obj, callbackfn); +var obj = { + 0: 11, + 1: 12 +}; +Object.defineProperty(obj, "length", { + set: function() {}, + configurable: true +}); + +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-12.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-12.js index 40c49cf05f..b5983c2805 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-12.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-12.js @@ -9,26 +9,30 @@ description: > a get function that overrides an inherited accessor property ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } +var accessed = false; - Object.defineProperty(Object.prototype, "length", { - get: function () { - return 2; - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + accessed = true; + return true; +} - var obj = { 0: 12, 1: 11 }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); +Object.defineProperty(Object.prototype, "length", { + get: function() { + return 2; + }, + configurable: true +}); - var newArr = Array.prototype.filter.call(obj, callbackfn); +var obj = { + 0: 12, + 1: 11 +}; +Object.defineProperty(obj, "length", { + set: function() {}, + configurable: true +}); + +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-13.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-13.js index b35a71c92b..25652960d2 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-13.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-13.js @@ -9,26 +9,27 @@ description: > 'length' is inherited accessor property without a get function ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } +var accessed = false; - var proto = {}; - Object.defineProperty(proto, "length", { - set: function () { }, - configurable: true - }); +function callbackfn(val, idx, obj) { + accessed = true; + return true; +} - var Con = function () { }; - Con.prototype = proto; +var proto = {}; +Object.defineProperty(proto, "length", { + set: function() {}, + configurable: true +}); - var child = new Con(); - child[0] = 11; - child[1] = 12; +var Con = function() {}; +Con.prototype = proto; - var newArr = Array.prototype.filter.call(child, callbackfn); +var child = new Con(); +child[0] = 11; +child[1] = 12; + +var newArr = Array.prototype.filter.call(child, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-14.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-14.js index 64b7059d8b..545d914e60 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-14.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-14.js @@ -9,15 +9,19 @@ description: > 'length property doesn't exist ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } +var accessed = false; - var obj = { 0: 11, 1: 12 }; +function callbackfn(val, idx, obj) { + accessed = true; + return true; +} - var newArr = Array.prototype.filter.call(obj, callbackfn); +var obj = { + 0: 11, + 1: 12 +}; + +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-17.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-17.js index e2ff3af644..34c579c77d 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-17.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-17.js @@ -9,13 +9,13 @@ description: > implements its own property get method ---*/ - function callbackfn(val, idx, obj) { - return obj.length === 2; - } +function callbackfn(val, idx, obj) { + return obj.length === 2; +} - var func = function (a, b) { - var newArr = Array.prototype.filter.call(arguments, callbackfn); - return newArr.length === 2; - }; +var func = function(a, b) { + var newArr = Array.prototype.filter.call(arguments, callbackfn); + return newArr.length === 2; +}; assert(func(12, 11), 'func(12, 11) !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-18.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-18.js index 6850f6d219..c13206d983 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-18.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-18.js @@ -9,12 +9,12 @@ description: > its own property get method ---*/ - function callbackfn(val, idx, obj) { - return obj.length === 3; - } +function callbackfn(val, idx, obj) { + return obj.length === 3; +} - var str = new String("012"); +var str = new String("012"); - var newArr = Array.prototype.filter.call(str, callbackfn); +var newArr = Array.prototype.filter.call(str, callbackfn); assert.sameValue(newArr.length, 3, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-19.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-19.js index 5f12746ae7..9bd2ef1c68 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-19.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-19.js @@ -9,17 +9,17 @@ description: > implements its own property get method ---*/ - function callbackfn(val, idx, obj) { - return obj.length === 2; - } +function callbackfn(val, idx, obj) { + return obj.length === 2; +} - var fun = function (a, b) { - return a + b; - }; - fun[0] = 12; - fun[1] = 11; - fun[2] = 9; +var fun = function(a, b) { + return a + b; +}; +fun[0] = 12; +fun[1] = 11; +fun[2] = 9; - var newArr = Array.prototype.filter.call(fun, callbackfn); +var newArr = Array.prototype.filter.call(fun, callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-2.js index f8f1b84d41..8e071501ca 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-2.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-2.js @@ -7,10 +7,10 @@ es5id: 15.4.4.20-2-2 description: Array.prototype.filter - 'length' is own data property on an Array ---*/ - function callbackfn(val, idx, obj) { - return obj.length === 2; - } +function callbackfn(val, idx, obj) { + return obj.length === 2; +} - var newArr = [12, 11].filter(callbackfn); +var newArr = [12, 11].filter(callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-3.js index 5e74fafc60..4d9c4e4149 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-3.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-3.js @@ -9,21 +9,23 @@ description: > an own data property that overrides an inherited data property ---*/ - function callbackfn(val, idx, obj) { - return obj.length === 2; - } +function callbackfn(val, idx, obj) { + return obj.length === 2; +} - var proto = { length: 3 }; +var proto = { + length: 3 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 2; - child[0] = 12; - child[1] = 11; - child[2] = 9; +var child = new Con(); +child.length = 2; +child[0] = 12; +child[1] = 11; +child[2] = 9; - var newArr = Array.prototype.filter.call(child, callbackfn); +var newArr = Array.prototype.filter.call(child, callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-4.js index 563ef3bfc5..73ecc9ed19 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-4.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-4.js @@ -9,14 +9,14 @@ description: > overrides an inherited data property on an Array ---*/ - var arrProtoLen; +var arrProtoLen; - function callbackfn(val, idx, obj) { - return obj.length === 2; - } +function callbackfn(val, idx, obj) { + return obj.length === 2; +} - arrProtoLen = Array.prototype.length; - Array.prototype.length = 0; - var newArr = [12, 11].filter(callbackfn); +arrProtoLen = Array.prototype.length; +Array.prototype.length = 0; +var newArr = [12, 11].filter(callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-5.js index ca4c2d21ec..e165dbc06d 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-5.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-5.js @@ -9,31 +9,31 @@ description: > data property that overrides an inherited accessor property ---*/ - function callbackfn(val, idx, obj) { - return obj.length === 2; - } +function callbackfn(val, idx, obj) { + return obj.length === 2; +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 3; - }, - configurable: true - }); +Object.defineProperty(proto, "length", { + get: function() { + return 3; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - Object.defineProperty(child, "length", { - value: 2, - configurable: true - }); - child[0] = 12; - child[1] = 11; - child[2] = 9; +var child = new Con(); +Object.defineProperty(child, "length", { + value: 2, + configurable: true +}); +child[0] = 12; +child[1] = 11; +child[2] = 9; - var newArr = Array.prototype.filter.call(child, callbackfn); +var newArr = Array.prototype.filter.call(child, callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-6.js index 6c754b15bb..9a8144cfcf 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-6.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-6.js @@ -9,20 +9,22 @@ description: > an inherited data property ---*/ - function callbackfn(val, idx, obj) { - return obj.length === 2; - } +function callbackfn(val, idx, obj) { + return obj.length === 2; +} - var proto = { length: 2 }; +var proto = { + length: 2 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[0] = 12; - child[1] = 11; - child[2] = 9; +var child = new Con(); +child[0] = 12; +child[1] = 11; +child[2] = 9; - var newArr = Array.prototype.filter.call(child, callbackfn); +var newArr = Array.prototype.filter.call(child, callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-7.js index 103cdc8889..ba40ddd23a 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-7.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-7.js @@ -9,23 +9,23 @@ description: > an own accessor property ---*/ - function callbackfn(val, idx, obj) { - return obj.length === 2; - } +function callbackfn(val, idx, obj) { + return obj.length === 2; +} - var obj = {}; +var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return 2; + }, + configurable: true +}); - obj[0] = 12; - obj[1] = 11; - obj[2] = 9; +obj[0] = 12; +obj[1] = 11; +obj[2] = 9; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-8.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-8.js index 25b022b3a8..e57b212287 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-8.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-8.js @@ -9,28 +9,30 @@ description: > own accessor property that overrides an inherited data property ---*/ - function callbackfn(val, idx, obj) { - return obj.length === 2; - } +function callbackfn(val, idx, obj) { + return obj.length === 2; +} - var proto = { length: 3 }; +var proto = { + length: 3 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); +var child = new Con(); - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(child, "length", { + get: function() { + return 2; + }, + configurable: true +}); - child[0] = 12; - child[1] = 11; - child[2] = 9; +child[0] = 12; +child[1] = 11; +child[2] = 9; - var newArr = Array.prototype.filter.call(child, callbackfn); +var newArr = Array.prototype.filter.call(child, callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-9.js index 4c37454ba8..684b01b09a 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-9.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-9.js @@ -10,35 +10,35 @@ description: > property ---*/ - function callbackfn(val, idx, obj) { - return obj.length === 2; - } +function callbackfn(val, idx, obj) { + return obj.length === 2; +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 3; - }, - configurable: true - }); +Object.defineProperty(proto, "length", { + get: function() { + return 3; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); +var child = new Con(); - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(child, "length", { + get: function() { + return 2; + }, + configurable: true +}); - child[0] = 12; - child[1] = 11; - child[2] = 9; +child[0] = 12; +child[1] = 11; +child[2] = 9; - var newArr = Array.prototype.filter.call(child, callbackfn); +var newArr = Array.prototype.filter.call(child, callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-1.js index 17cdc5f737..be48ea578f 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-1.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-1.js @@ -7,14 +7,19 @@ es5id: 15.4.4.20-3-1 description: Array.prototype.filter - value of 'length' is undefined ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } +var accessed = false; - var obj = { 0: 0, 1: 1, length: undefined }; - var newArr = Array.prototype.filter.call(obj, callbackfn); +function callbackfn(val, idx, obj) { + accessed = true; + return true; +} + +var obj = { + 0: 0, + 1: 1, + length: undefined +}; +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-10.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-10.js index 63b2c4a189..8ef7f0477b 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-10.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-10.js @@ -9,15 +9,19 @@ description: > NaN) ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } +var accessed = false; - var obj = { 0: 9, length: NaN }; +function callbackfn(val, idx, obj) { + accessed = true; + return true; +} - var newArr = Array.prototype.filter.call(obj, callbackfn); +var obj = { + 0: 9, + length: NaN +}; + +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-11.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-11.js index e495a64dba..3bedc20edb 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-11.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-11.js @@ -9,13 +9,17 @@ description: > positive number ---*/ - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var obj = { 1: 11, 2: 9, length: "2" }; +var obj = { + 1: 11, + 2: 9, + length: "2" +}; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-12.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-12.js index c66292a88b..bab103450a 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-12.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-12.js @@ -9,13 +9,17 @@ description: > negative number ---*/ - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var obj = { 1: 11, 2: 9, length: "-4294967294" }; +var obj = { + 1: 11, + 2: 9, + length: "-4294967294" +}; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); assert.sameValue(newArr[0], undefined, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-13.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-13.js index 859ef4667e..01d01c2561 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-13.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-13.js @@ -9,13 +9,17 @@ description: > number ---*/ - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var obj = { 1: 11, 2: 9, length: "2.5" }; +var obj = { + 1: 11, + 2: 9, + length: "2.5" +}; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-14.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-14.js index 03193102fe..03bcf8a29d 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-14.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-14.js @@ -7,16 +7,19 @@ es5id: 15.4.4.20-3-14 description: Array.prototype.filter - 'length' is a string containing -Infinity ---*/ - var accessed2 = false; +var accessed2 = false; - function callbackfn2(val, idx, obj) { - accessed2 = true; - return true; - } +function callbackfn2(val, idx, obj) { + accessed2 = true; + return true; +} - var obj2 = { 0: 9, length: "-Infinity" }; +var obj2 = { + 0: 9, + length: "-Infinity" +}; - var newArr2 = Array.prototype.filter.call(obj2, callbackfn2); +var newArr2 = Array.prototype.filter.call(obj2, callbackfn2); assert.sameValue(accessed2, false, 'accessed2'); assert.sameValue(newArr2.length, 0, 'newArr2.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-15.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-15.js index e5be122e80..7cc2cb5f85 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-15.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-15.js @@ -9,13 +9,17 @@ description: > exponential number ---*/ - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var obj = { 1: 11, 2: 9, length: "2E0" }; +var obj = { + 1: 11, + 2: 9, + length: "2E0" +}; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-16.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-16.js index 286093b8b9..1e447f105a 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-16.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-16.js @@ -9,13 +9,17 @@ description: > number ---*/ - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var obj = { 1: 11, 2: 9, length: "0x0002" }; +var obj = { + 1: 11, + 2: 9, + length: "0x0002" +}; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-17.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-17.js index 84b64d4021..a3c2bf7fad 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-17.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-17.js @@ -9,13 +9,17 @@ description: > with leading zeros ---*/ - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var obj = { 1: 11, 2: 9, length: "0002.00" }; +var obj = { + 1: 11, + 2: 9, + length: "0002.00" +}; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-18.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-18.js index de3c43f573..b42c4c5af0 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-18.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-18.js @@ -9,15 +9,19 @@ description: > convert to a number ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } +var accessed = false; - var obj = { 0: 9, length: "asdf!_" }; +function callbackfn(val, idx, obj) { + accessed = true; + return true; +} - var newArr = Array.prototype.filter.call(obj, callbackfn); +var obj = { + 0: 9, + length: "asdf!_" +}; + +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(accessed, false, 'accessed'); assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-19.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-19.js index f1ac554eca..11ba067928 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-19.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-19.js @@ -9,21 +9,21 @@ description: > an own toString method. ---*/ - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var obj = { - 1: 11, - 2: 9, - length: { - toString: function () { - return '2'; - } - } - }; +var obj = { + 1: 11, + 2: 9, + length: { + toString: function() { + return '2'; + } + } +}; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-2.js index 3e348991d7..4c87b6e3d1 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-2.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-2.js @@ -9,12 +9,16 @@ description: > is 1 (length overridden to true(type conversion)) ---*/ - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var obj = { 0: 11, 1: 9, length: true }; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var obj = { + 0: 11, + 1: 9, + length: true +}; +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-20.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-20.js index c8e77de720..7b7b93e5b9 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-20.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-20.js @@ -9,21 +9,21 @@ description: > an own valueOf method. ---*/ - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var obj = { - 1: 11, - 2: 9, - length: { - valueOf: function () { - return 2; - } - } - }; +var obj = { + 1: 11, + 2: 9, + length: { + valueOf: function() { + return 2; + } + } +}; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-21.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-21.js index 01fc372d5e..c65ba9ca50 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-21.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-21.js @@ -10,29 +10,29 @@ description: > returns a string ---*/ - var firstStepOccured = false; - var secondStepOccured = false; +var firstStepOccured = false; +var secondStepOccured = false; - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var obj = { - 1: 11, - 2: 9, - length: { - valueOf: function () { - firstStepOccured = true; - return {}; - }, - toString: function () { - secondStepOccured = true; - return '2'; - } - } - }; +var obj = { + 1: 11, + 2: 9, + length: { + valueOf: function() { + firstStepOccured = true; + return {}; + }, + toString: function() { + secondStepOccured = true; + return '2'; + } + } +}; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-22.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-22.js index a6463ad6a1..0e4bf36715 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-22.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-22.js @@ -10,32 +10,32 @@ description: > primitive values ---*/ - var accessed = false; - var firstStepOccured = false; - var secondStepOccured = false; +var accessed = false; +var firstStepOccured = false; +var secondStepOccured = false; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } +function callbackfn(val, idx, obj) { + accessed = true; + return true; +} - var obj = { - 1: 11, - 2: 12, +var obj = { + 1: 11, + 2: 12, - length: { - valueOf: function () { - firstStepOccured = true; - return {}; - }, - toString: function () { - secondStepOccured = true; - return {}; - } - } - }; + length: { + valueOf: function() { + firstStepOccured = true; + return {}; + }, + toString: function() { + secondStepOccured = true; + return {}; + } + } +}; assert.throws(TypeError, function() { - Array.prototype.filter.call(obj, callbackfn); + Array.prototype.filter.call(obj, callbackfn); }); assert.sameValue(accessed, false, 'accessed'); assert(firstStepOccured, 'firstStepOccured !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-23.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-23.js index f2e7b2e458..c02b3f301c 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-23.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-23.js @@ -9,37 +9,37 @@ description: > is an object with an own toString and inherited valueOf methods ---*/ - var valueOfAccessed = false; - var toStringAccessed = false; +var valueOfAccessed = false; +var toStringAccessed = false; - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var proto = { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - }; +var proto = { + valueOf: function() { + valueOfAccessed = true; + return 2; + } +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); +var child = new Con(); - child.toString = function () { - toStringAccessed = true; - return '1'; - }; +child.toString = function() { + toStringAccessed = true; + return '1'; +}; - var obj = { - 1: 11, - 2: 9, - length: child - }; +var obj = { + 1: 11, + 2: 9, + length: child +}; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-24.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-24.js index 31b87b47d5..a2cc49a04f 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-24.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-24.js @@ -9,17 +9,17 @@ description: > non-integer, ensure truncation occurs in the proper direction ---*/ - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var obj = { - 1: 11, - 2: 9, - length: 2.685 - }; +var obj = { + 1: 11, + 2: 9, + length: 2.685 +}; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-25.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-25.js index 3f8b1ffd8c..f32cac6948 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-25.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-25.js @@ -9,17 +9,17 @@ description: > non-integer ---*/ - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var obj = { - 1: 11, - 2: 9, - length: -4294967294.5 - }; +var obj = { + 1: 11, + 2: 9, + length: -4294967294.5 +}; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); assert.sameValue(newArr[0], undefined, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-3.js index 9b1250407d..53fd3ab2cc 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-3.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-3.js @@ -7,14 +7,18 @@ es5id: 15.4.4.20-3-3 description: Array.prototype.filter - value of 'length' is a number (value is 0) ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } +var accessed = false; - var obj = { 0: 11, length: 0 }; - var newArr = Array.prototype.filter.call(obj, callbackfn); +function callbackfn(val, idx, obj) { + accessed = true; + return true; +} + +var obj = { + 0: 11, + length: 0 +}; +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-4.js index a2a73f274b..d0afc2288c 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-4.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-4.js @@ -9,14 +9,18 @@ description: > +0) ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } +var accessed = false; - var obj = { 0: 11, length: +0 }; - var newArr = Array.prototype.filter.call(obj, callbackfn); +function callbackfn(val, idx, obj) { + accessed = true; + return true; +} + +var obj = { + 0: 11, + length: +0 +}; +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-5.js index 2fa9d19cf3..675a41cb28 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-5.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-5.js @@ -9,14 +9,18 @@ description: > -0) ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } +var accessed = false; - var obj = { 0: 11, length: -0 }; - var newArr = Array.prototype.filter.call(obj, callbackfn); +function callbackfn(val, idx, obj) { + accessed = true; + return true; +} + +var obj = { + 0: 11, + length: -0 +}; +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-6.js index dd9b8839ba..44e5a2aa1c 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-6.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-6.js @@ -9,13 +9,17 @@ description: > positive) ---*/ - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var obj = { 1: 11, 2: 9, length: 2 }; +var obj = { + 1: 11, + 2: 9, + length: 2 +}; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-7.js index 28d5405920..b9003218fc 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-7.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-7.js @@ -9,12 +9,16 @@ description: > negative) ---*/ - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var obj = { 1: 11, 2: 9, length: -4294967294 }; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var obj = { + 1: 11, + 2: 9, + length: -4294967294 +}; +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); assert.sameValue(newArr[0], undefined, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-9.js index a31259a2ef..149c2011ad 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-9.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-9.js @@ -9,15 +9,19 @@ description: > -Infinity) ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } +var accessed = false; - var obj = { 0: 9, length: -Infinity }; +function callbackfn(val, idx, obj) { + accessed = true; + return true; +} - var newArr = Array.prototype.filter.call(obj, callbackfn); +var obj = { + 0: 9, + length: -Infinity +}; + +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-4-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-4-1.js index 5db65663d8..ac03e0fc92 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-4-1.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-4-1.js @@ -7,7 +7,7 @@ es5id: 15.4.4.20-4-1 description: Array.prototype.filter throws TypeError if callbackfn is undefined ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.filter(); + arr.filter(); }); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-4-10.js b/test/built-ins/Array/prototype/filter/15.4.4.20-4-10.js index 39f1abd7ba..bf2dabe141 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-4-10.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-4-10.js @@ -9,15 +9,18 @@ description: > was thrown by step 2 ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - Object.defineProperty(obj, "length", { - get: function () { - throw new Test262Error(); - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + throw new Test262Error(); + }, + configurable: true +}); assert.throws(Test262Error, function() { - Array.prototype.filter.call(obj, undefined); + Array.prototype.filter.call(obj, undefined); }); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-4-11.js b/test/built-ins/Array/prototype/filter/15.4.4.20-4-11.js index 0eabd02ec5..6cefc8ce1e 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-4-11.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-4-11.js @@ -9,19 +9,22 @@ description: > was thrown by step 3 ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - throw new Test262Error(); - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + toString: function() { + throw new Test262Error(); + } + }; + }, + configurable: true +}); assert.throws(Test262Error, function() { - Array.prototype.filter.call(obj, undefined); + Array.prototype.filter.call(obj, undefined); }); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-4-12.js b/test/built-ins/Array/prototype/filter/15.4.4.20-4-12.js index de1ad7023b..dce334c244 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-4-12.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-4-12.js @@ -7,14 +7,14 @@ es5id: 15.4.4.20-4-12 description: Array.prototype.filter - 'callbackfn' is a function ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val === 9; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + return val === 9; + } + return false; +} - var newArr = [11, 9].filter(callbackfn); +var newArr = [11, 9].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 9, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-4-15.js b/test/built-ins/Array/prototype/filter/15.4.4.20-4-15.js index af35f5776a..70d48daa72 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-4-15.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-4-15.js @@ -9,25 +9,27 @@ description: > passing undefined for callbackfn ---*/ - var obj = { 10: 10 }; - var lengthAccessed = false; - var loopAccessed = false; - Object.defineProperty(obj, "length", { - get: function () { - lengthAccessed = true; - return 20; - }, - configurable: true - }); - Object.defineProperty(obj, "0", { - get: function () { - loopAccessed = true; - return 10; - }, - configurable: true - }); +var obj = { + 10: 10 +}; +var lengthAccessed = false; +var loopAccessed = false; +Object.defineProperty(obj, "length", { + get: function() { + lengthAccessed = true; + return 20; + }, + configurable: true +}); +Object.defineProperty(obj, "0", { + get: function() { + loopAccessed = true; + return 10; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.filter.call(obj); + Array.prototype.filter.call(obj); }); assert(lengthAccessed, 'lengthAccessed !== true'); assert.sameValue(loopAccessed, false, 'loopAccessed'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-4-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-4-2.js index 07add5f00e..511003bbf6 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-4-2.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-4-2.js @@ -9,7 +9,7 @@ description: > unreferenced ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(ReferenceError, function() { - arr.filter(foo); + arr.filter(foo); }); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-4-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-4-3.js index a56dd4e8da..0e557696d4 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-4-3.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-4-3.js @@ -7,7 +7,7 @@ es5id: 15.4.4.20-4-3 description: Array.prototype.filter throws TypeError if callbackfn is null ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.filter(null); + arr.filter(null); }); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-4-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-4-4.js index 6e93708357..d49c8355ce 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-4-4.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-4-4.js @@ -7,7 +7,7 @@ es5id: 15.4.4.20-4-4 description: Array.prototype.filter throws TypeError if callbackfn is boolean ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.filter(true); + arr.filter(true); }); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-4-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-4-5.js index 6fedc65874..d5a3b5289d 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-4-5.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-4-5.js @@ -7,7 +7,7 @@ es5id: 15.4.4.20-4-5 description: Array.prototype.filter throws TypeError if callbackfn is number ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.filter(5); + arr.filter(5); }); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-4-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-4-6.js index cef7251b10..5f9d1386bb 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-4-6.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-4-6.js @@ -7,7 +7,7 @@ es5id: 15.4.4.20-4-6 description: Array.prototype.filter throws TypeError if callbackfn is string ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.filter("abc"); + arr.filter("abc"); }); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-4-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-4-7.js index aa1240371f..f9e4254274 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-4-7.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-4-7.js @@ -9,7 +9,7 @@ description: > without [[Call]] internal method ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.filter(new Object()); + arr.filter(new Object()); }); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-4-8.js b/test/built-ins/Array/prototype/filter/15.4.4.20-4-8.js index fbd5396d8e..cde11fbf23 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-4-8.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-4-8.js @@ -9,18 +9,21 @@ description: > visible when an exception occurs ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - var accessed = false; +var accessed = false; - Object.defineProperty(obj, "length", { - get: function () { - accessed = true; - return 2; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + accessed = true; + return 2; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.filter.call(obj, null); + Array.prototype.filter.call(obj, null); }); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-4-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-4-9.js index c2e7295776..45ba29f89f 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-4-9.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-4-9.js @@ -9,22 +9,25 @@ description: > visible when an exception occurs ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - var accessed = false; +var accessed = false; - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - accessed = true; - return "2"; - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + toString: function() { + accessed = true; + return "2"; + } + }; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.filter.call(obj, null); + Array.prototype.filter.call(obj, null); }); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-1-s.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-1-s.js index ce1ad3c7eb..ebbd6c1a48 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-1-s.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-1-s.js @@ -8,14 +8,14 @@ description: Array.prototype.filter - thisArg not passed to strict callbackfn flags: [noStrict] ---*/ - var innerThisCorrect = false; +var innerThisCorrect = false; - function callbackfn(val, idx, obj) { - "use strict"; - innerThisCorrect = this===undefined; - return true; - } +function callbackfn(val, idx, obj) { + "use strict"; + innerThisCorrect = this === undefined; + return true; +} - [1].filter(callbackfn); +[1].filter(callbackfn); assert(innerThisCorrect, 'innerThisCorrect !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-1.js index 96063ef486..fe1b290574 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-1.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-1.js @@ -9,14 +9,14 @@ flags: [noStrict] ---*/ (function() { - this._15_4_4_20_5_1 = false; - var _15_4_4_20_5_1 = true; + this._15_4_4_20_5_1 = false; + var _15_4_4_20_5_1 = true; - function callbackfn(val, idx, obj) { - return this._15_4_4_20_5_1; - } - var srcArr = [1]; - var resArr = srcArr.filter(callbackfn); + function callbackfn(val, idx, obj) { + return this._15_4_4_20_5_1; + } + var srcArr = [1]; + var resArr = srcArr.filter(callbackfn); -assert.sameValue(resArr.length, 0, 'resArr.length'); + assert.sameValue(resArr.length, 0, 'resArr.length'); })(); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-10.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-10.js index dff16966b8..a5afd46822 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-10.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-10.js @@ -7,16 +7,16 @@ es5id: 15.4.4.20-5-10 description: Array.prototype.filter - Array Object can be used as thisArg ---*/ - var accessed = false; - var objArray = new Array(10); +var accessed = false; +var objArray = new Array(10); - function callbackfn(val, idx, obj) { - accessed = true; - return this === objArray; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === objArray; +} - var newArr = [11].filter(callbackfn, objArray); +var newArr = [11].filter(callbackfn, objArray); assert.sameValue(newArr[0], 11, 'newArr[0]'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-11.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-11.js index 93cc528d0e..0ca6f9f66c 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-11.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-11.js @@ -7,15 +7,15 @@ es5id: 15.4.4.20-5-11 description: Array.prototype.filter - String Object can be used as thisArg ---*/ - var accessed = false; - var objString = new String(); +var accessed = false; +var objString = new String(); - function callbackfn(val, idx, obj) { - accessed = true; - return this === objString; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === objString; +} - var newArr = [11].filter(callbackfn, objString); +var newArr = [11].filter(callbackfn, objString); assert.sameValue(newArr[0], 11, 'newArr[0]'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-12.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-12.js index d4dc45bda5..2d7cef46de 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-12.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-12.js @@ -7,15 +7,15 @@ es5id: 15.4.4.20-5-12 description: Array.prototype.filter - Boolean Object can be used as thisArg ---*/ - var accessed = false; - var objBoolean = new Boolean(); +var accessed = false; +var objBoolean = new Boolean(); - function callbackfn(val, idx, obj) { - accessed = true; - return this === objBoolean; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === objBoolean; +} - var newArr = [11].filter(callbackfn, objBoolean); +var newArr = [11].filter(callbackfn, objBoolean); assert.sameValue(newArr[0], 11, 'newArr[0]'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-13.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-13.js index 621f2def0d..d5cb60c89c 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-13.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-13.js @@ -7,15 +7,15 @@ es5id: 15.4.4.20-5-13 description: Array.prototype.filter - Number Object can be used as thisArg ---*/ - var accessed = false; - var objNumber = new Number(); +var accessed = false; +var objNumber = new Number(); - function callbackfn(val, idx, obj) { - accessed = true; - return this === objNumber; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === objNumber; +} - var newArr = [11].filter(callbackfn, objNumber); +var newArr = [11].filter(callbackfn, objNumber); assert.sameValue(newArr[0], 11, 'newArr[0]'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-14.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-14.js index 195f95d295..e455d8d4c2 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-14.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-14.js @@ -7,14 +7,14 @@ es5id: 15.4.4.20-5-14 description: Array.prototype.filter - the Math object can be used as thisArg ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return this === Math; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === Math; +} - var newArr = [11].filter(callbackfn, Math); +var newArr = [11].filter(callbackfn, Math); assert.sameValue(newArr[0], 11, 'newArr[0]'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-15.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-15.js index 61cb77e509..596addb58d 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-15.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-15.js @@ -7,16 +7,16 @@ es5id: 15.4.4.20-5-15 description: Array.prototype.filter - Date Object can be used as thisArg ---*/ - var accessed = false; +var accessed = false; - var objDate = new Date(); +var objDate = new Date(); - function callbackfn(val, idx, obj) { - accessed = true; - return this === objDate; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === objDate; +} - var newArr = [11].filter(callbackfn, objDate); +var newArr = [11].filter(callbackfn, objDate); assert.sameValue(newArr[0], 11, 'newArr[0]'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-16.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-16.js index d7b6b9e236..beafca6fd1 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-16.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-16.js @@ -7,16 +7,16 @@ es5id: 15.4.4.20-5-16 description: Array.prototype.filter - RegExp Object can be used as thisArg ---*/ - var accessed = false; +var accessed = false; - var objRegExp = new RegExp(); +var objRegExp = new RegExp(); - function callbackfn(val, idx, obj) { - accessed = true; - return this === objRegExp; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === objRegExp; +} - var newArr = [11].filter(callbackfn, objRegExp); +var newArr = [11].filter(callbackfn, objRegExp); assert.sameValue(newArr[0], 11, 'newArr[0]'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-17.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-17.js index b326d202c7..569a7d691c 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-17.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-17.js @@ -7,14 +7,14 @@ es5id: 15.4.4.20-5-17 description: Array.prototype.filter - the JSON object can be used as thisArg ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return this === JSON; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === JSON; +} - var newArr = [11].filter(callbackfn, JSON); +var newArr = [11].filter(callbackfn, JSON); assert.sameValue(newArr[0], 11, 'newArr[0]'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-18.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-18.js index 98b4556314..03516a9356 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-18.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-18.js @@ -7,15 +7,15 @@ es5id: 15.4.4.20-5-18 description: Array.prototype.filter - Error Object can be used as thisArg ---*/ - var accessed = false; - var objError = new RangeError(); +var accessed = false; +var objError = new RangeError(); - function callbackfn(val, idx, obj) { - accessed = true; - return this === objError; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === objError; +} - var newArr = [11].filter(callbackfn, objError); +var newArr = [11].filter(callbackfn, objError); assert.sameValue(newArr[0], 11, 'newArr[0]'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-19.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-19.js index 0c69ec0372..16869222c0 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-19.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-19.js @@ -9,19 +9,19 @@ description: > thisArg ---*/ - var accessed = false; - var arg; +var accessed = false; +var arg; - function callbackfn(val, idx, obj) { - accessed = true; - return this === arg; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === arg; +} - (function fun() { - arg = arguments; - }(1, 2, 3)); +(function fun() { + arg = arguments; +}(1, 2, 3)); - var newArr = [11].filter(callbackfn, arg); +var newArr = [11].filter(callbackfn, arg); assert.sameValue(newArr[0], 11, 'newArr[0]'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-2.js index 0ef3ca82e8..01a3a94d6c 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-2.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-2.js @@ -7,15 +7,16 @@ es5id: 15.4.4.20-5-2 description: Array.prototype.filter - thisArg is Object ---*/ - var res = false; - var o = new Object(); - o.res = true; - function callbackfn(val, idx, obj) - { - return this.res; - } +var res = false; +var o = new Object(); +o.res = true; - var srcArr = [1]; - var resArr = srcArr.filter(callbackfn,o); +function callbackfn(val, idx, obj) +{ + return this.res; +} + +var srcArr = [1]; +var resArr = srcArr.filter(callbackfn, o); assert.sameValue(resArr.length, 1, 'resArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-21.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-21.js index bbb9911ac0..1e1230bc46 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-21.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-21.js @@ -9,14 +9,14 @@ description: Array.prototype.filter - the global object can be used as thisArg var global = this; - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return this === global; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === global; +} - var newArr = [11].filter(callbackfn, global); +var newArr = [11].filter(callbackfn, global); assert.sameValue(newArr[0], 11, 'newArr[0]'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-22.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-22.js index 61e3644cfb..b228ea16ca 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-22.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-22.js @@ -7,14 +7,14 @@ es5id: 15.4.4.20-5-22 description: Array.prototype.filter - boolean primitive can be used as thisArg ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return this.valueOf() === false; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this.valueOf() === false; +} - var newArr = [11].filter(callbackfn, false); +var newArr = [11].filter(callbackfn, false); assert.sameValue(newArr[0], 11, 'newArr[0]'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-23.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-23.js index d07c4c603a..b7435cbf23 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-23.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-23.js @@ -7,14 +7,14 @@ es5id: 15.4.4.20-5-23 description: Array.prototype.filter - number primitive can be used as thisArg ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return this.valueOf() === 101; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this.valueOf() === 101; +} - var newArr = [11].filter(callbackfn, 101); +var newArr = [11].filter(callbackfn, 101); assert.sameValue(newArr[0], 11, 'newArr[0]'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-24.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-24.js index ac195d2b10..ec99f9b2b5 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-24.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-24.js @@ -7,14 +7,14 @@ es5id: 15.4.4.20-5-24 description: Array.prototype.filter - string primitive can be used as thisArg ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return this.valueOf() === "abc"; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this.valueOf() === "abc"; +} - var newArr = [11].filter(callbackfn, "abc"); +var newArr = [11].filter(callbackfn, "abc"); assert.sameValue(newArr[0], 11, 'newArr[0]'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-27.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-27.js index 06ea3908d7..691c695e73 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-27.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-27.js @@ -9,6 +9,6 @@ description: > is the returned array ---*/ - var newArr = [11].filter(function () { }); +var newArr = [11].filter(function() {}); assert(Array.isArray(newArr), 'Array.isArray(newArr) !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-28.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-28.js index 0f41a07e42..676b5f39b2 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-28.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-28.js @@ -7,6 +7,6 @@ es5id: 15.4.4.20-5-28 description: Array.prototype.filter - the returned array is instanceof Array ---*/ - var newArr = [11].filter(function () { }); +var newArr = [11].filter(function() {}); assert(newArr instanceof Array, 'newArr instanceof Array !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-29.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-29.js index 49b049b6fb..88656b8138 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-29.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-29.js @@ -7,6 +7,6 @@ es5id: 15.4.4.20-5-29 description: Array.prototype.filter - returns an array whose length is 0 ---*/ - var newArr = [11].filter(function () { }); +var newArr = [11].filter(function() {}); assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-3.js index a9eb5bdd9c..4ab8cdc1cf 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-3.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-3.js @@ -7,15 +7,16 @@ es5id: 15.4.4.20-5-3 description: Array.prototype.filter - thisArg is Array ---*/ - var res = false; - var a = new Array(); - a.res = true; - function callbackfn(val, idx, obj) - { - return this.res; - } +var res = false; +var a = new Array(); +a.res = true; - var srcArr = [1]; - var resArr = srcArr.filter(callbackfn,a); +function callbackfn(val, idx, obj) +{ + return this.res; +} + +var srcArr = [1]; +var resArr = srcArr.filter(callbackfn, a); assert.sameValue(resArr.length, 1, 'resArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-30.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-30.js index 19311b2aec..8a3fb876fa 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-30.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-30.js @@ -8,16 +8,16 @@ description: Array.prototype.filter - thisArg not passed flags: [noStrict] ---*/ - function innerObj() { - this._15_4_4_20_5_30 = true; - var _15_4_4_20_5_30 = false; +function innerObj() { + this._15_4_4_20_5_30 = true; + var _15_4_4_20_5_30 = false; - function callbackfn(val, idx, obj) { - return this._15_4_4_20_5_30; - } - var srcArr = [1]; - var resArr = srcArr.filter(callbackfn); - this.retVal = resArr.length === 0; - } + function callbackfn(val, idx, obj) { + return this._15_4_4_20_5_30; + } + var srcArr = [1]; + var resArr = srcArr.filter(callbackfn); + this.retVal = resArr.length === 0; +} assert(new innerObj().retVal, 'new innerObj().retVal !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-4.js index e4c6b1b24d..08789d8e38 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-4.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-4.js @@ -9,17 +9,18 @@ description: > template(prototype) ---*/ - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } +var res = false; - function foo(){} - foo.prototype.res = true; - var f = new foo(); +function callbackfn(val, idx, obj) +{ + return this.res; +} - var srcArr = [1]; - var resArr = srcArr.filter(callbackfn,f); +function foo() {} +foo.prototype.res = true; +var f = new foo(); + +var srcArr = [1]; +var resArr = srcArr.filter(callbackfn, f); assert.sameValue(resArr.length, 1, 'resArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-5.js index a46d828820..a024bdc323 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-5.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-5.js @@ -7,17 +7,18 @@ es5id: 15.4.4.20-5-5 description: Array.prototype.filter - thisArg is object from object template ---*/ - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } +var res = false; - function foo(){} - var f = new foo(); - f.res = true; +function callbackfn(val, idx, obj) +{ + return this.res; +} - var srcArr = [1]; - var resArr = srcArr.filter(callbackfn,f); +function foo() {} +var f = new foo(); +f.res = true; + +var srcArr = [1]; +var resArr = srcArr.filter(callbackfn, f); assert.sameValue(resArr.length, 1, 'resArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-6.js index a76f146d6b..25fa96c979 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-6.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-6.js @@ -7,16 +7,17 @@ es5id: 15.4.4.20-5-6 description: Array.prototype.filter - thisArg is function ---*/ - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } +var res = false; - function foo(){} - foo.res = true; +function callbackfn(val, idx, obj) +{ + return this.res; +} - var srcArr = [1]; - var resArr = srcArr.filter(callbackfn,foo); +function foo() {} +foo.res = true; + +var srcArr = [1]; +var resArr = srcArr.filter(callbackfn, foo); assert.sameValue(resArr.length, 1, 'resArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-7.js index 7563712c2a..7429c85bce 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-7.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-7.js @@ -7,14 +7,14 @@ es5id: 15.4.4.20-5-7 description: Array.prototype.filter - built-in functions can be used as thisArg ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return this === eval; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === eval; +} - var newArr = [11].filter(callbackfn, eval); +var newArr = [11].filter(callbackfn, eval); assert.sameValue(newArr[0], 11, 'newArr[0]'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-9.js index 154d0bbdb4..9ab52aa3ea 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-9.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-9.js @@ -7,15 +7,15 @@ es5id: 15.4.4.20-5-9 description: Array.prototype.filter - Function Object can be used as thisArg ---*/ - var accessed = false; - var objFunction = function () { }; +var accessed = false; +var objFunction = function() {}; - function callbackfn(val, idx, obj) { - accessed = true; - return this === objFunction; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === objFunction; +} - var newArr = [11].filter(callbackfn, objFunction); +var newArr = [11].filter(callbackfn, objFunction); assert.sameValue(newArr[0], 11, 'newArr[0]'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-6-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-6-1.js index aa434d235f..719c1490e5 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-6-1.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-6-1.js @@ -9,8 +9,8 @@ description: > (empty array) ---*/ - function cb(){} - var a = [].filter(cb); +function cb() {} +var a = [].filter(cb); assert(Array.isArray(a), 'Array.isArray(a) !== true'); assert.sameValue(a.length, 0, 'a.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-6-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-6-2.js index a2deb91e5c..65a07c7a83 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-6-2.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-6-2.js @@ -9,13 +9,14 @@ description: > (subclassed Array, length overridden to null (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = null; +foo.prototype = new Array(1, 2, 3); - function cb(){} - var a = f.filter(cb); +function foo() {} +var f = new foo(); +f.length = null; + +function cb() {} +var a = f.filter(cb); assert(Array.isArray(a), 'Array.isArray(a) !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-6-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-6-3.js index 5da697fe2b..4e1742878e 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-6-3.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-6-3.js @@ -9,13 +9,14 @@ description: > (subclassed Array, length overridden to false (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = false; +foo.prototype = new Array(1, 2, 3); - function cb(){} - var a = f.filter(cb); +function foo() {} +var f = new foo(); +f.length = false; + +function cb() {} +var a = f.filter(cb); assert(Array.isArray(a), 'Array.isArray(a) !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-6-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-6-4.js index 88d755df8a..72579c85e6 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-6-4.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-6-4.js @@ -9,13 +9,14 @@ description: > (subclassed Array, length overridden to 0 (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 0; +foo.prototype = new Array(1, 2, 3); - function cb(){} - var a = f.filter(cb); +function foo() {} +var f = new foo(); +f.length = 0; + +function cb() {} +var a = f.filter(cb); assert(Array.isArray(a), 'Array.isArray(a) !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-6-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-6-5.js index 71f4dc4896..6209e71077 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-6-5.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-6-5.js @@ -9,13 +9,14 @@ description: > (subclassed Array, length overridden to '0' (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = '0'; +foo.prototype = new Array(1, 2, 3); - function cb(){} - var a = f.filter(cb); +function foo() {} +var f = new foo(); +f.length = '0'; + +function cb() {} +var a = f.filter(cb); assert(Array.isArray(a), 'Array.isArray(a) !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-6-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-6-6.js index dad709203c..0d40729d15 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-6-6.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-6-6.js @@ -9,15 +9,20 @@ description: > (subclassed Array, length overridden with obj with valueOf) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - var o = { valueOf: function () { return 0;}}; - f.length = o; +function foo() {} +var f = new foo(); - function cb(){} - var a = f.filter(cb); +var o = { + valueOf: function() { + return 0; + } +}; +f.length = o; + +function cb() {} +var a = f.filter(cb); assert(Array.isArray(a), 'Array.isArray(a) !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-6-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-6-7.js index a778ad8887..b212e25112 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-6-7.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-6-7.js @@ -10,21 +10,26 @@ description: > (toString)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - var o = { toString: function () { return '0';}}; - f.length = o; +function foo() {} +var f = new foo(); - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. +var o = { + toString: function() { + return '0'; + } +}; +f.length = o; - function cb(){} - var a = f.filter(cb); +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. + +function cb() {} +var a = f.filter(cb); assert(Array.isArray(a), 'Array.isArray(a) !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-6-8.js b/test/built-ins/Array/prototype/filter/15.4.4.20-6-8.js index 1fd2bb7921..851aa7a75c 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-6-8.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-6-8.js @@ -9,28 +9,29 @@ description: > (subclassed Array, length overridden with [] ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - f.length = []; +function foo() {} +var f = new foo(); - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. +f.length = []; - function cb(){} - var a = f.filter(cb); +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. +// +// The toString( ) method on Array converts the array elements to strings, +// then returns the result of concatenating these strings, with commas in +// between. An array with no elements converts to the empty string, which +// converts to the number 0. If an array has a single element that is a +// number n, the array converts to a string representation of n, which is +// then converted back to n itself. If an array contains more than one element, +// or if its one element is not a number, the array converts to NaN. + +function cb() {} +var a = f.filter(cb); assert(Array.isArray(a), 'Array.isArray(a) !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-1.js index 97a92c2de5..265b9632b8 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-1.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-1.js @@ -9,13 +9,13 @@ description: > array after it is called ---*/ - function callbackfn(val, idx, obj) { - srcArr[2] = 3; - srcArr[5] = 6; - return true; - } +function callbackfn(val, idx, obj) { + srcArr[2] = 3; + srcArr[5] = 6; + return true; +} - var srcArr = [1, 2, , 4, 5]; - var resArr = srcArr.filter(callbackfn); +var srcArr = [1, 2, , 4, 5]; +var resArr = srcArr.filter(callbackfn); assert.sameValue(resArr.length, 5, 'resArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-2.js index 866e363fcf..34e27ba569 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-2.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-2.js @@ -9,18 +9,18 @@ description: > after it is called ---*/ - function callbackfn(val, idx, obj) - { - srcArr[2] = -1; - srcArr[4] = -1; - if(val > 0) - return true; - else - return false; - } +function callbackfn(val, idx, obj) +{ + srcArr[2] = -1; + srcArr[4] = -1; + if (val > 0) + return true; + else + return false; +} - var srcArr = [1,2,3,4,5]; - var resArr = srcArr.filter(callbackfn); +var srcArr = [1, 2, 3, 4, 5]; +var resArr = srcArr.filter(callbackfn); assert.sameValue(resArr.length, 3, 'resArr.length'); assert.sameValue(resArr[0], 1, 'resArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-3.js index 23cf770ca3..5f14532d21 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-3.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-3.js @@ -9,18 +9,18 @@ description: > after the call ---*/ - function callbackfn(val, idx, obj) - { - delete srcArr[2]; - delete srcArr[4]; - if(val > 0) - return true; - else - return false; - } +function callbackfn(val, idx, obj) +{ + delete srcArr[2]; + delete srcArr[4]; + if (val > 0) + return true; + else + return false; +} - var srcArr = [1,2,3,4,5]; - var resArr = srcArr.filter(callbackfn); +var srcArr = [1, 2, 3, 4, 5]; +var resArr = srcArr.filter(callbackfn); // two elements deleted assert.sameValue(resArr.length, 3, 'resArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-4.js index 9e817d779b..d3018ec04c 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-4.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-4.js @@ -9,13 +9,13 @@ description: > Array.length is decreased ---*/ - function callbackfn(val, idx, obj) - { - srcArr.length = 2; - return true; - } +function callbackfn(val, idx, obj) +{ + srcArr.length = 2; + return true; +} - var srcArr = [1,2,3,4,6]; - var resArr = srcArr.filter(callbackfn); +var srcArr = [1, 2, 3, 4, 6]; +var resArr = srcArr.filter(callbackfn); assert.sameValue(resArr.length, 2, 'resArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-5.js index 3165b934c2..396126ea1d 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-5.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-5.js @@ -9,15 +9,15 @@ description: > sparse array ---*/ - function callbackfn(val, idx, obj) - { - srcArr[1000] = 3; - return true; - } +function callbackfn(val, idx, obj) +{ + srcArr[1000] = 3; + return true; +} - var srcArr = new Array(10); - srcArr[1] = 1; - srcArr[2] = 2; - var resArr = srcArr.filter(callbackfn); +var srcArr = new Array(10); +srcArr[1] = 1; +srcArr[2] = 2; +var resArr = srcArr.filter(callbackfn); assert.sameValue(resArr.length, 2, 'resArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-6.js index 6bbe73b494..0ef2af0555 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-6.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-6.js @@ -9,20 +9,20 @@ description: > call when same index is also present in prototype ---*/ - function callbackfn(val, idx, obj) - { - delete srcArr[2]; - delete srcArr[4]; - if(val > 0) - return true; - else - return false; - } +function callbackfn(val, idx, obj) +{ + delete srcArr[2]; + delete srcArr[4]; + if (val > 0) + return true; + else + return false; +} - Array.prototype[4] = 5; - var srcArr = [1,2,3,4,5]; - var resArr = srcArr.filter(callbackfn); - delete Array.prototype[4]; +Array.prototype[4] = 5; +var srcArr = [1, 2, 3, 4, 5]; +var resArr = srcArr.filter(callbackfn); +delete Array.prototype[4]; // only one element deleted assert.sameValue(resArr.length, 4, 'resArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-7.js index 6733d095d6..accd42a603 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-7.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-7.js @@ -9,18 +9,18 @@ description: > deleted during the call ---*/ - var o = new Object(); - o.srcArr = [1, 2, 3, 4, 5]; +var o = new Object(); +o.srcArr = [1, 2, 3, 4, 5]; - function callbackfn(val, idx, obj) { - delete o.srcArr; - if (val > 0) - return true; - else - return false; - } +function callbackfn(val, idx, obj) { + delete o.srcArr; + if (val > 0) + return true; + else + return false; +} - var resArr = o.srcArr.filter(callbackfn); +var resArr = o.srcArr.filter(callbackfn); assert.sameValue(resArr.length, 5, 'resArr.length'); assert.sameValue(typeof o.srcArr, "undefined", 'typeof o.srcArr'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-8.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-8.js index 6b119020ec..c7fa048ef7 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-8.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-8.js @@ -7,16 +7,20 @@ es5id: 15.4.4.20-9-8 description: Array.prototype.filter - no observable effects occur if len is 0 ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var obj = { 0: 11, 1: 12, length: 0 }; +var obj = { + 0: 11, + 1: 12, + length: 0 +}; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(accessed, false, 'accessed'); assert.sameValue(obj.length, 0, 'obj.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-9.js index bab2effd5c..e0bd841bf0 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-9.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-9.js @@ -9,24 +9,28 @@ description: > number of iterations ---*/ - var called = 0; +var called = 0; - function callbackfn(val, idx, obj) { - called++; - return true; - } +function callbackfn(val, idx, obj) { + called++; + return true; +} - var obj = { 1: 12, 2: 9, length: 2 }; +var obj = { + 1: 12, + 2: 9, + length: 2 +}; - Object.defineProperty(obj, "0", { - get: function () { - obj.length = 3; - return 11; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + obj.length = 3; + return 11; + }, + configurable: true +}); - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-1.js index db984c4ccb..8991569308 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-1.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-1.js @@ -9,16 +9,17 @@ description: > been assigned values ---*/ - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - return false; - } +var callCnt = 0; - var srcArr = new Array(10); - srcArr[1] = undefined; //explicitly assigning a value - var resArr = srcArr.filter(callbackfn); +function callbackfn(val, idx, obj) +{ + callCnt++; + return false; +} + +var srcArr = new Array(10); +srcArr[1] = undefined; //explicitly assigning a value +var resArr = srcArr.filter(callbackfn); assert.sameValue(resArr.length, 0, 'resArr.length'); assert.sameValue(callCnt, 1, 'callCnt'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-10.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-10.js index c2c66ae19e..d4724b9249 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-10.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-10.js @@ -9,21 +9,24 @@ description: > prototype index property not to be visited on an Array-like Object ---*/ - function callbackfn(val, idx, obj) { - return true; - } - var obj = { 2: 2, length: 20 }; +function callbackfn(val, idx, obj) { + return true; +} +var obj = { + 2: 2, + length: 20 +}; - Object.defineProperty(obj, "0", { - get: function () { - delete Object.prototype[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + delete Object.prototype[1]; + return 0; + }, + configurable: true +}); - Object.prototype[1] = 1; - var newArr = Array.prototype.filter.call(obj, callbackfn); +Object.prototype[1] = 1; +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); assert.notSameValue(newArr[1], 1, 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-11.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-11.js index 643554ab8f..39ea8f0a10 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-11.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-11.js @@ -9,21 +9,21 @@ description: > prototype index property not to be visited on an Array ---*/ - function callbackfn(val, idx, obj) { - return true; - } - var arr = [0, , 2]; +function callbackfn(val, idx, obj) { + return true; +} +var arr = [0, , 2]; - Object.defineProperty(arr, "0", { - get: function () { - delete Array.prototype[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete Array.prototype[1]; + return 0; + }, + configurable: true +}); - Array.prototype[1] = 1; - var newArr = arr.filter(callbackfn); +Array.prototype[1] = 1; +var newArr = arr.filter(callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); assert.notSameValue(newArr[1], 1, 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-12.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-12.js index 18e21b40ea..7b914a1ee4 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-12.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-12.js @@ -10,21 +10,26 @@ description: > Array-like object ---*/ - function callbackfn(val, idx, obj) { - return true; - } - var obj = { 0: 0, 1: 111, 2: 2, length: 10 }; +function callbackfn(val, idx, obj) { + return true; +} +var obj = { + 0: 0, + 1: 111, + 2: 2, + length: 10 +}; - Object.defineProperty(obj, "0", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + delete obj[1]; + return 0; + }, + configurable: true +}); - Object.prototype[1] = 1; - var newArr = Array.prototype.filter.call(obj, callbackfn); +Object.prototype[1] = 1; +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 3, 'newArr.length'); assert.sameValue(newArr[1], 1, 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-13.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-13.js index c023e37351..204e94c665 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-13.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-13.js @@ -9,21 +9,21 @@ description: > property causes prototype index property to be visited on an Array ---*/ - function callbackfn(val, idx, obj) { - return val < 3 ? true : false; - } - var arr = [0, 111, 2]; +function callbackfn(val, idx, obj) { + return val < 3 ? true : false; +} +var arr = [0, 111, 2]; - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); - Array.prototype[1] = 1; - var newArr = arr.filter(callbackfn); +Array.prototype[1] = 1; +var newArr = arr.filter(callbackfn); assert.sameValue(newArr.length, 3, 'newArr.length'); assert.sameValue(newArr[1], 1, 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-14.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-14.js index 6147fab673..00b6a41afa 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-14.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-14.js @@ -9,20 +9,20 @@ description: > property not to be visited ---*/ - function callbackfn(val, idx, obj) { - return true; - } - var arr = [0, 1, 2, "last"]; +function callbackfn(val, idx, obj) { + return true; +} +var arr = [0, 1, 2, "last"]; - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 3; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + arr.length = 3; + return 0; + }, + configurable: true +}); - var newArr = arr.filter(callbackfn); +var newArr = arr.filter(callbackfn); assert.sameValue(newArr.length, 3, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-15.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-15.js index 4e253c64e1..1f87dab30f 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-15.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-15.js @@ -9,27 +9,27 @@ description: > property causes prototype index property to be visited ---*/ - function callbackfn(val, idx, obj) { - return true; - } - var arr = [0, 1, 2]; +function callbackfn(val, idx, obj) { + return true; +} +var arr = [0, 1, 2]; - Object.defineProperty(Array.prototype, "2", { - get: function () { - return "prototype"; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "2", { + get: function() { + return "prototype"; + }, + configurable: true +}); - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + arr.length = 2; + return 1; + }, + configurable: true +}); - var newArr = arr.filter(callbackfn); +var newArr = arr.filter(callbackfn); assert.sameValue(newArr.length, 3, 'newArr.length'); assert.sameValue(newArr[2], "prototype", 'newArr[2]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-16.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-16.js index c81608958c..b92fde3af4 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-16.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-16.js @@ -10,28 +10,28 @@ description: > flags: [noStrict] ---*/ - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var arr = [0, 1, 2]; +var arr = [0, 1, 2]; - Object.defineProperty(arr, "2", { - get: function () { - return "unconfigurable"; - }, - configurable: false - }); +Object.defineProperty(arr, "2", { + get: function() { + return "unconfigurable"; + }, + configurable: false +}); - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + arr.length = 2; + return 1; + }, + configurable: true +}); - var newArr = arr.filter(callbackfn); +var newArr = arr.filter(callbackfn); assert.sameValue(newArr.length, 3, 'newArr.length'); assert.sameValue(newArr[2], "unconfigurable", 'newArr[2]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-2.js index 63ffe45b5f..a9b8cdae4d 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-2.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-2.js @@ -9,21 +9,21 @@ description: > here ---*/ - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var obj = {}; +var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - obj[2] = "length"; - return 3; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + obj[2] = "length"; + return 3; + }, + configurable: true +}); - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], "length", 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-3.js index 9201770ac4..fd2a2612e9 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-3.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-3.js @@ -9,20 +9,23 @@ description: > here ---*/ - function callbackfn(val, idx, obj) { - return true; - } - var obj = { 2: 6.99, 8: 19 }; +function callbackfn(val, idx, obj) { + return true; +} +var obj = { + 2: 6.99, + 8: 19 +}; - Object.defineProperty(obj, "length", { - get: function () { - delete obj[2]; - return 10; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + delete obj[2]; + return 10; + }, + configurable: true +}); - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.notSameValue(newArr[0], 6.99, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-4.js index 81a5e3d118..61ad185951 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-4.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-4.js @@ -9,26 +9,28 @@ description: > current position are visited on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var obj = { length: 2 }; +var obj = { + length: 2 +}; - Object.defineProperty(obj, "0", { - get: function () { - Object.defineProperty(obj, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + Object.defineProperty(obj, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); assert.sameValue(newArr[1], 6.99, 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-5.js index 150eda57cc..d2d1fd70ca 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-5.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-5.js @@ -9,26 +9,26 @@ description: > current position are visited on an Array ---*/ - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var arr = [0, , 2]; +var arr = [0, , 2]; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(arr, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); - var newArr = arr.filter(callbackfn); +var newArr = arr.filter(callbackfn); assert.sameValue(newArr.length, 3, 'newArr.length'); assert.sameValue(newArr[1], 6.99, 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-6.js index 0932eb3345..d0bc0fb1e4 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-6.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-6.js @@ -9,25 +9,27 @@ description: > after current position are visited on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - return true; - } - var obj = { length: 2 }; +function callbackfn(val, idx, obj) { + return true; +} +var obj = { + length: 2 +}; - Object.defineProperty(obj, "0", { - get: function () { - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + Object.defineProperty(Object.prototype, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); assert.sameValue(Array[1], 6.99, 'Array[1]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-7.js index 677e3106fc..1fea787462 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-7.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-7.js @@ -9,25 +9,25 @@ description: > after current position are visited on an Array ---*/ - function callbackfn(val, idx, obj) { - return true; - } - var arr = [0, , 2]; +function callbackfn(val, idx, obj) { + return true; +} +var arr = [0, , 2]; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(Array.prototype, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); - var newArr = arr.filter(callbackfn); +var newArr = arr.filter(callbackfn); assert.sameValue(newArr.length, 3, 'newArr.length'); assert.sameValue(newArr[1], 6.99, 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-8.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-8.js index 00d064e237..0593df24fe 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-8.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-8.js @@ -9,30 +9,32 @@ description: > property not to be visited on an Array-like object ---*/ - var accessed = false; - var obj = { length: 2 }; +var accessed = false; +var obj = { + length: 2 +}; - function callbackfn(val, idx, o) { - accessed = true; - return true; - } +function callbackfn(val, idx, o) { + accessed = true; + return true; +} - Object.defineProperty(obj, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + return 6.99; + }, + configurable: true +}); - Object.defineProperty(obj, "0", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + delete obj[1]; + return 0; + }, + configurable: true +}); - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 0, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-9.js index 8f1588765f..1221c8864b 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-9.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-9.js @@ -9,27 +9,27 @@ description: > property not to be visited on an Array ---*/ - function callbackfn(val, idx, obj) { - return true; - } - var arr = [1, 2]; +function callbackfn(val, idx, obj) { + return true; +} +var arr = [1, 2]; - Object.defineProperty(arr, "1", { - get: function () { - return "6.99"; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + return "6.99"; + }, + configurable: true +}); - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); - var newArr = arr.filter(callbackfn); +var newArr = arr.filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 0, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-1.js index cdfc98323c..de7e415f30 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-1.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-1.js @@ -9,14 +9,18 @@ description: > property on an Array-like object ---*/ - var kValue = {}; - function callbackfn(val, idx, obj) { - return (idx === 5) && (val === kValue); - } +var kValue = {}; - var obj = { 5: kValue, length: 100 }; +function callbackfn(val, idx, obj) { + return (idx === 5) && (val === kValue); +} - var newArr = Array.prototype.filter.call(obj, callbackfn); +var obj = { + 5: kValue, + length: 100 +}; + +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], kValue, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-10.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-10.js index b44cba1e3f..394268152c 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-10.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-10.js @@ -9,19 +9,19 @@ description: > property on an Array ---*/ - function callbackfn(val, idx, obj) { - return idx === 2 && val === 12; - } +function callbackfn(val, idx, obj) { + return idx === 2 && val === 12; +} - var arr = []; +var arr = []; - Object.defineProperty(arr, "2", { - get: function () { - return 12; - }, - configurable: true - }); - var newArr = arr.filter(callbackfn); +Object.defineProperty(arr, "2", { + get: function() { + return 12; + }, + configurable: true +}); +var newArr = arr.filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 12, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-11.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-11.js index dc089ead83..a713e1953e 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-11.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-11.js @@ -10,25 +10,28 @@ description: > Array-like object ---*/ - function callbackfn(val, idx, obj) { - return idx === 0 && val === 11; - } +function callbackfn(val, idx, obj) { + return idx === 0 && val === 11; +} - var proto = { 0: 5, 1: 6 }; +var proto = { + 0: 5, + 1: 6 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 10; +var child = new Con(); +child.length = 10; - Object.defineProperty(child, "0", { - get: function () { - return 11; - }, - configurable: true - }); - var newArr = Array.prototype.filter.call(child, callbackfn); +Object.defineProperty(child, "0", { + get: function() { + return 11; + }, + configurable: true +}); +var newArr = Array.prototype.filter.call(child, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-12.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-12.js index bcd3b4287e..7dc94d210b 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-12.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-12.js @@ -9,21 +9,21 @@ description: > property that overrides an inherited data property on an Array ---*/ - function callbackfn(val, idx, obj) { - return val === 111 && idx === 0; - } +function callbackfn(val, idx, obj) { + return val === 111 && idx === 0; +} - var arr = []; +var arr = []; - Array.prototype[0] = 10; +Array.prototype[0] = 10; - Object.defineProperty(arr, "0", { - get: function () { - return 111; - }, - configurable: true - }); - var newArr = arr.filter(callbackfn); +Object.defineProperty(arr, "0", { + get: function() { + return 111; + }, + configurable: true +}); +var newArr = arr.filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 111, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-13.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-13.js index 32d9fa6f4c..4a692475a2 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-13.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-13.js @@ -10,32 +10,32 @@ description: > Array-like object ---*/ - function callbackfn(val, idx, obj) { - return idx === 1 && val === 12; - } +function callbackfn(val, idx, obj) { + return idx === 1 && val === 12; +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "1", { - get: function () { - return 6; - }, - configurable: true - }); +Object.defineProperty(proto, "1", { + get: function() { + return 6; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 10; +var child = new Con(); +child.length = 10; - Object.defineProperty(child, "1", { - get: function () { - return 12; - }, - configurable: true - }); - var newArr = Array.prototype.filter.call(child, callbackfn); +Object.defineProperty(child, "1", { + get: function() { + return 12; + }, + configurable: true +}); +var newArr = Array.prototype.filter.call(child, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 12, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-14.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-14.js index 1ccf426ac6..e6f2a95c64 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-14.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-14.js @@ -9,26 +9,26 @@ description: > property that overrides an inherited accessor property on an Array ---*/ - function callbackfn(val, idx, obj) { - return idx === 0 && val === 11; - } +function callbackfn(val, idx, obj) { + return idx === 0 && val === 11; +} - var arr = []; +var arr = []; - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 5; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return 5; + }, + configurable: true +}); - Object.defineProperty(arr, "0", { - get: function () { - return 11; - }, - configurable: true - }); - var newArr = arr.filter(callbackfn); +Object.defineProperty(arr, "0", { + get: function() { + return 11; + }, + configurable: true +}); +var newArr = arr.filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-15.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-15.js index d97746c2da..4a7122ea19 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-15.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-15.js @@ -9,25 +9,25 @@ description: > accessor property on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - return val === 11 && idx === 1; - } +function callbackfn(val, idx, obj) { + return val === 11 && idx === 1; +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "1", { - get: function () { - return 11; - }, - configurable: true - }); +Object.defineProperty(proto, "1", { + get: function() { + return 11; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 20; - var newArr = Array.prototype.filter.call(child, callbackfn); +var child = new Con(); +child.length = 20; +var newArr = Array.prototype.filter.call(child, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-16.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-16.js index 82834ff12f..9a04bb4875 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-16.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-16.js @@ -9,17 +9,17 @@ description: > accessor property on an Array ---*/ - function callbackfn(val, idx, obj) { - return idx === 0 && val === 11; - } +function callbackfn(val, idx, obj) { + return idx === 0 && val === 11; +} - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 11; - }, - configurable: true - }); - var newArr = [, , , ].filter(callbackfn); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return 11; + }, + configurable: true +}); +var newArr = [, , , ].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-17.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-17.js index 3b01f8f4c5..17bd3f8a7d 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-17.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-17.js @@ -9,17 +9,19 @@ description: > property without a get function on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - return undefined === val && idx === 1; - } +function callbackfn(val, idx, obj) { + return undefined === val && idx === 1; +} - var obj = { length: 2 }; - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); +var obj = { + length: 2 +}; +Object.defineProperty(obj, "1", { + set: function() {}, + configurable: true +}); - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], undefined, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-18.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-18.js index 3cfc401b90..b139b96a6f 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-18.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-18.js @@ -9,18 +9,18 @@ description: > property without a get function on an Array ---*/ - function callbackfn(val, idx, obj) { - return undefined === val && idx === 0; - } +function callbackfn(val, idx, obj) { + return undefined === val && idx === 0; +} - var arr = []; +var arr = []; - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(arr, "0", { + set: function() {}, + configurable: true +}); - var newArr = arr.filter(callbackfn); +var newArr = arr.filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], undefined, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-19.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-19.js index 4ff5f9589c..af8b5d615f 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-19.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-19.js @@ -10,18 +10,20 @@ description: > accessor property on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - return undefined === val && idx === 1; - } +function callbackfn(val, idx, obj) { + return undefined === val && idx === 1; +} - var obj = { length: 2 }; - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); +var obj = { + length: 2 +}; +Object.defineProperty(obj, "1", { + set: function() {}, + configurable: true +}); - Object.prototype[1] = 10; - var newArr = Array.prototype.filter.call(obj, callbackfn); +Object.prototype[1] = 10; +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], undefined, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-2.js index b2ea87479f..a129174e77 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-2.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-2.js @@ -9,13 +9,13 @@ description: > property on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 11; - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 11; + } +} - var newArr = [11].filter(callbackfn); +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-20.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-20.js index 83958a877d..fa5905c96f 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-20.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-20.js @@ -10,19 +10,19 @@ description: > accessor property on an Array ---*/ - function callbackfn(val, idx, obj) { - return undefined === val && idx === 0; - } +function callbackfn(val, idx, obj) { + return undefined === val && idx === 0; +} - var arr = []; +var arr = []; - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(arr, "0", { + set: function() {}, + configurable: true +}); - Array.prototype[0] = 100; - var newArr = arr.filter(callbackfn); +Array.prototype[0] = 100; +var newArr = arr.filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], undefined, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-21.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-21.js index e4c19177bf..87bc30149a 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-21.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-21.js @@ -9,22 +9,22 @@ description: > accessor property without a get function on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - return val === undefined && idx === 1; - } +function callbackfn(val, idx, obj) { + return val === undefined && idx === 1; +} - var proto = {}; - Object.defineProperty(proto, "1", { - set: function () { }, - configurable: true - }); +var proto = {}; +Object.defineProperty(proto, "1", { + set: function() {}, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 2; - var newArr = Array.prototype.filter.call(child, callbackfn); +var child = new Con(); +child.length = 2; +var newArr = Array.prototype.filter.call(child, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], undefined, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-22.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-22.js index 5093adca4e..ce088257b2 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-22.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-22.js @@ -9,15 +9,15 @@ description: > accessor property without a get function on an Array ---*/ - function callbackfn(val, idx, obj) { - return undefined === val && idx === 0; - } +function callbackfn(val, idx, obj) { + return undefined === val && idx === 0; +} - Object.defineProperty(Array.prototype, "0", { - set: function () { }, - configurable: true - }); - var newArr = [, ].filter(callbackfn); +Object.defineProperty(Array.prototype, "0", { + set: function() {}, + configurable: true +}); +var newArr = [, ].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], undefined, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-25.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-25.js index f050065ed4..f2288892ed 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-25.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-25.js @@ -10,15 +10,15 @@ description: > less than number of parameters) ---*/ - function callbackfn(val, idx, obj) { - return val === 11 && idx === 0; - } +function callbackfn(val, idx, obj) { + return val === 11 && idx === 0; +} - var func = function (a, b) { - return Array.prototype.filter.call(arguments, callbackfn); - }; +var func = function(a, b) { + return Array.prototype.filter.call(arguments, callbackfn); +}; - var newArr = func(11); +var newArr = func(11); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-26.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-26.js index 4c5719f154..13eabc564a 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-26.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-26.js @@ -10,20 +10,20 @@ description: > number of parameters) ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 11; - } else if (idx === 1) { - return val === 9; - } else { - return false; - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 11; + } else if (idx === 1) { + return val === 9; + } else { + return false; + } +} - var func = function (a, b) { - return Array.prototype.filter.call(arguments, callbackfn); - }; - var newArr = func(11, 9); +var func = function(a, b) { + return Array.prototype.filter.call(arguments, callbackfn); +}; +var newArr = func(11, 9); assert.sameValue(newArr.length, 2, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-27.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-27.js index 96927339aa..117cbb39b7 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-27.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-27.js @@ -10,22 +10,22 @@ description: > greater than number of parameters) ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 11; - } else if (idx === 1) { - return val === 12; - } else if (idx === 2) { - return val === 9; - } else { - return false; - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 11; + } else if (idx === 1) { + return val === 12; + } else if (idx === 2) { + return val === 9; + } else { + return false; + } +} - var func = function (a, b) { - return Array.prototype.filter.call(arguments, callbackfn); - }; - var newArr = func(11, 12, 9); +var func = function(a, b) { + return Array.prototype.filter.call(arguments, callbackfn); +}; +var newArr = func(11, 12, 9); assert.sameValue(newArr.length, 3, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-28.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-28.js index 266d3eb37e..28a3290dc4 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-28.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-28.js @@ -9,32 +9,32 @@ description: > iterations is observed on an Array ---*/ - var preIterVisible = false; - var arr = []; +var preIterVisible = false; +var arr = []; - function callbackfn(val, idx, obj) { - return idx === 1 && val === 9; - } +function callbackfn(val, idx, obj) { + return idx === 1 && val === 9; +} - Object.defineProperty(arr, "0", { - get: function () { - preIterVisible = true; - return 11; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + preIterVisible = true; + return 11; + }, + configurable: true +}); - Object.defineProperty(arr, "1", { - get: function () { - if (preIterVisible) { - return 9; - } else { - return 11; - } - }, - configurable: true - }); - var newArr = arr.filter(callbackfn); +Object.defineProperty(arr, "1", { + get: function() { + if (preIterVisible) { + return 9; + } else { + return 11; + } + }, + configurable: true +}); +var newArr = arr.filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 9, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-29.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-29.js index 5029717015..f3cce11d79 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-29.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-29.js @@ -9,32 +9,34 @@ description: > iterations is observed on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - return val === 9 && idx === 1; - } +function callbackfn(val, idx, obj) { + return val === 9 && idx === 1; +} - var preIterVisible = false; - var obj = { length: 2 }; +var preIterVisible = false; +var obj = { + length: 2 +}; - Object.defineProperty(obj, "0", { - get: function () { - preIterVisible = true; - return 11; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + preIterVisible = true; + return 11; + }, + configurable: true +}); - Object.defineProperty(obj, "1", { - get: function () { - if (preIterVisible) { - return 9; - } else { - return 13; - } - }, - configurable: true - }); - var newArr = Array.prototype.filter.call(obj, callbackfn); +Object.defineProperty(obj, "1", { + get: function() { + if (preIterVisible) { + return 9; + } else { + return 13; + } + }, + configurable: true +}); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 9, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-3.js index ce761b38f8..1f6b1b8c15 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-3.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-3.js @@ -10,20 +10,23 @@ description: > Array-like object ---*/ - function callbackfn(val, idx, obj) { - return (idx === 5) && (val === "abc"); - } +function callbackfn(val, idx, obj) { + return (idx === 5) && (val === "abc"); +} - var proto = { 0: 11, 5: 100 }; +var proto = { + 0: 11, + 5: 100 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[5] = "abc"; - child.length = 10; +var child = new Con(); +child[5] = "abc"; +child.length = 10; - var newArr = Array.prototype.filter.call(child, callbackfn); +var newArr = Array.prototype.filter.call(child, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], "abc", 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-30.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-30.js index 150a4e013f..01ffb99e01 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-30.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-30.js @@ -9,22 +9,28 @@ description: > terminate iteration on an Array-like object ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - if (idx > 1) { - accessed = true; - } - return true; - } +var accessed = false; - var obj = { 0: 11, 5: 10, 10: 8, length: 20 }; - Object.defineProperty(obj, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + if (idx > 1) { + accessed = true; + } + return true; +} + +var obj = { + 0: 11, + 5: 10, + 10: 8, + length: 20 +}; +Object.defineProperty(obj, "1", { + get: function() { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true +}); assert.throws(RangeError, function() { - Array.prototype.filter.call(obj, callbackfn); + Array.prototype.filter.call(obj, callbackfn); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-31.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-31.js index 0eb4d2ecdc..dc86f08484 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-31.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-31.js @@ -9,25 +9,26 @@ description: > terminate iteration on an Array ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - if (idx > 1) { - accessed = true; - } - return true; - } +var accessed = false; - var arr = []; - arr[5] = 10; - arr[10] = 100; +function callbackfn(val, idx, obj) { + if (idx > 1) { + accessed = true; + } + return true; +} - Object.defineProperty(arr, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); +var arr = []; +arr[5] = 10; +arr[10] = 100; + +Object.defineProperty(arr, "1", { + get: function() { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true +}); assert.throws(RangeError, function() { - arr.filter(callbackfn); + arr.filter(callbackfn); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-4.js index 39f5a2af26..62273cdb99 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-4.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-4.js @@ -9,12 +9,12 @@ description: > property that overrides an inherited data property on an Array ---*/ - function callbackfn(val, idx, obj) { - return (idx === 0) && (val === 12); - } +function callbackfn(val, idx, obj) { + return (idx === 0) && (val === 12); +} - Array.prototype[0] = 11; - var newArr = [12].filter(callbackfn); +Array.prototype[0] = 11; +var newArr = [12].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 12, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-5.js index 43000dca2e..7f694e9931 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-5.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-5.js @@ -10,31 +10,31 @@ description: > Array-like object ---*/ - function callbackfn(val, idx, obj) { - return idx === 0 && val === 11; - } +function callbackfn(val, idx, obj) { + return idx === 0 && val === 11; +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "0", { - get: function () { - return 5; - }, - configurable: true - }); +Object.defineProperty(proto, "0", { + get: function() { + return 5; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 2; - Object.defineProperty(child, "0", { - value: 11, - configurable: true - }); - child[1] = 12; +var child = new Con(); +child.length = 2; +Object.defineProperty(child, "0", { + value: 11, + configurable: true +}); +child[1] = 12; - var newArr = Array.prototype.filter.call(child, callbackfn); +var newArr = Array.prototype.filter.call(child, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-6.js index 18af4d7acc..17ead0e578 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-6.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-6.js @@ -9,17 +9,17 @@ description: > property that overrides an inherited accessor property on an Array ---*/ - function callbackfn(val, idx, obj) { - return val === 11; - } +function callbackfn(val, idx, obj) { + return val === 11; +} - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 9; - }, - configurable: true - }); - var newArr = [11].filter(callbackfn); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return 9; + }, + configurable: true +}); +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-7.js index ec3284966a..2f92dcd612 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-7.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-7.js @@ -9,21 +9,23 @@ description: > property on an Array-like object ---*/ - var kValue = 'abc'; +var kValue = 'abc'; - function callbackfn(val, idx, obj) { - return (idx === 5) && (val === kValue); - } +function callbackfn(val, idx, obj) { + return (idx === 5) && (val === kValue); +} - var proto = { 5: kValue }; +var proto = { + 5: kValue +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 10; +var child = new Con(); +child.length = 10; - var newArr = Array.prototype.filter.call(child, callbackfn); +var newArr = Array.prototype.filter.call(child, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], kValue, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-8.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-8.js index 3de54b2b26..a263ceb340 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-8.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-8.js @@ -9,12 +9,12 @@ description: > property on an Array ---*/ - function callbackfn(val, idx, obj) { - return (idx === 1) && (val === 13); - } +function callbackfn(val, idx, obj) { + return (idx === 1) && (val === 13); +} - Array.prototype[1] = 13; - var newArr = [, , , ].filter(callbackfn); +Array.prototype[1] = 13; +var newArr = [, , , ].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 13, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-9.js index 3e72994868..57aae11773 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-9.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-9.js @@ -9,20 +9,23 @@ description: > property on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - return (idx === 0) && (val === 11); - } +function callbackfn(val, idx, obj) { + return (idx === 0) && (val === 11); +} - var obj = { 10: 10, length: 20 }; +var obj = { + 10: 10, + length: 20 +}; - Object.defineProperty(obj, "0", { - get: function () { - return 11; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + return 11; + }, + configurable: true +}); - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-1.js index f635e683cd..e29bab3358 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-1.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-1.js @@ -7,18 +7,19 @@ es5id: 15.4.4.20-9-c-ii-1 description: Array.prototype.filter - callbackfn called with correct parameters ---*/ - var bPar = true; - var bCalled = false; - function callbackfn(val, idx, obj) - { - bCalled = true; - if(obj[idx] !== val) - bPar = false; - } +var bPar = true; +var bCalled = false; - var srcArr = [0,1,true,null,new Object(),"five"]; - srcArr[999999] = -6.6; - var resArr = srcArr.filter(callbackfn); +function callbackfn(val, idx, obj) +{ + bCalled = true; + if (obj[idx] !== val) + bPar = false; +} + +var srcArr = [0, 1, true, null, new Object(), "five"]; +srcArr[999999] = -6.6; +var resArr = srcArr.filter(callbackfn); assert.sameValue(bCalled, true, 'bCalled'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-10.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-10.js index b7a6a8e0e5..67884f9e54 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-10.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-10.js @@ -9,10 +9,10 @@ description: > parameter ---*/ - function callbackfn(val) { - return val > 10; - } - var newArr = [12].filter(callbackfn); +function callbackfn(val) { + return val > 10; +} +var newArr = [12].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 12, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-11.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-11.js index 4f5cd0714c..ca8ee65542 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-11.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-11.js @@ -9,10 +9,10 @@ description: > parameter ---*/ - function callbackfn(val, idx) { - return val > 10 && arguments[2][idx] === val; - } - var newArr = [11].filter(callbackfn); +function callbackfn(val, idx) { + return val > 10 && arguments[2][idx] === val; +} +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-12.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-12.js index 400d6ae8a1..8ef2009e4e 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-12.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-12.js @@ -9,10 +9,10 @@ description: > parameter ---*/ - function callbackfn(val, idx, obj) { - return val > 10 && obj[idx] === val; - } - var newArr = [11].filter(callbackfn); +function callbackfn(val, idx, obj) { + return val > 10 && obj[idx] === val; +} +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-13.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-13.js index a51466ee68..59087549b9 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-13.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-13.js @@ -9,10 +9,10 @@ description: > get parameter value ---*/ - function callbackfn() { - return arguments[2][arguments[1]] === arguments[0]; - } - var newArr = [11].filter(callbackfn); +function callbackfn() { + return arguments[2][arguments[1]] === arguments[0]; +} +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-16.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-16.js index 6b1ed02785..44dab44499 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-16.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-16.js @@ -9,12 +9,15 @@ description: > object when T is not an object (T is a boolean) ---*/ - function callbackfn(val, idx, obj) { - return this.valueOf() === false; - } +function callbackfn(val, idx, obj) { + return this.valueOf() === false; +} - var obj = { 0: 11, length: 2 }; - var newArr = Array.prototype.filter.call(obj, callbackfn, false); +var obj = { + 0: 11, + length: 2 +}; +var newArr = Array.prototype.filter.call(obj, callbackfn, false); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-17.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-17.js index 17022d9b26..99a2bb143d 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-17.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-17.js @@ -9,12 +9,15 @@ description: > when T is not an object (T is a number) ---*/ - function callbackfn(val, idx, o) { - return 5 === this.valueOf(); - } +function callbackfn(val, idx, o) { + return 5 === this.valueOf(); +} - var obj = { 0: 11, length: 2 }; - var newArr = Array.prototype.filter.call(obj, callbackfn, 5); +var obj = { + 0: 11, + length: 2 +}; +var newArr = Array.prototype.filter.call(obj, callbackfn, 5); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-18.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-18.js index bc7ae00991..73ccf1d5fd 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-18.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-18.js @@ -9,12 +9,15 @@ description: > object when T is not an object (T is a string) ---*/ - function callbackfn(val, idx, obj) { - return 'hello' === this.valueOf(); - } +function callbackfn(val, idx, obj) { + return 'hello' === this.valueOf(); +} - var obj = { 0: 11, length: 2 }; - var newArr = Array.prototype.filter.call(obj, callbackfn, "hello"); +var obj = { + 0: 11, + length: 2 +}; +var newArr = Array.prototype.filter.call(obj, callbackfn, "hello"); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-19.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-19.js index 235694b234..b2ba6df2bc 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-19.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-19.js @@ -7,15 +7,20 @@ es5id: 15.4.4.20-9-c-ii-19 description: Array.prototype.filter - non-indexed properties are not called ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val === 8; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val === 8; +} - var obj = { 0: 11, non_index_property: 8, 2: 5, length: 20 }; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var obj = { + 0: 11, + non_index_property: 8, + 2: 5, + length: 20 +}; +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-2.js index 52910ae39a..208ff7aacc 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-2.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-2.js @@ -7,17 +7,18 @@ es5id: 15.4.4.20-9-c-ii-2 description: Array.prototype.filter - callbackfn takes 3 arguments ---*/ - var parCnt = 3; - var bCalled = false - function callbackfn(val, idx, obj) - { - bCalled = true; - if(arguments.length !== 3) - parCnt = arguments.length; //verify if callbackfn was called with 3 parameters - } +var parCnt = 3; +var bCalled = false - var srcArr = [0,1,2,3,4,5,6,7,8,9]; - var resArr = srcArr.filter(callbackfn); +function callbackfn(val, idx, obj) +{ + bCalled = true; + if (arguments.length !== 3) + parCnt = arguments.length; //verify if callbackfn was called with 3 parameters +} + +var srcArr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; +var resArr = srcArr.filter(callbackfn); assert.sameValue(bCalled, true, 'bCalled'); assert.sameValue(parCnt, 3, 'parCnt'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-20.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-20.js index fc145e2344..645621f7e1 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-20.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-20.js @@ -9,14 +9,19 @@ description: > (thisArg is correct) ---*/ - var thisArg = { threshold: 10 }; +var thisArg = { + threshold: 10 +}; - function callbackfn(val, idx, obj) { - return this === thisArg; - } +function callbackfn(val, idx, obj) { + return this === thisArg; +} - var obj = { 0: 11, length: 1 }; - var newArr = Array.prototype.filter.call(obj, callbackfn, thisArg); +var obj = { + 0: 11, + length: 1 +}; +var newArr = Array.prototype.filter.call(obj, callbackfn, thisArg); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-21.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-21.js index 1dd9e0853e..8c2b37645f 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-21.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-21.js @@ -9,20 +9,24 @@ description: > (kValue is correct) ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 11; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 11; + } - if (idx === 1) { - return val === 12; - } + if (idx === 1) { + return val === 12; + } - return false; - } + return false; +} - var obj = { 0: 11, 1: 12, length: 2 }; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var obj = { + 0: 11, + 1: 12, + length: 2 +}; +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-22.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-22.js index 1976d0ab97..d8f90cbda1 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-22.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-22.js @@ -9,20 +9,24 @@ description: > (the index k is correct) ---*/ - function callbackfn(val, idx, obj) { - if (val === 11) { - return idx === 0; - } +function callbackfn(val, idx, obj) { + if (val === 11) { + return idx === 0; + } - if (val === 12) { - return idx === 1; - } + if (val === 12) { + return idx === 1; + } - return false; - } + return false; +} - var obj = { 0: 11, 1: 12, length: 2 }; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var obj = { + 0: 11, + 1: 12, + length: 2 +}; +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-23.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-23.js index cdb465ca3b..54813293c2 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-23.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-23.js @@ -9,13 +9,16 @@ description: > (this object O is correct) ---*/ - var obj = { 0: 11, length: 2 }; +var obj = { + 0: 11, + length: 2 +}; - function callbackfn(val, idx, o) { - return obj === o; - } +function callbackfn(val, idx, o) { + return obj === o; +} - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-4.js index c9a7de747a..5b8e78643b 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-4.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-4.js @@ -9,18 +9,19 @@ description: > order ---*/ - var arr = [0, 1, 2, 3, 4, 5]; - var lastIdx = 0; - var called = 0; - function callbackfn(val, idx, o) { - called++; - if (lastIdx !== idx) { - return false; - } else { - lastIdx++; - return true; - } - } - var newArr = arr.filter(callbackfn); +var arr = [0, 1, 2, 3, 4, 5]; +var lastIdx = 0; +var called = 0; + +function callbackfn(val, idx, o) { + called++; + if (lastIdx !== idx) { + return false; + } else { + lastIdx++; + return true; + } +} +var newArr = arr.filter(callbackfn); assert.sameValue(newArr.length, called, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-5.js index dbf9d0d547..f0f5e5df9c 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-5.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-5.js @@ -9,25 +9,25 @@ description: > iteration and not prior to starting the loop on an Array ---*/ - var kIndex = []; - var called = 0; +var kIndex = []; +var called = 0; - //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. - function callbackfn(val, idx, obj) { - called++; - //Each position should be visited one time, which means k is accessed one time during iterations. - if (kIndex[idx] === undefined) { - //when current position is visited, its previous index should has been visited. - if (idx !== 0 && kIndex[idx - 1] === undefined) { - return true; - } - kIndex[idx] = 1; - return false; - } else { - return true; - } - } - var newArr = [11, 12, 13, 14].filter(callbackfn, undefined); +//By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. +function callbackfn(val, idx, obj) { + called++; + //Each position should be visited one time, which means k is accessed one time during iterations. + if (kIndex[idx] === undefined) { + //when current position is visited, its previous index should has been visited. + if (idx !== 0 && kIndex[idx - 1] === undefined) { + return true; + } + kIndex[idx] = 1; + return false; + } else { + return true; + } +} +var newArr = [11, 12, 13, 14].filter(callbackfn, undefined); assert.sameValue(newArr.length, 0, 'newArr.length'); assert.sameValue(called, 4, 'called'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-6.js index 6390d908cd..ea27bcafed 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-6.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-6.js @@ -9,17 +9,20 @@ description: > consistent ---*/ - var obj = { 0: 11, length: 1 }; - var thisArg = {}; +var obj = { + 0: 11, + length: 1 +}; +var thisArg = {}; - function callbackfn() { - return this === thisArg && - arguments[0] === 11 && - arguments[1] === 0 && - arguments[2] === obj; - } +function callbackfn() { + return this === thisArg && + arguments[0] === 11 && + arguments[1] === 0 && + arguments[2] === obj; +} - var newArr = Array.prototype.filter.call(obj, callbackfn, thisArg); +var newArr = Array.prototype.filter.call(obj, callbackfn, thisArg); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-7.js index 97dfb262b6..68d53c92cd 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-7.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-7.js @@ -9,18 +9,23 @@ description: > callbackfn terminate iteration ---*/ - var called = 0; +var called = 0; - function callbackfn(val, idx, obj) { - called++; - if (called === 1) { - throw new Error("Exception occurred in callbackfn"); - } - return true; - } +function callbackfn(val, idx, obj) { + called++; + if (called === 1) { + throw new Error("Exception occurred in callbackfn"); + } + return true; +} - var obj = { 0: 11, 4: 10, 10: 8, length: 20 }; +var obj = { + 0: 11, + 4: 10, + 10: 8, + length: 20 +}; assert.throws(Error, function() { - Array.prototype.filter.call(obj, callbackfn); + Array.prototype.filter.call(obj, callbackfn); }); assert.sameValue(called, 1, 'called'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-8.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-8.js index 6551c71dfe..6f93d5fee5 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-8.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-8.js @@ -9,16 +9,20 @@ description: > iterations is observed ---*/ - var obj = { 0: 11, 1: 12, length: 2 }; +var obj = { + 0: 11, + 1: 12, + length: 2 +}; - function callbackfn(val, idx, o) { - if (idx === 0) { - obj[idx + 1] = 8; - } - return val > 10; - } +function callbackfn(val, idx, o) { + if (idx === 0) { + obj[idx + 1] = 8; + } + return val > 10; +} - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-9.js index 0d6beb1478..382633547c 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-9.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-9.js @@ -9,10 +9,10 @@ description: > parameter ---*/ - function callbackfn() { - return true; - } - var newArr = [11].filter(callbackfn); +function callbackfn() { + return true; +} +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-1.js index cf811e4dd9..32568ef97d 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-1.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-1.js @@ -9,12 +9,16 @@ description: > 'kValue' ---*/ - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var obj = { 0: 11, 1: 9, length: 2 }; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var obj = { + 0: 11, + 1: 9, + length: 2 +}; +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr[0], obj[0], 'newArr[0]'); assert.sameValue(newArr[1], obj[1], 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-2.js index 8acc541e36..3a9a1dfc01 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-2.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-2.js @@ -9,14 +9,18 @@ description: > overwritten ---*/ - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var obj = { 0: 11, 1: 9, length: 2 }; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var obj = { + 0: 11, + 1: 9, + length: 2 +}; +var newArr = Array.prototype.filter.call(obj, callbackfn); - var tempVal = newArr[1]; - newArr[1] += 1; +var tempVal = newArr[1]; +newArr[1] += 1; assert.notSameValue(newArr[1], tempVal, 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-3.js index c3d2d718d3..1b641737e9 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-3.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-3.js @@ -9,21 +9,24 @@ description: > enumerated ---*/ - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var obj = { 0: 11, length: 2 }; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var obj = { + 0: 11, + length: 2 +}; +var newArr = Array.prototype.filter.call(obj, callbackfn); - var prop; - var enumerable = false; - for (prop in newArr) { - if (newArr.hasOwnProperty(prop)) { - if (prop === "0") { - enumerable = true; - } - } - } +var prop; +var enumerable = false; +for (prop in newArr) { + if (newArr.hasOwnProperty(prop)) { + if (prop === "0") { + enumerable = true; + } + } +} assert(enumerable, 'enumerable !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-4.js index 43d859cc4f..18f72dd4c7 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-4.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-4.js @@ -9,15 +9,19 @@ description: > changed or deleted ---*/ - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var obj = { 0: 11, 1: 9, length: 2 }; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var obj = { + 0: 11, + 1: 9, + length: 2 +}; +var newArr = Array.prototype.filter.call(obj, callbackfn); - var tempVal = newArr[1]; - delete newArr[1]; +var tempVal = newArr[1]; +delete newArr[1]; assert.notSameValue(tempVal, undefined, 'tempVal'); assert.sameValue(newArr[1], undefined, 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-5.js index 010699ccf4..b5a88eb4b9 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-5.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-5.js @@ -9,19 +9,20 @@ description: > numeric order ---*/ - var arr = [0, 1, 2, 3, 4]; - var lastToIdx = 0; - var called = 0; - function callbackfn(val, idx, obj) { - called++; - if (lastToIdx !== idx) { - return false; - } else { - lastToIdx++; - return true; - } - } - var newArr = arr.filter(callbackfn); +var arr = [0, 1, 2, 3, 4]; +var lastToIdx = 0; +var called = 0; + +function callbackfn(val, idx, obj) { + called++; + if (lastToIdx !== idx) { + return false; + } else { + lastToIdx++; + return true; + } +} +var newArr = arr.filter(callbackfn); assert.sameValue(newArr.length, 5, 'newArr.length'); assert.sameValue(called, 5, 'called'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-6.js index aaad13206c..8e9d64fc65 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-6.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-6.js @@ -10,25 +10,25 @@ description: > starting the loop ---*/ - var toIndex = []; - var called = 0; +var toIndex = []; +var called = 0; - //By below way, we could verify that 'to' would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. - function callbackfn(val, idx, obj) { - called++; - //Each position should be visited one time, which means 'to' is accessed one time during iterations. - if (toIndex[idx] === undefined) { - //when current position is visited, its previous index should has been visited. - if (idx !== 0 && toIndex[idx - 1] === undefined) { - return false; - } - toIndex[idx] = 1; - return true; - } else { - return false; - } - } - var newArr = [11, 12, 13, 14].filter(callbackfn, undefined); +//By below way, we could verify that 'to' would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. +function callbackfn(val, idx, obj) { + called++; + //Each position should be visited one time, which means 'to' is accessed one time during iterations. + if (toIndex[idx] === undefined) { + //when current position is visited, its previous index should has been visited. + if (idx !== 0 && toIndex[idx - 1] === undefined) { + return false; + } + toIndex[idx] = 1; + return true; + } else { + return false; + } +} +var newArr = [11, 12, 13, 14].filter(callbackfn, undefined); assert.sameValue(newArr.length, 4, 'newArr.length'); assert.sameValue(called, 4, 'called'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1.js index b6c6e6a61f..b4090e61db 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1.js @@ -9,14 +9,14 @@ description: > returned array element ---*/ - function callbackfn(val, idx, obj){ - if(val % 2) - return true; - else - return false; - } - var srcArr = [0,1,2,3,4]; - var resArr = srcArr.filter(callbackfn); +function callbackfn(val, idx, obj) { + if (val % 2) + return true; + else + return false; +} +var srcArr = [0, 1, 2, 3, 4]; +var resArr = srcArr.filter(callbackfn); assert(resArr.length > 0, 'resArr.length > 0'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-10.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-10.js index 38b9c166b5..e0095481f7 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-10.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-10.js @@ -9,11 +9,11 @@ description: > (value is negative number) ---*/ - function callbackfn(val, idx, obj) { - return -5; - } +function callbackfn(val, idx, obj) { + return -5; +} - var newArr = [11].filter(callbackfn); +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-11.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-11.js index afdb356859..f1458a7ec5 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-11.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-11.js @@ -9,11 +9,11 @@ description: > (value is Infinity) ---*/ - function callbackfn(val, idx, obj) { - return Infinity; - } +function callbackfn(val, idx, obj) { + return Infinity; +} - var newArr = [11].filter(callbackfn); +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-12.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-12.js index 719ee9bc9e..3187b31ed7 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-12.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-12.js @@ -9,11 +9,11 @@ description: > (value is -Infinity) ---*/ - function callbackfn(val, idx, obj) { - return -Infinity; - } +function callbackfn(val, idx, obj) { + return -Infinity; +} - var newArr = [11].filter(callbackfn); +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-13.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-13.js index e78a98f136..3af7abd329 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-13.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-13.js @@ -9,14 +9,14 @@ description: > (value is NaN) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return NaN; - } +function callbackfn(val, idx, obj) { + accessed = true; + return NaN; +} - var newArr = [11].filter(callbackfn); +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-14.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-14.js index a9df829af6..976eb524d9 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-14.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-14.js @@ -9,14 +9,14 @@ description: > string ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return ""; - } +function callbackfn(val, idx, obj) { + accessed = true; + return ""; +} - var newArr = [11].filter(callbackfn); +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-15.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-15.js index c6cac3c3c8..46d3a541da 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-15.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-15.js @@ -9,11 +9,11 @@ description: > string ---*/ - function callbackfn(val, idx, obj) { - return "non-empty string"; - } +function callbackfn(val, idx, obj) { + return "non-empty string"; +} - var newArr = [11].filter(callbackfn); +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-16.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-16.js index 15d6f41944..9d61f23cf0 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-16.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-16.js @@ -9,11 +9,11 @@ description: > object ---*/ - function callbackfn(val, idx, obj) { - return function () { }; - } +function callbackfn(val, idx, obj) { + return function() {}; +} - var newArr = [11].filter(callbackfn); +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-17.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-17.js index 4fa7e5e1e2..e897b21bcc 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-17.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-17.js @@ -9,11 +9,11 @@ description: > object ---*/ - function callbackfn(val, idx, obj) { - return new Array(10); - } +function callbackfn(val, idx, obj) { + return new Array(10); +} - var newArr = [11].filter(callbackfn); +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-18.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-18.js index 46dad6dd06..71f79ca9e9 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-18.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-18.js @@ -9,11 +9,11 @@ description: > object ---*/ - function callbackfn(val, idx, obj) { - return new String(); - } +function callbackfn(val, idx, obj) { + return new String(); +} - var newArr = [11].filter(callbackfn); +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-19.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-19.js index bd35cfb692..0570144e92 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-19.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-19.js @@ -9,11 +9,11 @@ description: > object ---*/ - function callbackfn(val, idx, obj) { - return new Boolean(); - } +function callbackfn(val, idx, obj) { + return new Boolean(); +} - var newArr = [11].filter(callbackfn); +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-2.js index b0681bb102..892a96c6b0 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-2.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-2.js @@ -7,16 +7,19 @@ es5id: 15.4.4.20-9-c-iii-2 description: Array.prototype.filter - return value of callbackfn is undefined ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, o) { - accessed = true; - return undefined; - } +function callbackfn(val, idx, o) { + accessed = true; + return undefined; +} - var obj = { 0: 11, length: 1 }; +var obj = { + 0: 11, + length: 1 +}; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-20.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-20.js index 8f3f5e55f4..c5409a87e7 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-20.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-20.js @@ -9,11 +9,11 @@ description: > object ---*/ - function callbackfn(val, idx, obj) { - return new Number(); - } +function callbackfn(val, idx, obj) { + return new Number(); +} - var newArr = [11].filter(callbackfn); +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-21.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-21.js index 5d91b294fc..80c3876c64 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-21.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-21.js @@ -9,11 +9,11 @@ description: > object ---*/ - function callbackfn(val, idx, obj) { - return Math; - } +function callbackfn(val, idx, obj) { + return Math; +} - var newArr = [11].filter(callbackfn); +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-22.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-22.js index 7825fe47ff..b9e29f24bb 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-22.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-22.js @@ -9,11 +9,11 @@ description: > object ---*/ - function callbackfn(val, idx, obj) { - return new Date(); - } +function callbackfn(val, idx, obj) { + return new Date(); +} - var newArr = [11].filter(callbackfn); +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-23.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-23.js index 7fca3c93de..69b2c2c72b 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-23.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-23.js @@ -9,11 +9,11 @@ description: > object ---*/ - function callbackfn(val, idx, obj) { - return new RegExp(); - } +function callbackfn(val, idx, obj) { + return new RegExp(); +} - var newArr = [11].filter(callbackfn); +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-24.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-24.js index 8f0a030c38..afd5e22348 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-24.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-24.js @@ -9,11 +9,11 @@ description: > object ---*/ - function callbackfn(val, idx, obj) { - return JSON; - } +function callbackfn(val, idx, obj) { + return JSON; +} - var newArr = [11].filter(callbackfn); +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-25.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-25.js index 57be04e13c..279fb2a4b3 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-25.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-25.js @@ -9,11 +9,11 @@ description: > object ---*/ - function callbackfn(val, idx, obj) { - return new EvalError(); - } +function callbackfn(val, idx, obj) { + return new EvalError(); +} - var newArr = [11].filter(callbackfn); +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-26.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-26.js index 332a4c3a36..25ec2c9fe8 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-26.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-26.js @@ -9,11 +9,11 @@ description: > Arguments object ---*/ - function callbackfn(val, idx, obj) { - return arguments; - } +function callbackfn(val, idx, obj) { + return arguments; +} - var newArr = [11].filter(callbackfn); +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-28.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-28.js index a8d86ae226..7d02e8a477 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-28.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-28.js @@ -10,11 +10,12 @@ description: > ---*/ var global = this; - function callbackfn(val, idx, obj) { - return global; - } - var newArr = [11].filter(callbackfn); +function callbackfn(val, idx, obj) { + return global; +} + +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-29.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-29.js index a16c1a2dd7..4184c13cfd 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-29.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-29.js @@ -9,16 +9,20 @@ description: > Array ---*/ - var called = 0; +var called = 0; - function callbackfn(val, idx, obj) { - called++; - return val > 10; - } +function callbackfn(val, idx, obj) { + called++; + return val > 10; +} - var obj = { 0: 11, 1: 8, length: 20 }; +var obj = { + 0: 11, + 1: 8, + length: 20 +}; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.notSameValue(newArr[0], 8, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-3.js index 8c3fa9315f..f5d032d1c8 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-3.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-3.js @@ -7,16 +7,19 @@ es5id: 15.4.4.20-9-c-iii-3 description: Array.prototype.filter - return value of callbackfn is null ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return null; - } +function callbackfn(val, idx, obj) { + accessed = true; + return null; +} - var obj = { 0: 11, length: 1 }; +var obj = { + 0: 11, + length: 1 +}; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-30.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-30.js index 603c075672..e21b710d61 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-30.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-30.js @@ -9,11 +9,11 @@ description: > callbackfn is treated as true value ---*/ - function callbackfn(val, idx, obj) { - return new Boolean(false); - } +function callbackfn(val, idx, obj) { + return new Boolean(false); +} - var newArr = [11].filter(callbackfn); +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-4.js index 957e1b5060..400819dc74 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-4.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-4.js @@ -9,16 +9,19 @@ description: > (value is false) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return false; - } +function callbackfn(val, idx, obj) { + accessed = true; + return false; +} - var obj = { 0: 11, length: 1 }; +var obj = { + 0: 11, + length: 1 +}; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-5.js index 3b3959c4f6..d33c906f24 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-5.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-5.js @@ -9,13 +9,16 @@ description: > (value is true) ---*/ - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var obj = { 0: 11, length: 1 }; +var obj = { + 0: 11, + length: 1 +}; - var newArr = Array.prototype.filter.call(obj, callbackfn); +var newArr = Array.prototype.filter.call(obj, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-6.js index 59e225bab0..8cfdbcbfdd 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-6.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-6.js @@ -9,14 +9,14 @@ description: > (value is 0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return 0; - } +function callbackfn(val, idx, obj) { + accessed = true; + return 0; +} - var newArr = [11].filter(callbackfn); +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-7.js index 8b1efafcda..766eb4034f 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-7.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-7.js @@ -9,14 +9,14 @@ description: > (value is +0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return +0; - } +function callbackfn(val, idx, obj) { + accessed = true; + return +0; +} - var newArr = [11].filter(callbackfn); +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-8.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-8.js index 3711ff9ef6..ae10c8998b 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-8.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-8.js @@ -9,14 +9,14 @@ description: > (value is -0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return -0; - } +function callbackfn(val, idx, obj) { + accessed = true; + return -0; +} - var newArr = [11].filter(callbackfn); +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-9.js index 33bd28e868..c9f2d57726 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-9.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-9.js @@ -9,11 +9,11 @@ description: > (value is positive number) ---*/ - function callbackfn(val, idx, obj) { - return 5; - } +function callbackfn(val, idx, obj) { + return 5; +} - var newArr = [11].filter(callbackfn); +var newArr = [11].filter(callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/create-ctor-non-object.js b/test/built-ins/Array/prototype/filter/create-ctor-non-object.js index 988fed039e..e4f50c1cf0 100644 --- a/test/built-ins/Array/prototype/filter/create-ctor-non-object.js +++ b/test/built-ins/Array/prototype/filter/create-ctor-non-object.js @@ -20,7 +20,9 @@ info: | var a = []; var callCount = 0; -var cb = function() { callCount += 0; }; +var cb = function() { + callCount += 0; +}; a.constructor = null; assert.throws(TypeError, function() { diff --git a/test/built-ins/Array/prototype/filter/create-ctor-poisoned.js b/test/built-ins/Array/prototype/filter/create-ctor-poisoned.js index a766e68961..8dec316a78 100644 --- a/test/built-ins/Array/prototype/filter/create-ctor-poisoned.js +++ b/test/built-ins/Array/prototype/filter/create-ctor-poisoned.js @@ -17,7 +17,9 @@ info: | var a = []; var callCount = 0; -var cb = function() { callCount += 1; }; +var cb = function() { + callCount += 1; +}; Object.defineProperty(a, 'constructor', { get: function() { diff --git a/test/built-ins/Array/prototype/filter/create-non-array.js b/test/built-ins/Array/prototype/filter/create-non-array.js index 32ef7736f7..34c2a56a07 100644 --- a/test/built-ins/Array/prototype/filter/create-non-array.js +++ b/test/built-ins/Array/prototype/filter/create-non-array.js @@ -16,7 +16,9 @@ info: | 4. If isArray is false, return ? ArrayCreate(length). ---*/ -var obj = { length: 0 }; +var obj = { + length: 0 +}; var callCount = 0; var result; Object.defineProperty(obj, 'constructor', { diff --git a/test/built-ins/Array/prototype/filter/create-revoked-proxy.js b/test/built-ins/Array/prototype/filter/create-revoked-proxy.js index aecf766f9b..3bdee5cd64 100644 --- a/test/built-ins/Array/prototype/filter/create-revoked-proxy.js +++ b/test/built-ins/Array/prototype/filter/create-revoked-proxy.js @@ -26,7 +26,9 @@ features: [Proxy] var o = Proxy.revocable([], {}); var ctorCount = 0; var cbCount = 0; -var cb = function() { cbCount += 1; }; +var cb = function() { + cbCount += 1; +}; Object.defineProperty(o.proxy, 'constructor', { get: function() { diff --git a/test/built-ins/Array/prototype/filter/create-species-abrupt.js b/test/built-ins/Array/prototype/filter/create-species-abrupt.js index 42a4f2eda8..4c461dd30f 100644 --- a/test/built-ins/Array/prototype/filter/create-species-abrupt.js +++ b/test/built-ins/Array/prototype/filter/create-species-abrupt.js @@ -26,7 +26,9 @@ var Ctor = function() { throw new Test262Error(); }; var callCount = 0; -var cb = function() { callCount += 1; }; +var cb = function() { + callCount += 1; +}; var a = []; a.constructor = {}; a.constructor[Symbol.species] = Ctor; diff --git a/test/built-ins/Array/prototype/filter/create-species-non-ctor.js b/test/built-ins/Array/prototype/filter/create-species-non-ctor.js index cf5fba2ce8..890bf4d521 100644 --- a/test/built-ins/Array/prototype/filter/create-species-non-ctor.js +++ b/test/built-ins/Array/prototype/filter/create-species-non-ctor.js @@ -25,7 +25,9 @@ features: [Symbol.species] var a = []; var callCount = 0; -var cb = function() { callCount += 1; }; +var cb = function() { + callCount += 1; +}; a.constructor = {}; a.constructor[Symbol.species] = parseInt; diff --git a/test/built-ins/Array/prototype/filter/create-species-poisoned.js b/test/built-ins/Array/prototype/filter/create-species-poisoned.js index 9edd338af7..947e8f8701 100644 --- a/test/built-ins/Array/prototype/filter/create-species-poisoned.js +++ b/test/built-ins/Array/prototype/filter/create-species-poisoned.js @@ -21,7 +21,9 @@ features: [Symbol.species] var a = []; var callCount = 0; -var cb = function() { callCount += 1; }; +var cb = function() { + callCount += 1; +}; a.constructor = {}; Object.defineProperty(a.constructor, Symbol.species, { diff --git a/test/built-ins/Array/prototype/find/return-found-value-predicate-result-is-true.js b/test/built-ins/Array/prototype/find/return-found-value-predicate-result-is-true.js index 073201a279..16afbdf352 100644 --- a/test/built-ins/Array/prototype/find/return-found-value-predicate-result-is-true.js +++ b/test/built-ins/Array/prototype/find/return-found-value-predicate-result-is-true.js @@ -38,17 +38,27 @@ result = arr.find(function(val) { assert.sameValue(called, 3, 'predicate was called three times'); assert.sameValue(result, 'Bike'); -result = arr.find(function(val) { return 'string'; }); +result = arr.find(function(val) { + return 'string'; +}); assert.sameValue(result, 'Shoes', 'coerced string'); -result = arr.find(function(val) { return {}; }); +result = arr.find(function(val) { + return {}; +}); assert.sameValue(result, 'Shoes', 'coerced object'); -result = arr.find(function(val) { return Symbol(''); }); +result = arr.find(function(val) { + return Symbol(''); +}); assert.sameValue(result, 'Shoes', 'coerced Symbol'); -result = arr.find(function(val) { return 1; }); +result = arr.find(function(val) { + return 1; +}); assert.sameValue(result, 'Shoes', 'coerced number'); -result = arr.find(function(val) { return -1; }); +result = arr.find(function(val) { + return -1; +}); assert.sameValue(result, 'Shoes', 'coerced negative number'); diff --git a/test/built-ins/Array/prototype/find/return-undefined-if-predicate-returns-false-value.js b/test/built-ins/Array/prototype/find/return-undefined-if-predicate-returns-false-value.js index 65d471bac1..0eb576508b 100644 --- a/test/built-ins/Array/prototype/find/return-undefined-if-predicate-returns-false-value.js +++ b/test/built-ins/Array/prototype/find/return-undefined-if-predicate-returns-false-value.js @@ -28,17 +28,27 @@ var result = arr.find(function(val) { assert.sameValue(called, 3, 'predicate was called three times'); assert.sameValue(result, undefined); -result = arr.find(function(val) { return ''; }); +result = arr.find(function(val) { + return ''; +}); assert.sameValue(result, undefined, 'coerced string'); -result = arr.find(function(val) { return undefined; }); +result = arr.find(function(val) { + return undefined; +}); assert.sameValue(result, undefined, 'coerced undefined'); -result = arr.find(function(val) { return null; }); +result = arr.find(function(val) { + return null; +}); assert.sameValue(result, undefined, 'coerced null'); -result = arr.find(function(val) { return 0; }); +result = arr.find(function(val) { + return 0; +}); assert.sameValue(result, undefined, 'coerced 0'); -result = arr.find(function(val) { return NaN; }); +result = arr.find(function(val) { + return NaN; +}); assert.sameValue(result, undefined, 'coerced NaN'); diff --git a/test/built-ins/Array/prototype/findIndex/return-index-predicate-result-is-true.js b/test/built-ins/Array/prototype/findIndex/return-index-predicate-result-is-true.js index f57d47aebc..bddf1e3e4c 100644 --- a/test/built-ins/Array/prototype/findIndex/return-index-predicate-result-is-true.js +++ b/test/built-ins/Array/prototype/findIndex/return-index-predicate-result-is-true.js @@ -38,17 +38,27 @@ result = arr.findIndex(function(val) { assert.sameValue(called, 3, 'predicate was called three times'); assert.sameValue(result, 2); -result = arr.findIndex(function(val) { return 'string'; }); +result = arr.findIndex(function(val) { + return 'string'; +}); assert.sameValue(result, 0, 'coerced string'); -result = arr.findIndex(function(val) { return {}; }); +result = arr.findIndex(function(val) { + return {}; +}); assert.sameValue(result, 0, 'coerced object'); -result = arr.findIndex(function(val) { return Symbol(''); }); +result = arr.findIndex(function(val) { + return Symbol(''); +}); assert.sameValue(result, 0, 'coerced Symbol'); -result = arr.findIndex(function(val) { return 1; }); +result = arr.findIndex(function(val) { + return 1; +}); assert.sameValue(result, 0, 'coerced number'); -result = arr.findIndex(function(val) { return -1; }); +result = arr.findIndex(function(val) { + return -1; +}); assert.sameValue(result, 0, 'coerced negative number'); diff --git a/test/built-ins/Array/prototype/findIndex/return-negative-one-if-predicate-returns-false-value.js b/test/built-ins/Array/prototype/findIndex/return-negative-one-if-predicate-returns-false-value.js index f5348ea596..b1e6eb76b7 100644 --- a/test/built-ins/Array/prototype/findIndex/return-negative-one-if-predicate-returns-false-value.js +++ b/test/built-ins/Array/prototype/findIndex/return-negative-one-if-predicate-returns-false-value.js @@ -28,17 +28,27 @@ var result = arr.findIndex(function(val) { assert.sameValue(called, 3, 'predicate was called three times'); assert.sameValue(result, -1); -result = arr.findIndex(function(val) { return ''; }); +result = arr.findIndex(function(val) { + return ''; +}); assert.sameValue(result, -1, 'coerced string'); -result = arr.findIndex(function(val) { return undefined; }); +result = arr.findIndex(function(val) { + return undefined; +}); assert.sameValue(result, -1, 'coerced undefined'); -result = arr.findIndex(function(val) { return null; }); +result = arr.findIndex(function(val) { + return null; +}); assert.sameValue(result, -1, 'coerced null'); -result = arr.findIndex(function(val) { return 0; }); +result = arr.findIndex(function(val) { + return 0; +}); assert.sameValue(result, -1, 'coerced 0'); -result = arr.findIndex(function(val) { return NaN; }); +result = arr.findIndex(function(val) { + return NaN; +}); assert.sameValue(result, -1, 'coerced NaN'); diff --git a/test/built-ins/Array/prototype/flatMap/bound-function-argument.js b/test/built-ins/Array/prototype/flatMap/bound-function-argument.js index 95f5aeffe7..daa3141157 100644 --- a/test/built-ins/Array/prototype/flatMap/bound-function-argument.js +++ b/test/built-ins/Array/prototype/flatMap/bound-function-argument.js @@ -9,4 +9,6 @@ features: [Array.prototype.flatMap] ---*/ var a = [0, 0]; -assert.compareArray(a.flatMap(function(){ return this; }.bind([1, 2])), [1, 2, 1, 2]); +assert.compareArray(a.flatMap(function() { + return this; +}.bind([1, 2])), [1, 2, 1, 2]); diff --git a/test/built-ins/Array/prototype/flatMap/depth-always-one.js b/test/built-ins/Array/prototype/flatMap/depth-always-one.js index 851a9a7449..4f5f672b48 100644 --- a/test/built-ins/Array/prototype/flatMap/depth-always-one.js +++ b/test/built-ins/Array/prototype/flatMap/depth-always-one.js @@ -13,7 +13,9 @@ assert.compareArray([1, 2].flatMap(function(e) { }), [1, 2, 2, 4], 'array depth is 1'); var result = [1, 2, 3].flatMap(function(ele) { - return [[ele * 2]]; + return [ + [ele * 2] + ]; }); assert.sameValue(result.length, 3, 'array depth is more than 1 - length'); assert.compareArray(result[0], [2], 'array depth is more than 1 - 1st element'); diff --git a/test/built-ins/Array/prototype/flatMap/non-callable-argument-throws.js b/test/built-ins/Array/prototype/flatMap/non-callable-argument-throws.js index 6d47d02335..ab0f8ca86d 100644 --- a/test/built-ins/Array/prototype/flatMap/non-callable-argument-throws.js +++ b/test/built-ins/Array/prototype/flatMap/non-callable-argument-throws.js @@ -7,6 +7,6 @@ description: > features: [Array.prototype.flatMap] ---*/ -assert.throws(TypeError, function () { +assert.throws(TypeError, function() { [].flatMap({}); }, 'non callable argument'); diff --git a/test/built-ins/Array/prototype/flatMap/non-object-ctor-throws.js b/test/built-ins/Array/prototype/flatMap/non-object-ctor-throws.js index 21e44b6818..65767d2ce4 100644 --- a/test/built-ins/Array/prototype/flatMap/non-object-ctor-throws.js +++ b/test/built-ins/Array/prototype/flatMap/non-object-ctor-throws.js @@ -31,4 +31,3 @@ a.constructor = true; assert.throws(TypeError, function() { a.flatMap(); }, 'boolean value'); - diff --git a/test/built-ins/Array/prototype/flatMap/null-undefined-input-throws.js b/test/built-ins/Array/prototype/flatMap/null-undefined-input-throws.js index 5a4e966e25..dcfe81aaf4 100644 --- a/test/built-ins/Array/prototype/flatMap/null-undefined-input-throws.js +++ b/test/built-ins/Array/prototype/flatMap/null-undefined-input-throws.js @@ -18,4 +18,3 @@ assert.throws(TypeError, function() { assert.throws(TypeError, function() { [].flatMap.call(void 0); }, 'undefined'); - diff --git a/test/built-ins/Array/prototype/flatMap/thisArg-argument.js b/test/built-ins/Array/prototype/flatMap/thisArg-argument.js index 95b95ca7a3..34db60abdc 100644 --- a/test/built-ins/Array/prototype/flatMap/thisArg-argument.js +++ b/test/built-ins/Array/prototype/flatMap/thisArg-argument.js @@ -12,9 +12,21 @@ features: [Array.prototype.flatMap] var a = {}; -assert(compareArray([1].flatMap(function() { return [this]; }, "TestString"), ["TestString"])); -assert(compareArray([1].flatMap(function() { return [this]; }, 1), [1])); -assert(compareArray([1].flatMap(function() { return [this]; }, null), [null])); -assert(compareArray([1].flatMap(function() { return [this]; }, true), [true])); -assert(compareArray([1].flatMap(function() { return [this]; }, a), [a])); -assert(compareArray([1].flatMap(function() { return [this]; }, void 0), [undefined])); +assert(compareArray([1].flatMap(function() { + return [this]; +}, "TestString"), ["TestString"])); +assert(compareArray([1].flatMap(function() { + return [this]; +}, 1), [1])); +assert(compareArray([1].flatMap(function() { + return [this]; +}, null), [null])); +assert(compareArray([1].flatMap(function() { + return [this]; +}, true), [true])); +assert(compareArray([1].flatMap(function() { + return [this]; +}, a), [a])); +assert(compareArray([1].flatMap(function() { + return [this]; +}, void 0), [undefined])); diff --git a/test/built-ins/Array/prototype/flatten/bound-function-call.js b/test/built-ins/Array/prototype/flatten/bound-function-call.js index ce4153b87c..fd35f0975f 100644 --- a/test/built-ins/Array/prototype/flatten/bound-function-call.js +++ b/test/built-ins/Array/prototype/flatten/bound-function-call.js @@ -8,7 +8,10 @@ includes: [compareArray.js] features: [Array.prototype.flatten] ---*/ -var a = [[0],[1]]; +var a = [ + [0], + [1] +]; var actual = [].flatten.bind(a)(); assert.compareArray(actual, [0, 1], 'bound flatten'); diff --git a/test/built-ins/Array/prototype/flatten/empty-array-elements.js b/test/built-ins/Array/prototype/flatten/empty-array-elements.js index cbf2ae4b07..379b1e48cd 100644 --- a/test/built-ins/Array/prototype/flatten/empty-array-elements.js +++ b/test/built-ins/Array/prototype/flatten/empty-array-elements.js @@ -10,6 +10,15 @@ features: [Array.prototype.flatten] var a = {}; assert.compareArray([].flatten(), []); -assert.compareArray([[], []].flatten(), []); -assert.compareArray([[], [1]].flatten(), [1]); -assert.compareArray([[], [1, a]].flatten(), [1, a]); +assert.compareArray([ + [], + [] +].flatten(), []); +assert.compareArray([ + [], + [1] +].flatten(), [1]); +assert.compareArray([ + [], + [1, a] +].flatten(), [1, a]); diff --git a/test/built-ins/Array/prototype/flatten/empty-object-elements.js b/test/built-ins/Array/prototype/flatten/empty-object-elements.js index 356cab6606..e1fcb18d31 100644 --- a/test/built-ins/Array/prototype/flatten/empty-object-elements.js +++ b/test/built-ins/Array/prototype/flatten/empty-object-elements.js @@ -8,9 +8,15 @@ includes: [compareArray.js] features: [Array.prototype.flatten] ---*/ -var a = {}, b = {}; +var a = {}, + b = {}; assert.compareArray([a].flatten(), [a]); assert.compareArray([a, [b]].flatten(), [a, b]); -assert.compareArray([[a], b].flatten(), [a, b]); -assert.compareArray([[a], [b]].flatten(), [a, b]); +assert.compareArray([ + [a], b +].flatten(), [a, b]); +assert.compareArray([ + [a], + [b] +].flatten(), [a, b]); diff --git a/test/built-ins/Array/prototype/flatten/name.js b/test/built-ins/Array/prototype/flatten/name.js index 365c7e11ce..6d89ae6b7d 100644 --- a/test/built-ins/Array/prototype/flatten/name.js +++ b/test/built-ins/Array/prototype/flatten/name.js @@ -18,4 +18,3 @@ assert.sameValue( verifyNotEnumerable(Array.prototype.flatten, 'name'); verifyNotWritable(Array.prototype.flatten, 'name'); verifyConfigurable(Array.prototype.flatten, 'name'); - diff --git a/test/built-ins/Array/prototype/flatten/null-undefined-elements.js b/test/built-ins/Array/prototype/flatten/null-undefined-elements.js index ef8fb3a532..8211fdcc28 100644 --- a/test/built-ins/Array/prototype/flatten/null-undefined-elements.js +++ b/test/built-ins/Array/prototype/flatten/null-undefined-elements.js @@ -11,7 +11,10 @@ features: [Array.prototype.flatten] var a = [void 0]; assert(compareArray([1, null, void 0].flatten(), [1, null, undefined])); -assert(compareArray([1,[null, void 0]].flatten(), [1, null, undefined])); -assert(compareArray([[null, void 0], [null, void 0]].flatten(), [null, undefined, null, undefined])); -assert(compareArray([1,[null, a]].flatten(1), [1, null, a])); -assert(compareArray([1,[null, a]].flatten(2), [1, null, undefined])); +assert(compareArray([1, [null, void 0]].flatten(), [1, null, undefined])); +assert(compareArray([ + [null, void 0], + [null, void 0] +].flatten(), [null, undefined, null, undefined])); +assert(compareArray([1, [null, a]].flatten(1), [1, null, a])); +assert(compareArray([1, [null, a]].flatten(2), [1, null, undefined])); diff --git a/test/built-ins/Array/prototype/flatten/null-undefined-input-throws.js b/test/built-ins/Array/prototype/flatten/null-undefined-input-throws.js index 3e711223f7..d3a5a59adc 100644 --- a/test/built-ins/Array/prototype/flatten/null-undefined-input-throws.js +++ b/test/built-ins/Array/prototype/flatten/null-undefined-input-throws.js @@ -18,4 +18,3 @@ assert.throws(TypeError, function() { assert.throws(TypeError, function() { [].flatten.call(void 0); }, 'undefined'); - diff --git a/test/built-ins/Array/prototype/flatten/symbol-object-create-null-depth-throws.js b/test/built-ins/Array/prototype/flatten/symbol-object-create-null-depth-throws.js index 9bcf98ae0c..af58ce6b7d 100644 --- a/test/built-ins/Array/prototype/flatten/symbol-object-create-null-depth-throws.js +++ b/test/built-ins/Array/prototype/flatten/symbol-object-create-null-depth-throws.js @@ -14,4 +14,3 @@ assert.throws(TypeError, function() { assert.throws(TypeError, function() { [].flatten(Object.create(null)); }, 'object create null'); - diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-1.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-1.js index 1f7f8df82d..8e8bb70036 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-1.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-1.js @@ -9,5 +9,5 @@ description: Array.prototype.forEach applied to undefined assert.throws(TypeError, function() { - Array.prototype.forEach.call(undefined); // TypeError is thrown if value is undefined + Array.prototype.forEach.call(undefined); // TypeError is thrown if value is undefined }); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-10.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-10.js index e751161d6a..7ba92b9737 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-10.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-10.js @@ -7,14 +7,14 @@ es5id: 15.4.4.18-1-10 description: Array.prototype.forEach applied to the Math object ---*/ - var result = false; +var result = false; - function callbackfn(val, idx, obj) { - result = ('[object Math]' === Object.prototype.toString.call(obj)); - } +function callbackfn(val, idx, obj) { + result = ('[object Math]' === Object.prototype.toString.call(obj)); +} - Math.length = 1; - Math[0] = 1; - Array.prototype.forEach.call(Math, callbackfn); +Math.length = 1; +Math[0] = 1; +Array.prototype.forEach.call(Math, callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-11.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-11.js index 2ec98784d2..8d30c99dae 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-11.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-11.js @@ -7,15 +7,16 @@ es5id: 15.4.4.18-1-11 description: Array.prototype.forEach applied to Date object ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = obj instanceof Date; - } +var result = false; - var obj = new Date(); - obj.length = 1; - obj[0] = 1; +function callbackfn(val, idx, obj) { + result = obj instanceof Date; +} - Array.prototype.forEach.call(obj, callbackfn); +var obj = new Date(); +obj.length = 1; +obj[0] = 1; + +Array.prototype.forEach.call(obj, callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-12.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-12.js index 5e54175c65..c360a87716 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-12.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-12.js @@ -7,15 +7,16 @@ es5id: 15.4.4.18-1-12 description: Array.prototype.forEach applied to RegExp object ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = obj instanceof RegExp; - } +var result = false; - var obj = new RegExp(); - obj.length = 1; - obj[0] = 1; +function callbackfn(val, idx, obj) { + result = obj instanceof RegExp; +} - Array.prototype.forEach.call(obj, callbackfn); +var obj = new RegExp(); +obj.length = 1; +obj[0] = 1; + +Array.prototype.forEach.call(obj, callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-13.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-13.js index 70fc436293..9759f019af 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-13.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-13.js @@ -7,13 +7,14 @@ es5id: 15.4.4.18-1-13 description: Array.prototype.forEach applied to the JSON object ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = ('[object JSON]' === Object.prototype.toString.call(obj)); - } +var result = false; - JSON.length = 1; - JSON[0] = 1; - Array.prototype.forEach.call(JSON, callbackfn); +function callbackfn(val, idx, obj) { + result = ('[object JSON]' === Object.prototype.toString.call(obj)); +} + +JSON.length = 1; +JSON[0] = 1; +Array.prototype.forEach.call(JSON, callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-14.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-14.js index b7a59755a5..e6c5caa104 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-14.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-14.js @@ -7,15 +7,16 @@ es5id: 15.4.4.18-1-14 description: Array.prototype.forEach applied to Error object ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = obj instanceof Error; - } +var result = false; - var obj = new Error(); - obj.length = 1; - obj[0] = 1; +function callbackfn(val, idx, obj) { + result = obj instanceof Error; +} - Array.prototype.forEach.call(obj, callbackfn); +var obj = new Error(); +obj.length = 1; +obj[0] = 1; + +Array.prototype.forEach.call(obj, callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-15.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-15.js index 6b9762524b..2ea3f1e44f 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-15.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-15.js @@ -7,15 +7,16 @@ es5id: 15.4.4.18-1-15 description: Array.prototype.forEach applied to the Arguments object ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = ('[object Arguments]' === Object.prototype.toString.call(obj)); - } +var result = false; - var obj = (function () { - return arguments; - }("a", "b")); +function callbackfn(val, idx, obj) { + result = ('[object Arguments]' === Object.prototype.toString.call(obj)); +} - Array.prototype.forEach.call(obj, callbackfn); +var obj = (function() { + return arguments; +}("a", "b")); + +Array.prototype.forEach.call(obj, callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-2.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-2.js index 49ee29fb40..bce24cc3fc 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-2.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-2.js @@ -9,5 +9,5 @@ description: Array.prototype.forEach applied to null assert.throws(TypeError, function() { - Array.prototype.forEach.call(null); // TypeError is thrown if value is null + Array.prototype.forEach.call(null); // TypeError is thrown if value is null }); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-3.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-3.js index fde0360220..6434a1a5d5 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-3.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-3.js @@ -7,15 +7,15 @@ es5id: 15.4.4.18-1-3 description: Array.prototype.forEach applied to boolean primitive ---*/ - var result = false; +var result = false; - function callbackfn(val, idx, obj) { - result = obj instanceof Boolean; - } +function callbackfn(val, idx, obj) { + result = obj instanceof Boolean; +} - Boolean.prototype[0] = true; - Boolean.prototype.length = 1; +Boolean.prototype[0] = true; +Boolean.prototype.length = 1; - Array.prototype.forEach.call(false, callbackfn); +Array.prototype.forEach.call(false, callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-4.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-4.js index 899d60a7da..87304f79b4 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-4.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-4.js @@ -7,16 +7,17 @@ es5id: 15.4.4.18-1-4 description: Array.prototype.forEach applied to Boolean object ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = obj instanceof Boolean; - } +var result = false; - var obj = new Boolean(true); - obj.length = 2; - obj[0] = 11; - obj[1] = 12; +function callbackfn(val, idx, obj) { + result = obj instanceof Boolean; +} - Array.prototype.forEach.call(obj, callbackfn); +var obj = new Boolean(true); +obj.length = 2; +obj[0] = 11; +obj[1] = 12; + +Array.prototype.forEach.call(obj, callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-5.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-5.js index dbfdba7f9b..7afae81ba9 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-5.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-5.js @@ -7,14 +7,15 @@ es5id: 15.4.4.18-1-5 description: Array.prototype.forEach applied to number primitive ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = obj instanceof Number; - } +var result = false; - Number.prototype[0] = 1; - Number.prototype.length = 1; +function callbackfn(val, idx, obj) { + result = obj instanceof Number; +} - Array.prototype.forEach.call(2.5, callbackfn); +Number.prototype[0] = 1; +Number.prototype.length = 1; + +Array.prototype.forEach.call(2.5, callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-6.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-6.js index a4417baced..8e33905dfb 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-6.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-6.js @@ -7,16 +7,17 @@ es5id: 15.4.4.18-1-6 description: Array.prototype.forEach applied to Number object ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = obj instanceof Number; - } +var result = false; - var obj = new Number(-128); - obj.length = 2; - obj[0] = 11; - obj[1] = 12; +function callbackfn(val, idx, obj) { + result = obj instanceof Number; +} - Array.prototype.forEach.call(obj, callbackfn); +var obj = new Number(-128); +obj.length = 2; +obj[0] = 11; +obj[1] = 12; + +Array.prototype.forEach.call(obj, callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-7.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-7.js index c85736e356..7160b1c048 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-7.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-7.js @@ -7,11 +7,12 @@ es5id: 15.4.4.18-1-7 description: Array.prototype.forEach applied to string primitive ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = obj instanceof String; - } +var result = false; - Array.prototype.forEach.call("abc", callbackfn); +function callbackfn(val, idx, obj) { + result = obj instanceof String; +} + +Array.prototype.forEach.call("abc", callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-8.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-8.js index 6aa6ade201..3f2027f772 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-8.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-8.js @@ -7,12 +7,13 @@ es5id: 15.4.4.18-1-8 description: Array.prototype.forEach applied to String object ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = obj instanceof String; - } +var result = false; - var obj = new String("abc"); - Array.prototype.forEach.call(obj, callbackfn); +function callbackfn(val, idx, obj) { + result = obj instanceof String; +} + +var obj = new String("abc"); +Array.prototype.forEach.call(obj, callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-9.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-9.js index 24024487f4..38cd914432 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-9.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-9.js @@ -7,17 +7,18 @@ es5id: 15.4.4.18-1-9 description: Array.prototype.forEach applied to Function object ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = obj instanceof Function; - } +var result = false; - var obj = function (a, b) { - return a + b; - }; - obj[0] = 11; - obj[1] = 9; +function callbackfn(val, idx, obj) { + result = obj instanceof Function; +} - Array.prototype.forEach.call(obj, callbackfn); +var obj = function(a, b) { + return a + b; +}; +obj[0] = 11; +obj[1] = 9; + +Array.prototype.forEach.call(obj, callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-1.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-1.js index a8cacea2b3..f6d82711cd 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-1.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-1.js @@ -9,18 +9,19 @@ description: > Array-like object ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = (obj.length === 2); - } +var result = false; - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: 2 - }; +function callbackfn(val, idx, obj) { + result = (obj.length === 2); +} - Array.prototype.forEach.call(obj, callbackfn); +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: 2 +}; + +Array.prototype.forEach.call(obj, callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-10.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-10.js index b62dda53ca..a4b5e78bbe 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-10.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-10.js @@ -9,28 +9,29 @@ description: > an inherited accessor property ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = (obj.length === 2); - } +var result = false; - var proto = {}; +function callbackfn(val, idx, obj) { + result = (obj.length === 2); +} - Object.defineProperty(proto, "length", { - get: function () { - return 2; - }, - configurable: true - }); +var proto = {}; - var Con = function () { }; - Con.prototype = proto; +Object.defineProperty(proto, "length", { + get: function() { + return 2; + }, + configurable: true +}); - var child = new Con(); - child[0] = 12; - child[1] = 11; - child[2] = 9; +var Con = function() {}; +Con.prototype = proto; - Array.prototype.forEach.call(child, callbackfn); +var child = new Con(); +child[0] = 12; +child[1] = 11; +child[2] = 9; + +Array.prototype.forEach.call(child, callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-11.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-11.js index c28736d458..e9e36719e2 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-11.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-11.js @@ -9,20 +9,21 @@ description: > an own accessor property without a get function ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - } +var accessed = false; - var obj = { - 0: 11, - 1: 12 - }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); +function callbackfn(val, idx, obj) { + accessed = true; +} - Array.prototype.forEach.call(obj, callbackfn); +var obj = { + 0: 11, + 1: 12 +}; +Object.defineProperty(obj, "length", { + set: function() {}, + configurable: true +}); + +Array.prototype.forEach.call(obj, callbackfn); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-12.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-12.js index c8649b3354..6bb1b8f12a 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-12.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-12.js @@ -10,24 +10,28 @@ description: > property on an Array ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - } +var accessed = false; - Object.defineProperty(Object.prototype, "length", { - get: function () { - return 2; - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + accessed = true; +} - var obj = { 0: 12, 1: 11 }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); +Object.defineProperty(Object.prototype, "length", { + get: function() { + return 2; + }, + configurable: true +}); - Array.prototype.forEach.call(obj, callbackfn); +var obj = { + 0: 12, + 1: 11 +}; +Object.defineProperty(obj, "length", { + set: function() {}, + configurable: true +}); + +Array.prototype.forEach.call(obj, callbackfn); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-13.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-13.js index 200cd401c4..9dac1f4a26 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-13.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-13.js @@ -9,25 +9,25 @@ description: > 'length' is inherited accessor property without a get function ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - } +function callbackfn(val, idx, obj) { + accessed = true; +} - var proto = {}; - Object.defineProperty(proto, "length", { - set: function () { }, - configurable: true - }); +var proto = {}; +Object.defineProperty(proto, "length", { + set: function() {}, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[0] = 11; - child[1] = 12; +var child = new Con(); +child[0] = 11; +child[1] = 12; - Array.prototype.forEach.call(child, callbackfn); +Array.prototype.forEach.call(child, callbackfn); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-14.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-14.js index a78c2fbdc8..297cdf482c 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-14.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-14.js @@ -9,14 +9,17 @@ description: > 'length' property doesn't exist ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - } +function callbackfn(val, idx, obj) { + accessed = true; +} - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-17.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-17.js index 57e36efaa4..9f2cd87c73 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-17.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-17.js @@ -9,15 +9,16 @@ description: > implements its own property get method ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = (obj.length === 2); - } +var result = false; - var func = function (a, b) { - arguments[2] = 9; - Array.prototype.forEach.call(arguments, callbackfn); - return result; - }; +function callbackfn(val, idx, obj) { + result = (obj.length === 2); +} + +var func = function(a, b) { + arguments[2] = 9; + Array.prototype.forEach.call(arguments, callbackfn); + return result; +}; assert(func(12, 11), 'func(12, 11) !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-18.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-18.js index 8089c68368..717904329a 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-18.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-18.js @@ -9,13 +9,14 @@ description: > its own property get method ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = (obj.length === 3); - } +var result = false; - var str = new String("012"); +function callbackfn(val, idx, obj) { + result = (obj.length === 3); +} - Array.prototype.forEach.call(str, callbackfn); +var str = new String("012"); + +Array.prototype.forEach.call(str, callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-19.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-19.js index da202f1588..200ad5818c 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-19.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-19.js @@ -9,18 +9,19 @@ description: > implements its own property get method ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = (obj.length === 2); - } +var result = false; - var fun = function (a, b) { - return a + b; - }; - fun[0] = 12; - fun[1] = 11; - fun[2] = 9; +function callbackfn(val, idx, obj) { + result = (obj.length === 2); +} - Array.prototype.forEach.call(fun, callbackfn); +var fun = function(a, b) { + return a + b; +}; +fun[0] = 12; +fun[1] = 11; +fun[2] = 9; + +Array.prototype.forEach.call(fun, callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-2.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-2.js index 1f3da7255d..4f3c8f8c3b 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-2.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-2.js @@ -7,11 +7,12 @@ es5id: 15.4.4.18-2-2 description: Array.prototype.forEach - 'length' is own data property on an Array ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = (obj.length === 2); - } +var result = false; - [12, 11].forEach(callbackfn); +function callbackfn(val, idx, obj) { + result = (obj.length === 2); +} + +[12, 11].forEach(callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-3.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-3.js index 3a70a3fa13..05c761a4f4 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-3.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-3.js @@ -9,22 +9,25 @@ description: > overrides an inherited data property on an Array-like object ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = (obj.length === 2); - } +var result = false; - var proto = { length: 3 }; +function callbackfn(val, idx, obj) { + result = (obj.length === 2); +} - var Con = function () { }; - Con.prototype = proto; +var proto = { + length: 3 +}; - var child = new Con(); - child.length = 2; - child[0] = 12; - child[1] = 11; - child[2] = 9; +var Con = function() {}; +Con.prototype = proto; - Array.prototype.forEach.call(child, callbackfn); +var child = new Con(); +child.length = 2; +child[0] = 12; +child[1] = 11; +child[2] = 9; + +Array.prototype.forEach.call(child, callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-4.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-4.js index 4a5be14258..9d52243339 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-4.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-4.js @@ -9,14 +9,15 @@ description: > overrides an inherited data property on an Array ---*/ - var result = false; - var arrProtoLen; - function callbackfn(val, idx, obj) { - result = (obj.length === 2); - } +var result = false; +var arrProtoLen; - arrProtoLen = Array.prototype.length; - Array.prototype.length = 0; - [12, 11].forEach(callbackfn); +function callbackfn(val, idx, obj) { + result = (obj.length === 2); +} + +arrProtoLen = Array.prototype.length; +Array.prototype.length = 0; +[12, 11].forEach(callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-5.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-5.js index c261643e5a..21fd3b12c9 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-5.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-5.js @@ -9,32 +9,33 @@ description: > an own data property that overrides an inherited accessor property ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = (obj.length === 2); - } +var result = false; - var proto = {}; +function callbackfn(val, idx, obj) { + result = (obj.length === 2); +} - Object.defineProperty(proto, "length", { - get: function () { - return 3; - }, - configurable: true - }); +var proto = {}; - var Con = function () { }; - Con.prototype = proto; +Object.defineProperty(proto, "length", { + get: function() { + return 3; + }, + configurable: true +}); - var child = new Con(); - Object.defineProperty(child, "length", { - value: 2, - configurable: true - }); - child[0] = 12; - child[1] = 11; - child[2] = 9; +var Con = function() {}; +Con.prototype = proto; - Array.prototype.forEach.call(child, callbackfn); +var child = new Con(); +Object.defineProperty(child, "length", { + value: 2, + configurable: true +}); +child[0] = 12; +child[1] = 11; +child[2] = 9; + +Array.prototype.forEach.call(child, callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-6.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-6.js index e0ee2a2ed4..23627c89aa 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-6.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-6.js @@ -9,21 +9,24 @@ description: > an inherited data property ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = (obj.length === 2); - } +var result = false; - var proto = { length: 2 }; +function callbackfn(val, idx, obj) { + result = (obj.length === 2); +} - var Con = function () { }; - Con.prototype = proto; +var proto = { + length: 2 +}; - var child = new Con(); - child[0] = 12; - child[1] = 11; - child[2] = 9; +var Con = function() {}; +Con.prototype = proto; - Array.prototype.forEach.call(child, callbackfn); +var child = new Con(); +child[0] = 12; +child[1] = 11; +child[2] = 9; + +Array.prototype.forEach.call(child, callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-7.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-7.js index e1fc969f4a..2fb7ebdc3b 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-7.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-7.js @@ -9,24 +9,25 @@ description: > an own accessor property ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = (obj.length === 2); - } +var result = false; - var obj = {}; +function callbackfn(val, idx, obj) { + result = (obj.length === 2); +} - Object.defineProperty(obj, "length", { - get: function () { - return 2; - }, - configurable: true - }); +var obj = {}; - obj[0] = 12; - obj[1] = 11; - obj[2] = 9; +Object.defineProperty(obj, "length", { + get: function() { + return 2; + }, + configurable: true +}); - Array.prototype.forEach.call(obj, callbackfn); +obj[0] = 12; +obj[1] = 11; +obj[2] = 9; + +Array.prototype.forEach.call(obj, callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-8.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-8.js index e1da522823..ee2588cd25 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-8.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-8.js @@ -9,29 +9,32 @@ description: > an own accessor property that overrides an inherited data property ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = (obj.length === 2); - } +var result = false; - var proto = { length: 3 }; +function callbackfn(val, idx, obj) { + result = (obj.length === 2); +} - var Con = function () { }; - Con.prototype = proto; +var proto = { + length: 3 +}; - var child = new Con(); +var Con = function() {}; +Con.prototype = proto; - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); +var child = new Con(); - child[0] = 12; - child[1] = 11; - child[2] = 9; +Object.defineProperty(child, "length", { + get: function() { + return 2; + }, + configurable: true +}); - Array.prototype.forEach.call(child, callbackfn); +child[0] = 12; +child[1] = 11; +child[2] = 9; + +Array.prototype.forEach.call(child, callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-9.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-9.js index 0b8017b05a..98f6075958 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-9.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-9.js @@ -10,36 +10,37 @@ description: > property ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = (obj.length === 2); - } +var result = false; - var proto = {}; +function callbackfn(val, idx, obj) { + result = (obj.length === 2); +} - Object.defineProperty(proto, "length", { - get: function () { - return 3; - }, - configurable: true - }); +var proto = {}; - var Con = function () { }; - Con.prototype = proto; +Object.defineProperty(proto, "length", { + get: function() { + return 3; + }, + configurable: true +}); - var child = new Con(); +var Con = function() {}; +Con.prototype = proto; - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); +var child = new Con(); - child[0] = 12; - child[1] = 11; - child[2] = 9; +Object.defineProperty(child, "length", { + get: function() { + return 2; + }, + configurable: true +}); - Array.prototype.forEach.call(child, callbackfn); +child[0] = 12; +child[1] = 11; +child[2] = 9; + +Array.prototype.forEach.call(child, callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-1.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-1.js index 29126acb2b..61853f5cad 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-1.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-1.js @@ -7,14 +7,18 @@ es5id: 15.4.4.18-3-1 description: Array.prototype.forEach - value of 'length' is undefined ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - } +function callbackfn(val, idx, obj) { + accessed = true; +} - var obj = { 0: 0, 1: 1, length: undefined }; +var obj = { + 0: 0, + 1: 1, + length: undefined +}; - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-10.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-10.js index 1b5fdbcfc3..b82073f6a8 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-10.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-10.js @@ -9,14 +9,17 @@ description: > NaN) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - } +function callbackfn(val, idx, obj) { + accessed = true; +} - var obj = { 0: 9, length: NaN }; +var obj = { + 0: 9, + length: NaN +}; - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-11.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-11.js index 5244023de7..cc8e8892cf 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-11.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-11.js @@ -9,14 +9,18 @@ description: > positive number ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } +function callbackfn(val, idx, obj) { + testResult = (val > 10); +} - var obj = { 1: 11, 2: 9, length: "2" }; +var obj = { + 1: 11, + 2: 9, + length: "2" +}; - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-12.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-12.js index f50bbdc552..f08f896a2a 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-12.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-12.js @@ -9,14 +9,18 @@ description: > negative number ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } +function callbackfn(val, idx, obj) { + testResult = (val > 10); +} - var obj = { 1: 11, 2: 9, length: "-4294967294" }; +var obj = { + 1: 11, + 2: 9, + length: "-4294967294" +}; - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert.sameValue(testResult, false, 'testResult'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-13.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-13.js index 80e34f7168..a5816b0ce3 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-13.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-13.js @@ -9,13 +9,17 @@ description: > decimal number ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } - var obj = { 1: 11, 2: 9, length: "2.5" }; +function callbackfn(val, idx, obj) { + testResult = (val > 10); +} +var obj = { + 1: 11, + 2: 9, + length: "2.5" +}; - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-14.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-14.js index 482c69d42c..a3583896a2 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-14.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-14.js @@ -7,14 +7,17 @@ es5id: 15.4.4.18-3-14 description: Array.prototype.forEach - 'length' is a string containing -Infinity ---*/ - var accessed2 = false; +var accessed2 = false; - function callbackfn2(val, idx, obj) { - accessed2 = true; - } +function callbackfn2(val, idx, obj) { + accessed2 = true; +} - var obj2 = { 0: 9, length: "-Infinity" }; +var obj2 = { + 0: 9, + length: "-Infinity" +}; - Array.prototype.forEach.call(obj2, callbackfn2); +Array.prototype.forEach.call(obj2, callbackfn2); assert.sameValue(accessed2, false, 'accessed2'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-15.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-15.js index 09b71e3916..2fb4ad6e90 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-15.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-15.js @@ -9,14 +9,18 @@ description: > exponential number ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } +function callbackfn(val, idx, obj) { + testResult = (val > 10); +} - var obj = { 1: 11, 2: 9, length: "2E0" }; +var obj = { + 1: 11, + 2: 9, + length: "2E0" +}; - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-16.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-16.js index e6f77c16a7..4395836822 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-16.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-16.js @@ -9,14 +9,18 @@ description: > number ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } +function callbackfn(val, idx, obj) { + testResult = (val > 10); +} - var obj = { 1: 11, 2: 9, length: "0x0002" }; +var obj = { + 1: 11, + 2: 9, + length: "0x0002" +}; - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-17.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-17.js index e8ca4bd505..acf6a235dd 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-17.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-17.js @@ -9,14 +9,18 @@ description: > with leading zeros ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } +function callbackfn(val, idx, obj) { + testResult = (val > 10); +} - var obj = { 1: 11, 2: 9, length: "0002.00" }; +var obj = { + 1: 11, + 2: 9, + length: "0002.00" +}; - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-18.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-18.js index 7b47f80baf..070a95aa45 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-18.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-18.js @@ -9,14 +9,17 @@ description: > convert to a number ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - } +function callbackfn(val, idx, obj) { + accessed = true; +} - var obj = { 0: 9, length: "asdf!_" }; +var obj = { + 0: 9, + length: "asdf!_" +}; - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-19.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-19.js index 953f8ef8b7..1c162f9f26 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-19.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-19.js @@ -9,22 +9,22 @@ description: > an own toString method. ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } +function callbackfn(val, idx, obj) { + testResult = (val > 10); +} - var obj = { - 1: 11, - 2: 9, - length: { - toString: function () { - return '2'; - } - } - }; +var obj = { + 1: 11, + 2: 9, + length: { + toString: function() { + return '2'; + } + } +}; - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-2.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-2.js index 03e951271e..5dfb9e7827 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-2.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-2.js @@ -9,13 +9,18 @@ description: > true) ---*/ - var testResult = false; - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } +var testResult = false; - var obj = { 0: 11, 1: 9, length: true }; +function callbackfn(val, idx, obj) { + testResult = (val > 10); +} - Array.prototype.forEach.call(obj, callbackfn); +var obj = { + 0: 11, + 1: 9, + length: true +}; + +Array.prototype.forEach.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-20.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-20.js index 6a1fed4790..64304dc3fa 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-20.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-20.js @@ -9,22 +9,22 @@ description: > an own valueOf method. ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } +function callbackfn(val, idx, obj) { + testResult = (val > 10); +} - var obj = { - 1: 11, - 2: 9, - length: { - valueOf: function () { - return 2; - } - } - }; +var obj = { + 1: 11, + 2: 9, + length: { + valueOf: function() { + return 2; + } + } +}; - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-21.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-21.js index e2be7cdb69..94681a1400 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-21.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-21.js @@ -10,30 +10,30 @@ description: > returns a string ---*/ - var testResult = false; - var firstStepOccured = false; - var secondStepOccured = false; +var testResult = false; +var firstStepOccured = false; +var secondStepOccured = false; - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } +function callbackfn(val, idx, obj) { + testResult = (val > 10); +} - var obj = { - 1: 11, - 2: 9, - length: { - valueOf: function () { - firstStepOccured = true; - return {}; - }, - toString: function () { - secondStepOccured = true; - return '2'; - } - } - }; +var obj = { + 1: 11, + 2: 9, + length: { + valueOf: function() { + firstStepOccured = true; + return {}; + }, + toString: function() { + secondStepOccured = true; + return '2'; + } + } +}; - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert(testResult, 'testResult !== true'); assert(firstStepOccured, 'firstStepOccured !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-22.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-22.js index 6298b50ef1..1dada06504 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-22.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-22.js @@ -10,30 +10,30 @@ description: > primitive values ---*/ - var accessed = false; - var firstStepOccured = false; - var secondStepOccured = false; +var accessed = false; +var firstStepOccured = false; +var secondStepOccured = false; - function callbackfn(val, idx, obj) { - accessed = true; - } +function callbackfn(val, idx, obj) { + accessed = true; +} - var obj = { - 1: 11, - 2: 12, +var obj = { + 1: 11, + 2: 12, - length: { - valueOf: function () { - firstStepOccured = true; - return {}; - }, - toString: function () { - secondStepOccured = true; - return {}; - } - } - }; + length: { + valueOf: function() { + firstStepOccured = true; + return {}; + }, + toString: function() { + secondStepOccured = true; + return {}; + } + } +}; assert.throws(TypeError, function() { - Array.prototype.forEach.call(obj, callbackfn); + Array.prototype.forEach.call(obj, callbackfn); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-23.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-23.js index cf7cb7b30d..d8cc31d6cc 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-23.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-23.js @@ -10,38 +10,38 @@ description: > methods ---*/ - var testResult = false; - var valueOfAccessed = false; - var toStringAccessed = false; +var testResult = false; +var valueOfAccessed = false; +var toStringAccessed = false; - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } +function callbackfn(val, idx, obj) { + testResult = (val > 10); +} - var proto = { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - }; +var proto = { + valueOf: function() { + valueOfAccessed = true; + return 2; + } +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); +var child = new Con(); - child.toString = function () { - toStringAccessed = true; - return '1'; - }; +child.toString = function() { + toStringAccessed = true; + return '1'; +}; - var obj = { - 1: 11, - 2: 9, - length: child - }; +var obj = { + 1: 11, + 2: 9, + length: child +}; - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert(testResult, 'testResult !== true'); assert(valueOfAccessed, 'valueOfAccessed !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-24.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-24.js index 770f80e021..fb2da44e17 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-24.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-24.js @@ -9,18 +9,18 @@ description: > non-integer, ensure truncation occurs in the proper direction ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } +function callbackfn(val, idx, obj) { + testResult = (val > 10); +} - var obj = { - 1: 11, - 2: 9, - length: 2.685 - }; +var obj = { + 1: 11, + 2: 9, + length: 2.685 +}; - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-25.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-25.js index e855f28d66..c9e1809c7b 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-25.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-25.js @@ -9,18 +9,18 @@ description: > non-integer ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } +function callbackfn(val, idx, obj) { + testResult = (val > 10); +} - var obj = { - 1: 11, - 2: 9, - length: -4294967294.5 - }; +var obj = { + 1: 11, + 2: 9, + length: -4294967294.5 +}; - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert.sameValue(testResult, false, 'testResult'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-3.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-3.js index a98ea61768..467960654c 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-3.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-3.js @@ -9,14 +9,18 @@ description: > 0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - } +function callbackfn(val, idx, obj) { + accessed = true; +} - var obj = { 0: 1, 1: 1, length: 0 }; +var obj = { + 0: 1, + 1: 1, + length: 0 +}; - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-4.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-4.js index dc457c42a6..1ac3e8c0b5 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-4.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-4.js @@ -9,14 +9,17 @@ description: > +0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - } +function callbackfn(val, idx, obj) { + accessed = true; +} - var obj = { 0: 11, length: +0 }; +var obj = { + 0: 11, + length: +0 +}; - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-5.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-5.js index 50348c00a6..d8caecc2e6 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-5.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-5.js @@ -9,14 +9,17 @@ description: > -0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - } +function callbackfn(val, idx, obj) { + accessed = true; +} - var obj = { 0: 11, length: -0 }; +var obj = { + 0: 11, + length: -0 +}; - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-6.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-6.js index 41701e6e57..1197b48160 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-6.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-6.js @@ -9,14 +9,18 @@ description: > positive) ---*/ - var testResult1 = false; +var testResult1 = false; - function callbackfn(val, idx, obj) { - testResult1 = (val > 10); - } +function callbackfn(val, idx, obj) { + testResult1 = (val > 10); +} - var obj = { 1: 11, 2: 9, length: 2 }; +var obj = { + 1: 11, + 2: 9, + length: 2 +}; - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert(testResult1, 'testResult1 !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-7.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-7.js index 05ffaedf48..f3b859b9b0 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-7.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-7.js @@ -9,14 +9,18 @@ description: > negative) ---*/ - var testResult1 = false; +var testResult1 = false; - function callbackfn(val, idx, obj) { - testResult1 = (val > 10); - } +function callbackfn(val, idx, obj) { + testResult1 = (val > 10); +} - var obj = { 1: 11, 2: 9, length: -4294967294 }; +var obj = { + 1: 11, + 2: 9, + length: -4294967294 +}; - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert.sameValue(testResult1, false, 'testResult1'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-9.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-9.js index 300fd705dd..3d3468809e 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-9.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-9.js @@ -9,14 +9,17 @@ description: > -Infinity) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - } +function callbackfn(val, idx, obj) { + accessed = true; +} - var obj = { 0: 9, length: -Infinity }; +var obj = { + 0: 9, + length: -Infinity +}; - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-1.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-1.js index 0c1e6e517c..81f4d15b65 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-1.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-1.js @@ -7,7 +7,7 @@ es5id: 15.4.4.18-4-1 description: Array.prototype.forEach throws TypeError if callbackfn is undefined ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.forEach(); + arr.forEach(); }); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-10.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-10.js index d9ef1c8081..0dad22c77c 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-10.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-10.js @@ -9,15 +9,18 @@ description: > was thrown by step 2 ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - Object.defineProperty(obj, "length", { - get: function () { - throw new Test262Error(); - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + throw new Test262Error(); + }, + configurable: true +}); assert.throws(Test262Error, function() { - Array.prototype.forEach.call(obj, undefined); + Array.prototype.forEach.call(obj, undefined); }); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-11.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-11.js index 2ae6d34613..0a9bca0128 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-11.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-11.js @@ -9,19 +9,22 @@ description: > was thrown by step 3 ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - throw new Test262Error(); - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + toString: function() { + throw new Test262Error(); + } + }; + }, + configurable: true +}); assert.throws(Test262Error, function() { - Array.prototype.forEach.call(obj, undefined); + Array.prototype.forEach.call(obj, undefined); }); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-12.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-12.js index 69581f68ec..8bc18df1e5 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-12.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-12.js @@ -7,11 +7,12 @@ es5id: 15.4.4.18-4-12 description: Array.prototype.forEach - 'callbackfn' is a function ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - } +var accessed = false; - [11, 9].forEach(callbackfn); +function callbackfn(val, idx, obj) { + accessed = true; +} + +[11, 9].forEach(callbackfn); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-15.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-15.js index 1d94ede8a9..09b8a247d7 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-15.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-15.js @@ -9,27 +9,29 @@ description: > as passing undefined for callbackfn ---*/ - var obj = { 10: 10 }; - var lengthAccessed = false; - var loopAccessed = false; +var obj = { + 10: 10 +}; +var lengthAccessed = false; +var loopAccessed = false; - Object.defineProperty(obj, "length", { - get: function () { - lengthAccessed = true; - return 20; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + lengthAccessed = true; + return 20; + }, + configurable: true +}); - Object.defineProperty(obj, "0", { - get: function () { - loopAccessed = true; - return 10; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + loopAccessed = true; + return 10; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.forEach.call(obj); + Array.prototype.forEach.call(obj); }); assert(lengthAccessed, 'lengthAccessed !== true'); assert.sameValue(loopAccessed, false, 'loopAccessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-2.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-2.js index b3f465b797..a26b2ea39f 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-2.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-2.js @@ -9,7 +9,7 @@ description: > unreferenced ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(ReferenceError, function() { - arr.forEach(foo); + arr.forEach(foo); }); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-3.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-3.js index b048870333..81934e7ea4 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-3.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-3.js @@ -7,7 +7,7 @@ es5id: 15.4.4.18-4-3 description: Array.prototype.forEach throws TypeError if callbackfn is null ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.forEach(null); + arr.forEach(null); }); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-4.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-4.js index b9a1d89526..399cdbf5b4 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-4.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-4.js @@ -7,7 +7,7 @@ es5id: 15.4.4.18-4-4 description: Array.prototype.forEach throws TypeError if callbackfn is boolean ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.forEach(true); + arr.forEach(true); }); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-5.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-5.js index 1ffe8b0946..866d6fddaf 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-5.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-5.js @@ -7,7 +7,7 @@ es5id: 15.4.4.18-4-5 description: Array.prototype.forEach throws TypeError if callbackfn is number ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.forEach(5); + arr.forEach(5); }); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-6.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-6.js index 146bb7df2d..4cf36be987 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-6.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-6.js @@ -7,7 +7,7 @@ es5id: 15.4.4.18-4-6 description: Array.prototype.forEach throws TypeError if callbackfn is string ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.forEach("abc"); + arr.forEach("abc"); }); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-7.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-7.js index 93d142b9b6..3379dbe02e 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-7.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-7.js @@ -9,7 +9,7 @@ description: > without Call internal method ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.forEach(new Object()); + arr.forEach(new Object()); }); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-8.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-8.js index 9ea17000ac..09f9862fef 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-8.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-8.js @@ -9,18 +9,21 @@ description: > visible when an exception occurs ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - var accessed = false; +var accessed = false; - Object.defineProperty(obj, "length", { - get: function () { - accessed = true; - return 2; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + accessed = true; + return 2; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.forEach.call(obj, null); + Array.prototype.forEach.call(obj, null); }); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-9.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-9.js index 8600794ddf..75b0065b32 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-9.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-9.js @@ -9,22 +9,25 @@ description: > visible when an exception occurs ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - var accessed = false; +var accessed = false; - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - accessed = true; - return "2"; - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + toString: function() { + accessed = true; + return "2"; + } + }; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.forEach.call(obj, null); + Array.prototype.forEach.call(obj, null); }); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-1-s.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-1-s.js index 540b38d09d..c4b4c0df4c 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-1-s.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-1-s.js @@ -8,14 +8,14 @@ description: Array.prototype.forEach - thisArg not passed to strict callbackfn flags: [noStrict] ---*/ - var innerThisCorrect = false; +var innerThisCorrect = false; - function callbackfn(val, idx, obj) { - "use strict"; - innerThisCorrect = this===undefined; - return true; - } +function callbackfn(val, idx, obj) { + "use strict"; + innerThisCorrect = this === undefined; + return true; +} - [1].forEach(callbackfn); +[1].forEach(callbackfn); assert(innerThisCorrect, 'innerThisCorrect !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-1.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-1.js index ae937bd6ec..6dd49f78f1 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-1.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-1.js @@ -9,14 +9,15 @@ flags: [noStrict] ---*/ (function() { - this._15_4_4_18_5_1 = false; - var _15_4_4_18_5_1 = true; - var result; - function callbackfn(val, idx, obj) { - result = this._15_4_4_18_5_1; - } - var arr = [1]; - arr.forEach(callbackfn) + this._15_4_4_18_5_1 = false; + var _15_4_4_18_5_1 = true; + var result; -assert.sameValue(result, false, 'result'); + function callbackfn(val, idx, obj) { + result = this._15_4_4_18_5_1; + } + var arr = [1]; + arr.forEach(callbackfn) + + assert.sameValue(result, false, 'result'); })(); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-10.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-10.js index 914cfafaeb..771626914a 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-10.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-10.js @@ -7,13 +7,13 @@ es5id: 15.4.4.18-5-10 description: Array.prototype.forEach - Array Object can be used as thisArg ---*/ - var result = false; - var objArray = []; +var result = false; +var objArray = []; - function callbackfn(val, idx, obj) { - result = (this === objArray); - } +function callbackfn(val, idx, obj) { + result = (this === objArray); +} - [11].forEach(callbackfn, objArray); +[11].forEach(callbackfn, objArray); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-11.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-11.js index 0f0e203b37..9975fe11c9 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-11.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-11.js @@ -7,13 +7,13 @@ es5id: 15.4.4.18-5-11 description: Array.prototype.forEach - String Object can be used as thisArg ---*/ - var result = false; - var objString = new String(); +var result = false; +var objString = new String(); - function callbackfn(val, idx, obj) { - result = (this === objString); - } +function callbackfn(val, idx, obj) { + result = (this === objString); +} - [11].forEach(callbackfn, objString); +[11].forEach(callbackfn, objString); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-12.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-12.js index 76e1b95671..4aa627ea0c 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-12.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-12.js @@ -7,13 +7,13 @@ es5id: 15.4.4.18-5-12 description: Array.prototype.forEach - Boolean Object can be used as thisArg ---*/ - var result = false; - var objBoolean = new Boolean(); +var result = false; +var objBoolean = new Boolean(); - function callbackfn(val, idx, obj) { - result = (this === objBoolean); - } +function callbackfn(val, idx, obj) { + result = (this === objBoolean); +} - [11].forEach(callbackfn, objBoolean); +[11].forEach(callbackfn, objBoolean); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-13.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-13.js index 7657769762..0ca2d8c48e 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-13.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-13.js @@ -7,13 +7,13 @@ es5id: 15.4.4.18-5-13 description: Array.prototype.forEach - Number Object can be used as thisArg ---*/ - var result = false; - var objNumber = new Number(); +var result = false; +var objNumber = new Number(); - function callbackfn(val, idx, obj) { - result = (this === objNumber); - } +function callbackfn(val, idx, obj) { + result = (this === objNumber); +} - [11].forEach(callbackfn, objNumber); +[11].forEach(callbackfn, objNumber); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-14.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-14.js index 9033553789..8c1b7fcd53 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-14.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-14.js @@ -7,11 +7,12 @@ es5id: 15.4.4.18-5-14 description: Array.prototype.forEach - the Math object can be used as thisArg ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = (this === Math); - } +var result = false; - [11].forEach(callbackfn, Math); +function callbackfn(val, idx, obj) { + result = (this === Math); +} + +[11].forEach(callbackfn, Math); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-15.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-15.js index d4154fead7..8835b6bdcf 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-15.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-15.js @@ -7,13 +7,13 @@ es5id: 15.4.4.18-5-15 description: Array.prototype.forEach - Date Object can be used as thisArg ---*/ - var result = false; - var objDate = new Date(); +var result = false; +var objDate = new Date(); - function callbackfn(val, idx, obj) { - result = (this === objDate); - } +function callbackfn(val, idx, obj) { + result = (this === objDate); +} - [11].forEach(callbackfn, objDate); +[11].forEach(callbackfn, objDate); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-16.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-16.js index 67f48ac06d..a0f3cb83dd 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-16.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-16.js @@ -7,13 +7,13 @@ es5id: 15.4.4.18-5-16 description: Array.prototype.forEach - RegExp Object can be used as thisArg ---*/ - var result = false; - var objRegExp = new RegExp(); +var result = false; +var objRegExp = new RegExp(); - function callbackfn(val, idx, obj) { - result = (this === objRegExp); - } +function callbackfn(val, idx, obj) { + result = (this === objRegExp); +} - [11].forEach(callbackfn, objRegExp); +[11].forEach(callbackfn, objRegExp); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-17.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-17.js index 5d9ec5130c..2aea48e64e 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-17.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-17.js @@ -7,11 +7,12 @@ es5id: 15.4.4.18-5-17 description: Array.prototype.forEach - the JSON object can be used as thisArg ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = (this === JSON); - } +var result = false; - [11].forEach(callbackfn, JSON); +function callbackfn(val, idx, obj) { + result = (this === JSON); +} + +[11].forEach(callbackfn, JSON); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-18.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-18.js index 237bd7b389..84480af75f 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-18.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-18.js @@ -7,13 +7,13 @@ es5id: 15.4.4.18-5-18 description: Array.prototype.forEach - Error Object can be used as thisArg ---*/ - var result = false; - var objError = new RangeError(); +var result = false; +var objError = new RangeError(); - function callbackfn(val, idx, obj) { - result = (this === objError); - } +function callbackfn(val, idx, obj) { + result = (this === objError); +} - [11].forEach(callbackfn, objError); +[11].forEach(callbackfn, objError); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-19.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-19.js index 0ffb3591d0..cf428f4401 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-19.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-19.js @@ -9,17 +9,17 @@ description: > thisArg ---*/ - var result = false; - var arg; +var result = false; +var arg; - function callbackfn(val, idx, obj) { - result = (this === arg); - } +function callbackfn(val, idx, obj) { + result = (this === arg); +} - (function fun() { - arg = arguments; - }(1, 2, 3)); +(function fun() { + arg = arguments; +}(1, 2, 3)); - [11].forEach(callbackfn, arg); +[11].forEach(callbackfn, arg); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-2.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-2.js index 194c4ed484..7c62ee13dd 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-2.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-2.js @@ -7,16 +7,17 @@ es5id: 15.4.4.18-5-2 description: Array.prototype.forEach - thisArg is Object ---*/ - var res = false; - var o = new Object(); - o.res = true; - var result; - function callbackfn(val, idx, obj) - { - result = this.res; - } +var res = false; +var o = new Object(); +o.res = true; +var result; - var arr = [1]; - arr.forEach(callbackfn,o) +function callbackfn(val, idx, obj) +{ + result = this.res; +} + +var arr = [1]; +arr.forEach(callbackfn, o) assert.sameValue(result, true, 'result'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-21.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-21.js index 3a3e5c9626..19b8de2faa 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-21.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-21.js @@ -8,11 +8,12 @@ description: Array.prototype.forEach - the global object can be used as thisArg ---*/ var global = this; - var result = false; - function callbackfn(val, idx, obj) { - result = (this === global); - } +var result = false; - [11].forEach(callbackfn, this); +function callbackfn(val, idx, obj) { + result = (this === global); +} + +[11].forEach(callbackfn, this); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-22.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-22.js index ae22b88b03..22fe09f8ee 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-22.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-22.js @@ -7,12 +7,12 @@ es5id: 15.4.4.18-5-22 description: Array.prototype.forEach - boolean primitive can be used as thisArg ---*/ - var result = false; +var result = false; - function callbackfn(val, idx, obj) { - result = (this.valueOf() === false); - } +function callbackfn(val, idx, obj) { + result = (this.valueOf() === false); +} - [11].forEach(callbackfn, false); +[11].forEach(callbackfn, false); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-23.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-23.js index 5fc0674f06..c74f302aa7 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-23.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-23.js @@ -7,11 +7,12 @@ es5id: 15.4.4.18-5-23 description: Array.prototype.forEach - number primitive can be used as thisArg ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = (this.valueOf() === 101); - } +var result = false; - [11].forEach(callbackfn, 101); +function callbackfn(val, idx, obj) { + result = (this.valueOf() === 101); +} + +[11].forEach(callbackfn, 101); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-24.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-24.js index 6b774576bc..fc1c4fa6f9 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-24.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-24.js @@ -7,11 +7,12 @@ es5id: 15.4.4.18-5-24 description: Array.prototype.forEach - string primitive can be used as thisArg ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = (this.valueOf() === "abc"); - } +var result = false; - [11].forEach(callbackfn, "abc"); +function callbackfn(val, idx, obj) { + result = (this.valueOf() === "abc"); +} + +[11].forEach(callbackfn, "abc"); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-25.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-25.js index f32dd6f810..af345a9188 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-25.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-25.js @@ -8,16 +8,17 @@ description: Array.prototype.forEach - thisArg not passed flags: [noStrict] ---*/ - function innerObj() { - this._15_4_4_18_5_25 = true; - var _15_4_4_18_5_25 = false; - var result; - function callbackfn(val, idx, obj) { - result = this._15_4_4_18_5_25; - } - var arr = [1]; - arr.forEach(callbackfn) - this.retVal = !result; - } +function innerObj() { + this._15_4_4_18_5_25 = true; + var _15_4_4_18_5_25 = false; + var result; + + function callbackfn(val, idx, obj) { + result = this._15_4_4_18_5_25; + } + var arr = [1]; + arr.forEach(callbackfn) + this.retVal = !result; +} assert(new innerObj().retVal, 'new innerObj().retVal !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-3.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-3.js index 7ce819a4fc..738c6624f9 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-3.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-3.js @@ -7,16 +7,17 @@ es5id: 15.4.4.18-5-3 description: Array.prototype.forEach - thisArg is Array ---*/ - var res = false; - var a = new Array(); - a.res = true; - var result; - function callbackfn(val, idx, obj) - { - result = this.res; - } +var res = false; +var a = new Array(); +a.res = true; +var result; - var arr = [1]; - arr.forEach(callbackfn,a) +function callbackfn(val, idx, obj) +{ + result = this.res; +} + +var arr = [1]; +arr.forEach(callbackfn, a) assert.sameValue(result, true, 'result'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-4.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-4.js index 211bafd486..6a88eded2e 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-4.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-4.js @@ -9,17 +9,18 @@ description: > template(prototype) ---*/ - var res = false; - var result; - function callbackfn(val, idx, obj) - { - result = this.res; - } +var res = false; +var result; - function foo(){} - foo.prototype.res = true; - var f = new foo(); - var arr = [1]; - arr.forEach(callbackfn,f) +function callbackfn(val, idx, obj) +{ + result = this.res; +} + +function foo() {} +foo.prototype.res = true; +var f = new foo(); +var arr = [1]; +arr.forEach(callbackfn, f) assert.sameValue(result, true, 'result'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-5.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-5.js index 3f3d7ba8cc..eedf65b799 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-5.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-5.js @@ -7,18 +7,19 @@ es5id: 15.4.4.18-5-5 description: Array.prototype.forEach - thisArg is object from object template ---*/ - var res = false; - var result; - function callbackfn(val, idx, obj) - { - result = this.res; - } +var res = false; +var result; - function foo(){} - var f = new foo(); - f.res = true; +function callbackfn(val, idx, obj) +{ + result = this.res; +} - var arr = [1]; - arr.forEach(callbackfn,f) +function foo() {} +var f = new foo(); +f.res = true; + +var arr = [1]; +arr.forEach(callbackfn, f) assert.sameValue(result, true, 'result'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-6.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-6.js index bcbb7bb55c..00e62309be 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-6.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-6.js @@ -7,17 +7,18 @@ es5id: 15.4.4.18-5-6 description: Array.prototype.forEach - thisArg is function ---*/ - var res = false; - var result; - function callbackfn(val, idx, obj) - { - result = this.res; - } +var res = false; +var result; - function foo(){} - foo.res = true; +function callbackfn(val, idx, obj) +{ + result = this.res; +} - var arr = [1]; - arr.forEach(callbackfn,foo) +function foo() {} +foo.res = true; + +var arr = [1]; +arr.forEach(callbackfn, foo) assert.sameValue(result, true, 'result'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-7.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-7.js index d755040278..c5db1a536b 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-7.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-7.js @@ -7,12 +7,12 @@ es5id: 15.4.4.18-5-7 description: Array.prototype.forEach - built-in functions can be used as thisArg ---*/ - var result = false; +var result = false; - function callbackfn(val, idx, obj) { - result = (this === eval); - } +function callbackfn(val, idx, obj) { + result = (this === eval); +} - [11].forEach(callbackfn, eval); +[11].forEach(callbackfn, eval); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-9.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-9.js index 81097bd2f0..9dede756a3 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-9.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-9.js @@ -7,13 +7,13 @@ es5id: 15.4.4.18-5-9 description: Array.prototype.forEach - Function Object can be used as thisArg ---*/ - var result = false; - var objString = function () { }; +var result = false; +var objString = function() {}; - function callbackfn(val, idx, obj) { - result = (this === objString); - } +function callbackfn(val, idx, obj) { + result = (this === objString); +} - [11].forEach(callbackfn, objString); +[11].forEach(callbackfn, objString); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-1.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-1.js index 304a956838..0ee2556d65 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-1.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-1.js @@ -9,15 +9,16 @@ description: > array after the call ---*/ - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - arr[2] = 3; - arr[5] = 6; - } +var callCnt = 0; - var arr = [1,2,,4,5]; - arr.forEach(callbackfn); +function callbackfn(val, idx, obj) +{ + callCnt++; + arr[2] = 3; + arr[5] = 6; +} + +var arr = [1, 2, , 4, 5]; +arr.forEach(callbackfn); assert.sameValue(callCnt, 5, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-2.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-2.js index 427fee6c85..240795f062 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-2.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-2.js @@ -9,15 +9,16 @@ description: > after the call ---*/ - var callCnt = 0; - function callbackfn(val, idx, obj) - { - if(callCnt == 0) - delete arr[3]; - callCnt++; - } +var callCnt = 0; - var arr = [1,2,3,4,5]; - arr.forEach(callbackfn) +function callbackfn(val, idx, obj) +{ + if (callCnt == 0) + delete arr[3]; + callCnt++; +} + +var arr = [1, 2, 3, 4, 5]; +arr.forEach(callbackfn) assert.sameValue(callCnt, 4, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-3.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-3.js index c45a36fc08..d81ed613fe 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-3.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-3.js @@ -9,14 +9,15 @@ description: > Array.length is decreased ---*/ - var callCnt = 0; - function callbackfn(val, idx, obj) - { - arr.length=3; - callCnt++; - } +var callCnt = 0; - var arr = [1,2,3,4,5]; - arr.forEach(callbackfn); +function callbackfn(val, idx, obj) +{ + arr.length = 3; + callCnt++; +} + +var arr = [1, 2, 3, 4, 5]; +arr.forEach(callbackfn); assert.sameValue(callCnt, 3, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-4.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-4.js index c178ead682..96180c3ab7 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-4.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-4.js @@ -9,16 +9,17 @@ description: > sparse array ---*/ - var callCnt = 0; - function callbackfn(val, idx, obj) - { - arr[1000] = 3; - callCnt++; - } +var callCnt = 0; - var arr = new Array(10); - arr[1] = 1; - arr[2] = 2; - arr.forEach(callbackfn); +function callbackfn(val, idx, obj) +{ + arr[1000] = 3; + callCnt++; +} + +var arr = new Array(10); +arr[1] = 1; +arr[2] = 2; +arr.forEach(callbackfn); assert.sameValue(callCnt, 2, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-5.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-5.js index 71a7d7b939..9c56fa65cf 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-5.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-5.js @@ -9,17 +9,18 @@ description: > call when same index is also present in prototype ---*/ - var callCnt = 0; - function callbackfn(val, idx, obj) - { - delete arr[4]; - callCnt++; - } +var callCnt = 0; - Array.prototype[4] = 5; +function callbackfn(val, idx, obj) +{ + delete arr[4]; + callCnt++; +} - var arr = [1,2,3,4,5]; - arr.forEach(callbackfn) - delete Array.prototype[4]; +Array.prototype[4] = 5; + +var arr = [1, 2, 3, 4, 5]; +arr.forEach(callbackfn) +delete Array.prototype[4]; assert.sameValue(callCnt, 5, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-7.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-7.js index ba09941540..eb8ad48c67 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-7.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-7.js @@ -9,16 +9,16 @@ description: > after the call ---*/ - var result = false; - var arr = [1, 2, 3, 4, 5]; +var result = false; +var arr = [1, 2, 3, 4, 5]; - function callbackfn(val, Idx, obj) { - arr[4] = 6; - if (val >= 6) { - result = true; - } - } +function callbackfn(val, Idx, obj) { + arr[4] = 6; + if (val >= 6) { + result = true; + } +} - arr.forEach(callbackfn); +arr.forEach(callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-8.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-8.js index df0a1c9bc0..8a2065833a 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-8.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-8.js @@ -7,14 +7,18 @@ es5id: 15.4.4.18-7-8 description: Array.prototype.forEach - no observable effects occur if len is 0 ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - } +function callbackfn(val, idx, obj) { + accessed = true; +} - var obj = { 0: 11, 1: 12, length: 0 }; +var obj = { + 0: 11, + 1: 12, + length: 0 +}; - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-9.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-9.js index 1c9ab10377..361e225285 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-9.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-9.js @@ -9,21 +9,26 @@ description: > number of iterations ---*/ - var called = 0; - function callbackfn(val, idx, obj) { - called++; - } +var called = 0; - var obj = { 1: 12, 2: 9, length: 2 }; +function callbackfn(val, idx, obj) { + called++; +} - Object.defineProperty(obj, "0", { - get: function () { - obj.length = 3; - return 11; - }, - configurable: true - }); +var obj = { + 1: 12, + 2: 9, + length: 2 +}; - Array.prototype.forEach.call(obj, callbackfn); +Object.defineProperty(obj, "0", { + get: function() { + obj.length = 3; + return 11; + }, + configurable: true +}); + +Array.prototype.forEach.call(obj, callbackfn); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-1.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-1.js index 6470906371..ad7133ffb3 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-1.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-1.js @@ -9,14 +9,15 @@ description: > been assigned values ---*/ - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - } +var callCnt = 0; - var arr = new Array(10); - arr[1] = undefined; - arr.forEach(callbackfn); +function callbackfn(val, idx, obj) +{ + callCnt++; +} + +var arr = new Array(10); +arr[1] = undefined; +arr.forEach(callbackfn); assert.sameValue(callCnt, 1, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-10.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-10.js index 716fc69ff5..b3e6e5cc3d 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-10.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-10.js @@ -9,28 +9,31 @@ description: > prototype index property not to be visited on an Array-like Object ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(val, idx, obj) { - accessed = true; - if (idx === 3) { - testResult = false; - } - } +function callbackfn(val, idx, obj) { + accessed = true; + if (idx === 3) { + testResult = false; + } +} - var obj = { 2: 2, length: 20 }; +var obj = { + 2: 2, + length: 20 +}; - Object.defineProperty(obj, "0", { - get: function () { - delete Object.prototype[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + delete Object.prototype[1]; + return 0; + }, + configurable: true +}); - Object.prototype[1] = 1; - Array.prototype.forEach.call(obj, callbackfn); +Object.prototype[1] = 1; +Array.prototype.forEach.call(obj, callbackfn); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-11.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-11.js index e505e3d4dc..5c7ee84f70 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-11.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-11.js @@ -9,28 +9,28 @@ description: > prototype index property not to be visited on an Array ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(val, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } +function callbackfn(val, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } +} - var arr = [0, , ]; +var arr = [0, , ]; - Object.defineProperty(arr, "0", { - get: function () { - delete Array.prototype[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete Array.prototype[1]; + return 0; + }, + configurable: true +}); - Array.prototype[1] = 1; - arr.forEach(callbackfn); +Array.prototype[1] = 1; +arr.forEach(callbackfn); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-12.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-12.js index a9350d2996..a7de152f11 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-12.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-12.js @@ -10,25 +10,29 @@ description: > Array-like object ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - testResult = true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + testResult = true; + } +} - var obj = { 0: 0, 1: 111, length: 10 }; +var obj = { + 0: 0, + 1: 111, + length: 10 +}; - Object.defineProperty(obj, "0", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + delete obj[1]; + return 0; + }, + configurable: true +}); - Object.prototype[1] = 1; - Array.prototype.forEach.call(obj, callbackfn); +Object.prototype[1] = 1; +Array.prototype.forEach.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-13.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-13.js index b0b704f1a9..ecc5607a50 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-13.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-13.js @@ -9,24 +9,24 @@ description: > property causes prototype index property to be visited on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - testResult = true; - } - } - var arr = [0, 111]; +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + testResult = true; + } +} +var arr = [0, 111]; - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); - Array.prototype[1] = 1; - arr.forEach(callbackfn); +Array.prototype[1] = 1; +arr.forEach(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-14.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-14.js index 8106ac8ed8..8a09839a58 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-14.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-14.js @@ -9,27 +9,27 @@ description: > property not to be visited ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(val, idx, obj) { - accessed = true; - if (idx === 3) { - testResult = false; - } - } +function callbackfn(val, idx, obj) { + accessed = true; + if (idx === 3) { + testResult = false; + } +} - var arr = [0, 1, 2, "last"]; +var arr = [0, 1, 2, "last"]; - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 3; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + arr.length = 3; + return 0; + }, + configurable: true +}); - arr.forEach(callbackfn); +arr.forEach(callbackfn); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-15.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-15.js index 57a7cb646b..d92cf600a5 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-15.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-15.js @@ -9,30 +9,30 @@ description: > prototype property causes prototype index property to be visited ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "prototype") { - testResult = true; - } - } - var arr = [0, 1, 2]; +function callbackfn(val, idx, obj) { + if (idx === 2 && val === "prototype") { + testResult = true; + } +} +var arr = [0, 1, 2]; - Object.defineProperty(Array.prototype, "2", { - get: function () { - return "prototype"; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "2", { + get: function() { + return "prototype"; + }, + configurable: true +}); - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + arr.length = 2; + return 1; + }, + configurable: true +}); - arr.forEach(callbackfn); +arr.forEach(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-16.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-16.js index c337ed6a78..864b5aac6d 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-16.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-16.js @@ -10,31 +10,31 @@ description: > flags: [noStrict] ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "unconfigurable") { - testResult = true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 2 && val === "unconfigurable") { + testResult = true; + } +} - var arr = [0, 1, 2]; +var arr = [0, 1, 2]; - Object.defineProperty(arr, "2", { - get: function () { - return "unconfigurable"; - }, - configurable: false - }); +Object.defineProperty(arr, "2", { + get: function() { + return "unconfigurable"; + }, + configurable: false +}); - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + arr.length = 2; + return 1; + }, + configurable: true +}); - arr.forEach(callbackfn); +arr.forEach(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-2.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-2.js index 4d1ba1c19e..abc78638b8 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-2.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-2.js @@ -9,24 +9,24 @@ description: > here ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "length") { - testResult = true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 2 && val === "length") { + testResult = true; + } +} - var obj = {}; +var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - obj[2] = "length"; - return 3; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + obj[2] = "length"; + return 3; + }, + configurable: true +}); - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-3.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-3.js index 71abd46a0f..d949efd186 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-3.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-3.js @@ -9,26 +9,29 @@ description: > here ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(val, idx, obj) { - accessed = true; - if (idx === 8) { - testResult = false; - } - } - var obj = { 2: 6.99, 8: 19 }; +function callbackfn(val, idx, obj) { + accessed = true; + if (idx === 8) { + testResult = false; + } +} +var obj = { + 2: 6.99, + 8: 19 +}; - Object.defineProperty(obj, "length", { - get: function () { - delete obj[8]; - return 10; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + delete obj[8]; + return 10; + }, + configurable: true +}); - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-4.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-4.js index d9315e91df..af22a02196 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-4.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-4.js @@ -9,29 +9,31 @@ description: > current position are visited on an Array-like object ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - testResult = true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + testResult = true; + } +} - var obj = { length: 2 }; +var obj = { + length: 2 +}; - Object.defineProperty(obj, "0", { - get: function () { - Object.defineProperty(obj, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + Object.defineProperty(obj, "1", { + get: function() { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-5.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-5.js index 0afda4bd38..fda33ef758 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-5.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-5.js @@ -9,29 +9,29 @@ description: > current position are visited on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - testResult = true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + testResult = true; + } +} - var arr = [0, , 2]; +var arr = [0, , 2]; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(arr, "1", { + get: function() { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); - arr.forEach(callbackfn); +arr.forEach(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-6.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-6.js index a26a16afee..8e5262582f 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-6.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-6.js @@ -9,29 +9,31 @@ description: > after current position are visited on an Array-like object ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 6.99) { - testResult = true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 6.99) { + testResult = true; + } +} - var obj = { length: 2 }; +var obj = { + length: 2 +}; - Object.defineProperty(obj, "0", { - get: function () { - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + Object.defineProperty(Object.prototype, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-7.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-7.js index 48619ba101..11d9bd6ecf 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-7.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-7.js @@ -9,29 +9,29 @@ description: > after current position are visited on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 6.99) { - testResult = true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 6.99) { + testResult = true; + } +} - var arr = [0, , 2]; +var arr = [0, , 2]; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(Array.prototype, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); - arr.forEach(callbackfn); +arr.forEach(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-8.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-8.js index d850238c62..0e7f8c3084 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-8.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-8.js @@ -9,34 +9,36 @@ description: > property not to be visited on an Array-like object ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(val, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } +function callbackfn(val, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } +} - var obj = { length: 2 }; +var obj = { + length: 2 +}; - Object.defineProperty(obj, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + return 6.99; + }, + configurable: true +}); - Object.defineProperty(obj, "0", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + delete obj[1]; + return 0; + }, + configurable: true +}); - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-9.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-9.js index b9fda4c355..aa579d22b9 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-9.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-9.js @@ -9,34 +9,34 @@ description: > property not to be visited on an Array ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(val, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } +function callbackfn(val, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } +} - var arr = [1, 2]; +var arr = [1, 2]; - Object.defineProperty(arr, "1", { - get: function () { - return "6.99"; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + return "6.99"; + }, + configurable: true +}); - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); - arr.forEach(callbackfn); +arr.forEach(callbackfn); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-1.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-1.js index 8983f724e3..4261196fb7 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-1.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-1.js @@ -9,17 +9,20 @@ description: > property on an Array-like object ---*/ - var kValue = { }; - var testResult = false; +var kValue = {}; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 5) { - testResult = (val === kValue); - } - } +function callbackfn(val, idx, obj) { + if (idx === 5) { + testResult = (val === kValue); + } +} - var obj = { 5: kValue, length: 100 }; +var obj = { + 5: kValue, + length: 100 +}; - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-10.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-10.js index 4b6a3b8aa1..1411c10bd4 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-10.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-10.js @@ -9,23 +9,23 @@ description: > property on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 2) { - testResult = (val === 12); - } - } +function callbackfn(val, idx, obj) { + if (idx === 2) { + testResult = (val === 12); + } +} - var arr = []; +var arr = []; - Object.defineProperty(arr, "2", { - get: function () { - return 12; - }, - configurable: true - }); +Object.defineProperty(arr, "2", { + get: function() { + return 12; + }, + configurable: true +}); - arr.forEach(callbackfn); +arr.forEach(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-11.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-11.js index d886a548f3..b313ad7c6a 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-11.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-11.js @@ -10,29 +10,31 @@ description: > Array-like object ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (val === 11); - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (val === 11); + } +} - var proto = { 0: 5 }; +var proto = { + 0: 5 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 10; +var child = new Con(); +child.length = 10; - Object.defineProperty(child, "0", { - get: function () { - return 11; - }, - configurable: true - }); +Object.defineProperty(child, "0", { + get: function() { + return 11; + }, + configurable: true +}); - Array.prototype.forEach.call(child, callbackfn); +Array.prototype.forEach.call(child, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-12.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-12.js index 8c97ccda43..493e9632c4 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-12.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-12.js @@ -9,25 +9,25 @@ description: > property that overrides an inherited data property on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (val === 111); - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (val === 111); + } +} - var arr = []; +var arr = []; - Array.prototype[0] = 10; +Array.prototype[0] = 10; - Object.defineProperty(arr, "0", { - get: function () { - return 111; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + return 111; + }, + configurable: true +}); - arr.forEach(callbackfn); +arr.forEach(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-13.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-13.js index 5b5966bd86..c3d66f5f4b 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-13.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-13.js @@ -10,37 +10,37 @@ description: > Array-like object ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 1) { - testResult = (val === 12); - } - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + testResult = (val === 12); + } +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "1", { - get: function () { - return 6; - }, - configurable: true - }); +Object.defineProperty(proto, "1", { + get: function() { + return 6; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 10; +var child = new Con(); +child.length = 10; - Object.defineProperty(child, "1", { - get: function () { - return 12; - }, - configurable: true - }); +Object.defineProperty(child, "1", { + get: function() { + return 12; + }, + configurable: true +}); - Array.prototype.forEach.call(child, callbackfn); +Array.prototype.forEach.call(child, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-14.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-14.js index 8222ec722b..e87ed433ee 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-14.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-14.js @@ -9,30 +9,30 @@ description: > property that overrides an inherited accessor property on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (val === 11); - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (val === 11); + } +} - var arr = []; +var arr = []; - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 5; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return 5; + }, + configurable: true +}); - Object.defineProperty(arr, "0", { - get: function () { - return 11; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + return 11; + }, + configurable: true +}); - arr.forEach(callbackfn); +arr.forEach(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-15.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-15.js index 4782e16db3..5eebc81eab 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-15.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-15.js @@ -9,29 +9,29 @@ description: > accessor property on an Array-like object ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 1) { - testResult = (val === 11); - } - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + testResult = (val === 11); + } +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "1", { - get: function () { - return 11; - }, - configurable: true - }); +Object.defineProperty(proto, "1", { + get: function() { + return 11; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 20; +var child = new Con(); +child.length = 20; - Array.prototype.forEach.call(child, callbackfn); +Array.prototype.forEach.call(child, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-16.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-16.js index 5abba48e7c..bf0c514cc6 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-16.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-16.js @@ -9,21 +9,21 @@ description: > accessor property on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (val === 11); - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (val === 11); + } +} - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 11; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return 11; + }, + configurable: true +}); - [, , , ].forEach(callbackfn); +[, , , ].forEach(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-17.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-17.js index a3258cbd51..c63d80321c 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-17.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-17.js @@ -9,20 +9,22 @@ description: > property without a get function on an Array-like object ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 1) { - testResult = (typeof val === "undefined"); - } - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + testResult = (typeof val === "undefined"); + } +} - var obj = { length: 2 }; - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); +var obj = { + length: 2 +}; +Object.defineProperty(obj, "1", { + set: function() {}, + configurable: true +}); - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-18.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-18.js index a6a8df0775..ae7114850f 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-18.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-18.js @@ -9,21 +9,21 @@ description: > property without a get function on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (typeof val === "undefined"); - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (typeof val === "undefined"); + } +} - var arr = []; +var arr = []; - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(arr, "0", { + set: function() {}, + configurable: true +}); - arr.forEach(callbackfn); +arr.forEach(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-19.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-19.js index 12b0e0f29b..2c1a00be6b 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-19.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-19.js @@ -10,28 +10,30 @@ description: > accessor property on an Array-like object ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 1) { - testResult = (typeof val === "undefined"); - } - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + testResult = (typeof val === "undefined"); + } +} - var obj = { length: 2 }; +var obj = { + length: 2 +}; - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); +Object.defineProperty(obj, "1", { + set: function() {}, + configurable: true +}); - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 10; - }, - configurable: true - }); +Object.defineProperty(Object.prototype, "1", { + get: function() { + return 10; + }, + configurable: true +}); - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-2.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-2.js index 03ba5f4a12..c5c0e59429 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-2.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-2.js @@ -9,14 +9,14 @@ description: > property on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (val === 11); - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (val === 11); + } +} - [11].forEach(callbackfn); +[11].forEach(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-20.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-20.js index 6bd5c5402a..3d12eb6681 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-20.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-20.js @@ -10,28 +10,28 @@ description: > accessor property on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (typeof val === "undefined"); - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (typeof val === "undefined"); + } +} - var arr = []; +var arr = []; - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(arr, "0", { + set: function() {}, + configurable: true +}); - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 100; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return 100; + }, + configurable: true +}); - arr.forEach(callbackfn); +arr.forEach(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-21.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-21.js index d952c57dc0..a185cb0a02 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-21.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-21.js @@ -9,26 +9,26 @@ description: > accessor property without a get function on an Array-like object ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 1) { - testResult = (typeof val === "undefined"); - } - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + testResult = (typeof val === "undefined"); + } +} - var proto = {}; - Object.defineProperty(proto, "1", { - set: function () { }, - configurable: true - }); +var proto = {}; +Object.defineProperty(proto, "1", { + set: function() {}, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 2; +var child = new Con(); +child.length = 2; - Array.prototype.forEach.call(child, callbackfn); +Array.prototype.forEach.call(child, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-22.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-22.js index baf2b2bcfe..c3ccfca7b9 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-22.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-22.js @@ -9,19 +9,19 @@ description: > accessor property without a get function on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (typeof val === "undefined"); - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (typeof val === "undefined"); + } +} - Object.defineProperty(Array.prototype, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + set: function() {}, + configurable: true +}); - [, 1].forEach(callbackfn); +[, 1].forEach(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-25.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-25.js index 51930b840f..7f192e129b 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-25.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-25.js @@ -10,18 +10,18 @@ description: > is less than number of parameters) ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (val === 11); - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (val === 11); + } +} - var func = function (a, b) { - return Array.prototype.forEach.call(arguments, callbackfn); - }; +var func = function(a, b) { + return Array.prototype.forEach.call(arguments, callbackfn); +}; - func(11); +func(11); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-26.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-26.js index 51aefae34c..22775361f3 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-26.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-26.js @@ -10,27 +10,27 @@ description: > equals number of parameters) ---*/ - var called = 0; - var testResult = false; +var called = 0; +var testResult = false; - function callbackfn(val, idx, obj) { - called++; - if (called !== 1 && !testResult) { - return; - } - if (idx === 0) { - testResult = (val === 11); - } else if (idx === 1) { - testResult = (val === 9); - } else { - testResult = false; - } - } +function callbackfn(val, idx, obj) { + called++; + if (called !== 1 && !testResult) { + return; + } + if (idx === 0) { + testResult = (val === 11); + } else if (idx === 1) { + testResult = (val === 9); + } else { + testResult = false; + } +} - var func = function (a, b) { - Array.prototype.forEach.call(arguments, callbackfn); - }; +var func = function(a, b) { + Array.prototype.forEach.call(arguments, callbackfn); +}; - func(11, 9); +func(11, 9); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-27.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-27.js index 21734ecca0..8ae05bc5ac 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-27.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-27.js @@ -10,29 +10,29 @@ description: > is greater than number of parameters) ---*/ - var called = 0; - var testResult = false; +var called = 0; +var testResult = false; - function callbackfn(val, idx, obj) { - called++; - if (called !== 1 && !testResult) { - return; - } - if (idx === 0) { - testResult = (val === 11); - } else if (idx === 1) { - testResult = (val === 12); - } else if (idx === 2) { - testResult = (val === 9); - } else { - testResult = false; - } - } +function callbackfn(val, idx, obj) { + called++; + if (called !== 1 && !testResult) { + return; + } + if (idx === 0) { + testResult = (val === 11); + } else if (idx === 1) { + testResult = (val === 12); + } else if (idx === 2) { + testResult = (val === 9); + } else { + testResult = false; + } +} - var func = function (a, b) { - return Array.prototype.forEach.call(arguments, callbackfn); - }; +var func = function(a, b) { + return Array.prototype.forEach.call(arguments, callbackfn); +}; - func(11, 12, 9); +func(11, 12, 9); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-28.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-28.js index 7bf8287190..ca2a6f9021 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-28.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-28.js @@ -9,35 +9,35 @@ description: > iterations is observed on an Array ---*/ - var preIterVisible = false; - var arr = []; - var testResult = false; +var preIterVisible = false; +var arr = []; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 1) { - testResult = (val === 9); - } - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + testResult = (val === 9); + } +} - Object.defineProperty(arr, "0", { - get: function () { - preIterVisible = true; - return 11; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + preIterVisible = true; + return 11; + }, + configurable: true +}); - Object.defineProperty(arr, "1", { - get: function () { - if (preIterVisible) { - return 9; - } else { - return 13; - } - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + if (preIterVisible) { + return 9; + } else { + return 13; + } + }, + configurable: true +}); - arr.forEach(callbackfn); +arr.forEach(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-29.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-29.js index 9d9da525ad..12f468ac7f 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-29.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-29.js @@ -9,35 +9,37 @@ description: > iterations is observed on an Array-like object ---*/ - var preIterVisible = false; - var obj = { length: 2 }; - var testResult = false; +var preIterVisible = false; +var obj = { + length: 2 +}; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 1) { - testResult = (val === 9); - } - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + testResult = (val === 9); + } +} - Object.defineProperty(obj, "0", { - get: function () { - preIterVisible = true; - return 11; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + preIterVisible = true; + return 11; + }, + configurable: true +}); - Object.defineProperty(obj, "1", { - get: function () { - if (preIterVisible) { - return 9; - } else { - return 13; - } - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + if (preIterVisible) { + return 9; + } else { + return 13; + } + }, + configurable: true +}); - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-3.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-3.js index c7abc31d73..7ee64853f1 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-3.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-3.js @@ -9,24 +9,26 @@ description: > property that overrides an inherited data property on an Array ---*/ - var kValue = "abc"; - var testResult = false; +var kValue = "abc"; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 5) { - testResult = (val === kValue); - } - } +function callbackfn(val, idx, obj) { + if (idx === 5) { + testResult = (val === kValue); + } +} - var proto = { 5: 100 }; +var proto = { + 5: 100 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[5] = kValue; - child.length = 10; +var child = new Con(); +child[5] = kValue; +child.length = 10; - Array.prototype.forEach.call(child, callbackfn); +Array.prototype.forEach.call(child, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-30.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-30.js index 0787f9b955..2ded257f9f 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-30.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-30.js @@ -9,30 +9,35 @@ description: > terminate iteration on an Array-like object ---*/ - var obj = { 0: 11, 5: 10, 10: 8, length: 20 }; - var accessed = false; +var obj = { + 0: 11, + 5: 10, + 10: 8, + length: 20 +}; +var accessed = false; - function callbackfn(val, idx, obj) { - if (idx > 1) { - accessed = true; - } - } +function callbackfn(val, idx, obj) { + if (idx > 1) { + accessed = true; + } +} - Object.defineProperty(obj, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true +}); - Object.defineProperty(obj, "2", { - get: function () { - accessed = true; - return 100; - }, - configurable: true - }); +Object.defineProperty(obj, "2", { + get: function() { + accessed = true; + return 100; + }, + configurable: true +}); assert.throws(RangeError, function() { - Array.prototype.forEach.call(obj, callbackfn); + Array.prototype.forEach.call(obj, callbackfn); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-31.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-31.js index e8da569a8e..b6745f6d10 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-31.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-31.js @@ -9,33 +9,33 @@ description: > terminate iteration on an Array-like object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - if (idx > 1) { - accessed = true; - } - } +function callbackfn(val, idx, obj) { + if (idx > 1) { + accessed = true; + } +} - var arr = []; - arr[5] = 10; - arr[10] = 100; +var arr = []; +arr[5] = 10; +arr[10] = 100; - Object.defineProperty(arr, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true +}); - Object.defineProperty(arr, "2", { - get: function () { - accessed = true; - return 100; - }, - configurable: true - }); +Object.defineProperty(arr, "2", { + get: function() { + accessed = true; + return 100; + }, + configurable: true +}); assert.throws(RangeError, function() { - arr.forEach(callbackfn); + arr.forEach(callbackfn); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-4.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-4.js index ed8fffe015..3aa9c45737 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-4.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-4.js @@ -9,16 +9,16 @@ description: > property that overrides an inherited data property on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (val === 12); - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (val === 12); + } +} - Array.prototype[0] = 11; +Array.prototype[0] = 11; - [12].forEach(callbackfn); +[12].forEach(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-5.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-5.js index 4ddef569ae..0cba853753 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-5.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-5.js @@ -10,33 +10,33 @@ description: > Array-like object ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (val === 11); - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (val === 11); + } +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "0", { - get: function () { - return 5; - }, - configurable: true - }); +Object.defineProperty(proto, "0", { + get: function() { + return 5; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 2; - Object.defineProperty(child, "0", { - value: 11, - configurable: true - }); +var child = new Con(); +child.length = 2; +Object.defineProperty(child, "0", { + value: 11, + configurable: true +}); - Array.prototype.forEach.call(child, callbackfn); +Array.prototype.forEach.call(child, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-6.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-6.js index 691feab76b..213de16bd8 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-6.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-6.js @@ -9,21 +9,21 @@ description: > property that overrides an inherited accessor property on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (val === 11); - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (val === 11); + } +} - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 9; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return 9; + }, + configurable: true +}); - [11].forEach(callbackfn); +[11].forEach(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-7.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-7.js index 75d5890f86..28f747e836 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-7.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-7.js @@ -9,23 +9,25 @@ description: > data property on an Array-like object ---*/ - var kValue = 'abc'; - var testResult = false; +var kValue = 'abc'; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 5) { - testResult = (val === kValue); - } - } +function callbackfn(val, idx, obj) { + if (idx === 5) { + testResult = (val === kValue); + } +} - var proto = { 5: kValue }; +var proto = { + 5: kValue +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 10; +var child = new Con(); +child.length = 10; - Array.prototype.forEach.call(child, callbackfn); +Array.prototype.forEach.call(child, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-8.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-8.js index 8943de8186..9ede560ba4 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-8.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-8.js @@ -9,16 +9,16 @@ description: > data property on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 1) { - testResult = (val === 13); - } - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + testResult = (val === 13); + } +} - Array.prototype[1] = 13; +Array.prototype[1] = 13; - [, , , ].forEach(callbackfn); +[, , , ].forEach(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-9.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-9.js index d2fc330af9..51c77ca23e 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-9.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-9.js @@ -9,23 +9,26 @@ description: > property on an Array-like object ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (val === 11); - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (val === 11); + } +} - var obj = { 10: 10, length: 20 }; +var obj = { + 10: 10, + length: 20 +}; - Object.defineProperty(obj, "0", { - get: function () { - return 11; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + return 11; + }, + configurable: true +}); - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-1.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-1.js index 189dc1a57f..e0eb478299 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-1.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-1.js @@ -7,18 +7,19 @@ es5id: 15.4.4.18-7-c-ii-1 description: Array.prototype.forEach - callbackfn called with correct parameters ---*/ - var bPar = true; - var bCalled = false; - function callbackfn(val, idx, obj) - { - bCalled = true; - if(obj[idx] !== val) - bPar = false; - } +var bPar = true; +var bCalled = false; - var arr = [0,1,true,null,new Object(),"five"]; - arr[999999] = -6.6; - arr.forEach(callbackfn); +function callbackfn(val, idx, obj) +{ + bCalled = true; + if (obj[idx] !== val) + bPar = false; +} + +var arr = [0, 1, true, null, new Object(), "five"]; +arr[999999] = -6.6; +arr.forEach(callbackfn); assert.sameValue(bCalled, true, 'bCalled'); assert.sameValue(bPar, true, 'bPar'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-10.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-10.js index 4e44bb713b..1f6e4baa39 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-10.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-10.js @@ -9,11 +9,12 @@ description: > parameter ---*/ - var result = false; - function callbackfn(val) { - result = (val > 10); - } +var result = false; - [11].forEach(callbackfn); +function callbackfn(val) { + result = (val > 10); +} + +[11].forEach(callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-11.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-11.js index f0a81a8718..a2991bb19c 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-11.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-11.js @@ -9,11 +9,12 @@ description: > parameter ---*/ - var result = false; - function callbackfn(val, idx) { - result = (val > 10 && arguments[2][idx] === val); - } +var result = false; - [11].forEach(callbackfn); +function callbackfn(val, idx) { + result = (val > 10 && arguments[2][idx] === val); +} + +[11].forEach(callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-12.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-12.js index af31ca180b..667bec2276 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-12.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-12.js @@ -9,11 +9,12 @@ description: > parameter ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = (val > 10 && obj[idx] === val); - } +var result = false; - [11].forEach(callbackfn); +function callbackfn(val, idx, obj) { + result = (val > 10 && obj[idx] === val); +} + +[11].forEach(callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-13.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-13.js index 80df8a4195..46a0ec317f 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-13.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-13.js @@ -7,11 +7,12 @@ es5id: 15.4.4.18-7-c-ii-13 description: Array.prototype.forEach - callbackfn that uses arguments ---*/ - var result = false; - function callbackfn() { - result = (arguments[2][arguments[1]] === arguments[0]); - } +var result = false; - [11].forEach(callbackfn); +function callbackfn() { + result = (arguments[2][arguments[1]] === arguments[0]); +} + +[11].forEach(callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-16.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-16.js index ef9ff8c4f7..739bae5f3d 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-16.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-16.js @@ -9,13 +9,17 @@ description: > object when T is not an object (T is a boolean) ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = (this.valueOf() !== false); - } +var result = false; - var obj = { 0: 11, length: 2 }; +function callbackfn(val, idx, obj) { + result = (this.valueOf() !== false); +} - Array.prototype.forEach.call(obj, callbackfn, false); +var obj = { + 0: 11, + length: 2 +}; + +Array.prototype.forEach.call(obj, callbackfn, false); assert.sameValue(result, false, 'result'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-17.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-17.js index 8967922b2c..44e2e9baca 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-17.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-17.js @@ -9,13 +9,17 @@ description: > object when T is not an object (T is a number) ---*/ - var result = false; - function callbackfn(val, idx, o) { - result = (5 === this.valueOf()); - } +var result = false; - var obj = { 0: 11, length: 2 }; +function callbackfn(val, idx, o) { + result = (5 === this.valueOf()); +} - Array.prototype.forEach.call(obj, callbackfn, 5); +var obj = { + 0: 11, + length: 2 +}; + +Array.prototype.forEach.call(obj, callbackfn, 5); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-18.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-18.js index 3b073f0195..3cf057a311 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-18.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-18.js @@ -9,13 +9,17 @@ description: > object when T is not an object (T is a string) ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = ('hello' === this.valueOf()); - } +var result = false; - var obj = { 0: 11, length: 2 }; +function callbackfn(val, idx, obj) { + result = ('hello' === this.valueOf()); +} - Array.prototype.forEach.call(obj, callbackfn, "hello"); +var obj = { + 0: 11, + length: 2 +}; + +Array.prototype.forEach.call(obj, callbackfn, "hello"); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-19.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-19.js index 677a50236c..df0f1401e0 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-19.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-19.js @@ -7,18 +7,24 @@ es5id: 15.4.4.18-7-c-ii-19 description: Array.prototype.forEach - non-indexed properties are not called ---*/ - var accessed = false; - var result = true; - function callbackfn(val, idx, obj) { - accessed = true; - if (val === 8) { - result = false; - } - } +var accessed = false; +var result = true; - var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 }; +function callbackfn(val, idx, obj) { + accessed = true; + if (val === 8) { + result = false; + } +} - Array.prototype.forEach.call(obj, callbackfn); +var obj = { + 0: 11, + 10: 12, + non_index_property: 8, + length: 20 +}; + +Array.prototype.forEach.call(obj, callbackfn); assert(result, 'result !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-2.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-2.js index 4140f28cb1..6dcd31b139 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-2.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-2.js @@ -7,17 +7,18 @@ es5id: 15.4.4.18-7-c-ii-2 description: Array.prototype.forEach - callbackfn takes 3 arguments ---*/ - var parCnt = 3; - var bCalled = false - function callbackfn(val, idx, obj) - { - bCalled = true; - if(arguments.length !== 3) - parCnt = arguments.length; //verify if callbackfn was called with 3 parameters - } +var parCnt = 3; +var bCalled = false - var arr = [0,1,2,3,4,5,6,7,8,9]; - arr.forEach(callbackfn); +function callbackfn(val, idx, obj) +{ + bCalled = true; + if (arguments.length !== 3) + parCnt = arguments.length; //verify if callbackfn was called with 3 parameters +} + +var arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; +arr.forEach(callbackfn); assert.sameValue(bCalled, true, 'bCalled'); assert.sameValue(parCnt, 3, 'parCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-20.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-20.js index cf6b3fe8b3..d0a6f846d6 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-20.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-20.js @@ -9,15 +9,21 @@ description: > parameters (thisArg is correct) ---*/ - var result = false; - function callbackfn(val, idx, obj) { - result = (10 === this.threshold); - } +var result = false; - var thisArg = { threshold: 10 }; +function callbackfn(val, idx, obj) { + result = (10 === this.threshold); +} - var obj = { 0: 11, length: 1 }; +var thisArg = { + threshold: 10 +}; - Array.prototype.forEach.call(obj, callbackfn, thisArg); +var obj = { + 0: 11, + length: 1 +}; + +Array.prototype.forEach.call(obj, callbackfn, thisArg); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-21.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-21.js index 9879606253..a165b48209 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-21.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-21.js @@ -9,23 +9,27 @@ description: > parameters (kValue is correct) ---*/ - var resultOne = false; - var resultTwo = false; +var resultOne = false; +var resultTwo = false; - function callbackfn(val, idx, obj) { - if (idx === 0) { - resultOne = (val === 11); - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + resultOne = (val === 11); + } - if (idx === 1) { - resultTwo = (val === 12); - } + if (idx === 1) { + resultTwo = (val === 12); + } - } +} - var obj = { 0: 11, 1: 12, length: 2 }; +var obj = { + 0: 11, + 1: 12, + length: 2 +}; - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert(resultOne, 'resultOne !== true'); assert(resultTwo, 'resultTwo !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-22.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-22.js index 3f7fa9349f..8b29f06dab 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-22.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-22.js @@ -9,23 +9,27 @@ description: > parameters (the index k is correct) ---*/ - var resultOne = false; - var resultTwo = false; +var resultOne = false; +var resultTwo = false; - function callbackfn(val, idx, obj) { - if (val === 11) { - resultOne = (idx === 0); - } +function callbackfn(val, idx, obj) { + if (val === 11) { + resultOne = (idx === 0); + } - if (val === 12) { - resultTwo = (idx === 1); - } + if (val === 12) { + resultTwo = (idx === 1); + } - } +} - var obj = { 0: 11, 1: 12, length: 2 }; +var obj = { + 0: 11, + 1: 12, + length: 2 +}; - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert(resultOne, 'resultOne !== true'); assert(resultTwo, 'resultTwo !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-23.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-23.js index 559f0ea68c..24ae74378f 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-23.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-23.js @@ -9,13 +9,16 @@ description: > parameters (this object O is correct) ---*/ - var result = false; - var obj = { 0: 11, length: 2 }; +var result = false; +var obj = { + 0: 11, + length: 2 +}; - function callbackfn(val, idx, o) { - result = (obj === o); - } +function callbackfn(val, idx, o) { + result = (obj === o); +} - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-4.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-4.js index aafb439dd1..89d2da4a0d 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-4.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-4.js @@ -9,20 +9,21 @@ description: > order ---*/ - var arr = [0, 1, 2, 3, 4, 5]; - var lastIdx = 0; - var called = 0; - var result = true; - function callbackfn(val, idx, o) { - called++; - if (lastIdx !== idx) { - result = false; - } else { - lastIdx++; - } - } +var arr = [0, 1, 2, 3, 4, 5]; +var lastIdx = 0; +var called = 0; +var result = true; - arr.forEach(callbackfn); +function callbackfn(val, idx, o) { + called++; + if (lastIdx !== idx) { + result = false; + } else { + lastIdx++; + } +} + +arr.forEach(callbackfn); assert(result, 'result !== true'); assert.sameValue(arr.length, called, 'arr.length'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-5.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-5.js index 11159ba6fb..1b597b8ed1 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-5.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-5.js @@ -9,23 +9,23 @@ description: > iteration and not prior to starting the loop on an Array ---*/ - var result = true; - var kIndex = []; +var result = true; +var kIndex = []; - //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. - function callbackfn(val, idx, obj) { - //Each position should be visited one time, which means k is accessed one time during iterations. - if (typeof kIndex[idx] === "undefined") { - //when current position is visited, its previous index should has been visited. - if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") { - result = false; - } - kIndex[idx] = 1; - } else { - result = false; - } - } +//By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. +function callbackfn(val, idx, obj) { + //Each position should be visited one time, which means k is accessed one time during iterations. + if (typeof kIndex[idx] === "undefined") { + //when current position is visited, its previous index should has been visited. + if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") { + result = false; + } + kIndex[idx] = 1; + } else { + result = false; + } +} - [11, 12, 13, 14].forEach(callbackfn, undefined); +[11, 12, 13, 14].forEach(callbackfn, undefined); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-6.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-6.js index b1474e751c..22d73e78be 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-6.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-6.js @@ -9,17 +9,20 @@ description: > consistent ---*/ - var result = false; - var obj = { 0: 11, length: 1 }; - var thisArg = {}; +var result = false; +var obj = { + 0: 11, + length: 1 +}; +var thisArg = {}; - function callbackfn() { - result = (this === thisArg && - arguments[0] === 11 && - arguments[1] === 0 && - arguments[2] === obj); - } +function callbackfn() { + result = (this === thisArg && + arguments[0] === 11 && + arguments[1] === 0 && + arguments[2] === obj); +} - Array.prototype.forEach.call(obj, callbackfn, thisArg); +Array.prototype.forEach.call(obj, callbackfn, thisArg); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-7.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-7.js index 0941fe49bf..c7f28a11f6 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-7.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-7.js @@ -9,19 +9,24 @@ description: > callbackfn terminate iteration ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - if (idx > 0) { - accessed = true; - } - if (idx === 0) { - throw new Error("Exception occurred in callbackfn"); - } - } +function callbackfn(val, idx, obj) { + if (idx > 0) { + accessed = true; + } + if (idx === 0) { + throw new Error("Exception occurred in callbackfn"); + } +} - var obj = { 0: 11, 4: 10, 10: 8, length: 20 }; +var obj = { + 0: 11, + 4: 10, + 10: 8, + length: 20 +}; assert.throws(Error, function() { - Array.prototype.forEach.call(obj, callbackfn); + Array.prototype.forEach.call(obj, callbackfn); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-8.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-8.js index c1b460cc3e..452044f84c 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-8.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-8.js @@ -9,19 +9,23 @@ description: > previous iterations is observed ---*/ - var result = false; - var obj = { 0: 11, 1: 12, length: 2 }; +var result = false; +var obj = { + 0: 11, + 1: 12, + length: 2 +}; - function callbackfn(val, idx, o) { - if (idx === 0) { - obj[idx + 1] = 8; - } +function callbackfn(val, idx, o) { + if (idx === 0) { + obj[idx + 1] = 8; + } - if (idx === 1) { - result = (val === 8); - } - } + if (idx === 1) { + result = (val === 8); + } +} - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-9.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-9.js index b8396ea609..5f6aa9cfd0 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-9.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-9.js @@ -9,11 +9,12 @@ description: > parameter ---*/ - var called = 0; - function callbackfn() { - called++; - } +var called = 0; - [11, 12].forEach(callbackfn); +function callbackfn() { + called++; +} + +[11, 12].forEach(callbackfn); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-1.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-1.js index 4716477c77..cf592c1e42 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-1.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-1.js @@ -9,8 +9,11 @@ description: > (empty array) ---*/ - var callCnt = 0; - function cb(){callCnt++} - var i = [].forEach(cb); +var callCnt = 0; + +function cb() { + callCnt++ +} +var i = [].forEach(cb); assert.sameValue(callCnt, 0, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-10.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-10.js index ef289af430..3734407484 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-10.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-10.js @@ -7,13 +7,17 @@ es5id: 15.4.4.18-8-10 description: Array.prototype.forEach - subclassed array when length is reduced ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 1; +foo.prototype = new Array(1, 2, 3); - var callCnt = 0; - function cb(){callCnt++} - var i = f.forEach(cb); +function foo() {} +var f = new foo(); +f.length = 1; + +var callCnt = 0; + +function cb() { + callCnt++ +} +var i = f.forEach(cb); assert.sameValue(callCnt, 1, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-11.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-11.js index 9c70a3a059..d594b58a20 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-11.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-11.js @@ -9,12 +9,12 @@ description: > called on ---*/ - function callbackfn(val, idx, obj) - { - return true; - } - var arr = [1,2,3,4,5]; - arr.forEach(callbackfn); +function callbackfn(val, idx, obj) +{ + return true; +} +var arr = [1, 2, 3, 4, 5]; +arr.forEach(callbackfn); assert.sameValue(arr[0], 1, 'arr[0]'); assert.sameValue(arr[1], 2, 'arr[1]'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-12.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-12.js index 74e0eef2ca..3b92ddb24c 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-12.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-12.js @@ -7,15 +7,16 @@ es5id: 15.4.4.18-8-12 description: Array.prototype.forEach doesn't visit expandos ---*/ - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - } - var arr = [1,2,3,4,5]; - arr["i"] = 10; - arr[true] = 11; +var callCnt = 0; - arr.forEach(callbackfn); +function callbackfn(val, idx, obj) +{ + callCnt++; +} +var arr = [1, 2, 3, 4, 5]; +arr["i"] = 10; +arr[true] = 11; + +arr.forEach(callbackfn); assert.sameValue(callCnt, 5, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-13.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-13.js index 8137d9b4ac..de40f14e30 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-13.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-13.js @@ -9,12 +9,13 @@ description: > 0 ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - } +var accessed = false; - var result = [].forEach(callbackfn); +function callbackfn(val, idx, obj) { + accessed = true; +} + +var result = [].forEach(callbackfn); assert.sameValue(typeof result, "undefined", 'typeof result'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-2.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-2.js index 24a5efda0b..96c4cdc45d 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-2.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-2.js @@ -9,13 +9,17 @@ description: > (subclassed Array, length overridden to null (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = null; +foo.prototype = new Array(1, 2, 3); - var callCnt = 0; - function cb(){callCnt++} - var i = f.forEach(cb); +function foo() {} +var f = new foo(); +f.length = null; + +var callCnt = 0; + +function cb() { + callCnt++ +} +var i = f.forEach(cb); assert.sameValue(callCnt, 0, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-3.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-3.js index ad6d2c88d3..9dbf01bec9 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-3.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-3.js @@ -9,13 +9,17 @@ description: > (subclassed Array, length overridden to false (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = false; +foo.prototype = new Array(1, 2, 3); - var callCnt = 0; - function cb(){callCnt++} - var i = f.forEach(cb); +function foo() {} +var f = new foo(); +f.length = false; + +var callCnt = 0; + +function cb() { + callCnt++ +} +var i = f.forEach(cb); assert.sameValue(callCnt, 0, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-4.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-4.js index eca6eb28c5..fd9bfba940 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-4.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-4.js @@ -9,13 +9,17 @@ description: > (subclassed Array, length overridden to 0 (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 0; +foo.prototype = new Array(1, 2, 3); - var callCnt = 0; - function cb(){callCnt++} - var i = f.forEach(cb); +function foo() {} +var f = new foo(); +f.length = 0; + +var callCnt = 0; + +function cb() { + callCnt++ +} +var i = f.forEach(cb); assert.sameValue(callCnt, 0, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-5.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-5.js index 89ef96a1db..6e3ce9beed 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-5.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-5.js @@ -9,13 +9,17 @@ description: > (subclassed Array, length overridden to '0' (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = '0'; +foo.prototype = new Array(1, 2, 3); - var callCnt = 0; - function cb(){callCnt++} - var i = f.forEach(cb); +function foo() {} +var f = new foo(); +f.length = '0'; + +var callCnt = 0; + +function cb() { + callCnt++ +} +var i = f.forEach(cb); assert.sameValue(callCnt, 0, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-6.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-6.js index 57bf3415d1..0e26ea86fc 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-6.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-6.js @@ -9,15 +9,23 @@ description: > (subclassed Array, length overridden with obj with valueOf) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - var o = { valueOf: function () { return 0;}}; - f.length = o; +function foo() {} +var f = new foo(); - var callCnt = 0; - function cb(){callCnt++} - var i = f.forEach(cb); +var o = { + valueOf: function() { + return 0; + } +}; +f.length = o; + +var callCnt = 0; + +function cb() { + callCnt++ +} +var i = f.forEach(cb); assert.sameValue(callCnt, 0, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-7.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-7.js index 941c6ee3fb..d08dadd7ac 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-7.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-7.js @@ -10,20 +10,28 @@ description: > (toString)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - var o = { toString: function () { return '0';}}; - f.length = o; +function foo() {} +var f = new foo(); - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - var callCnt = 0; - function cb(){callCnt++} - var i = f.forEach(cb); +var o = { + toString: function() { + return '0'; + } +}; +f.length = o; + +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. +var callCnt = 0; + +function cb() { + callCnt++ +} +var i = f.forEach(cb); assert.sameValue(callCnt, 0, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-8.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-8.js index acfa321f40..dee5abda64 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-8.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-8.js @@ -9,27 +9,31 @@ description: > (subclassed Array, length overridden with [] ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - f.length = []; +function foo() {} +var f = new foo(); - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. - var callCnt = 0; - function cb(){callCnt++} - var i = f.forEach(cb); +f.length = []; + +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. +// +// The toString( ) method on Array converts the array elements to strings, +// then returns the result of concatenating these strings, with commas in +// between. An array with no elements converts to the empty string, which +// converts to the number 0. If an array has a single element that is a +// number n, the array converts to a string representation of n, which is +// then converted back to n itself. If an array contains more than one element, +// or if its one element is not a number, the array converts to NaN. +var callCnt = 0; + +function cb() { + callCnt++ +} +var i = f.forEach(cb); assert.sameValue(callCnt, 0, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-9.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-9.js index 3e36453a42..2ce7678bf1 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-9.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-9.js @@ -9,28 +9,32 @@ description: > (subclassed Array, length overridden with [0] ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - f.length = [0]; +function foo() {} +var f = new foo(); - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. +f.length = [0]; - var callCnt = 0; - function cb(){callCnt++} - var i = f.forEach(cb); +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. +// +// The toString( ) method on Array converts the array elements to strings, +// then returns the result of concatenating these strings, with commas in +// between. An array with no elements converts to the empty string, which +// converts to the number 0. If an array has a single element that is a +// number n, the array converts to a string representation of n, which is +// then converted back to n itself. If an array contains more than one element, +// or if its one element is not a number, the array converts to NaN. + +var callCnt = 0; + +function cb() { + callCnt++ +} +var i = f.forEach(cb); assert.sameValue(callCnt, 0, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/S15.4.4.18_A1.js b/test/built-ins/Array/prototype/forEach/S15.4.4.18_A1.js index bdaef05035..0cfaf6ea8d 100644 --- a/test/built-ins/Array/prototype/forEach/S15.4.4.18_A1.js +++ b/test/built-ins/Array/prototype/forEach/S15.4.4.18_A1.js @@ -8,4 +8,6 @@ es5id: 15.4.4.18_A1 description: Freezes array.forEach during a forEach to see if it works ---*/ -['z'].forEach(function(){ Object.freeze(Array.prototype.forEach); }); +['z'].forEach(function() { + Object.freeze(Array.prototype.forEach); +}); diff --git a/test/built-ins/Array/prototype/forEach/S15.4.4.18_A2.js b/test/built-ins/Array/prototype/forEach/S15.4.4.18_A2.js index a95da06dda..c743d247ef 100644 --- a/test/built-ins/Array/prototype/forEach/S15.4.4.18_A2.js +++ b/test/built-ins/Array/prototype/forEach/S15.4.4.18_A2.js @@ -9,6 +9,8 @@ description: Freezes array.forEach during a forEach to see if it works ---*/ function foo() { - ['z'].forEach(function(){ Object.freeze(Array.prototype.forEach); }); + ['z'].forEach(function() { + Object.freeze(Array.prototype.forEach); + }); } foo(); diff --git a/test/built-ins/Array/prototype/includes/fromIndex-equal-or-greater-length-returns-false.js b/test/built-ins/Array/prototype/includes/fromIndex-equal-or-greater-length-returns-false.js index ebca5a0430..84bb4526d8 100644 --- a/test/built-ins/Array/prototype/includes/fromIndex-equal-or-greater-length-returns-false.js +++ b/test/built-ins/Array/prototype/includes/fromIndex-equal-or-greater-length-returns-false.js @@ -18,6 +18,6 @@ info: | 8. Return false. ---*/ -var sample = [ 7, 7, 7, 7 ]; +var sample = [7, 7, 7, 7]; assert.sameValue(sample.includes(7, 4), false, "length"); assert.sameValue(sample.includes(7, 5), false, "length + 1"); diff --git a/test/built-ins/Array/prototype/includes/search-not-found-returns-false.js b/test/built-ins/Array/prototype/includes/search-not-found-returns-false.js index 6d5393dbb7..7d98d2a68b 100644 --- a/test/built-ins/Array/prototype/includes/search-not-found-returns-false.js +++ b/test/built-ins/Array/prototype/includes/search-not-found-returns-false.js @@ -35,7 +35,9 @@ assert.sameValue([null].includes(undefined), false, "undefined"); assert.sameValue([Symbol("1")].includes(Symbol("1")), false, "symbol"); assert.sameValue([{}].includes({}), false, "object"); -assert.sameValue([[]].includes([]), false, "array"); +assert.sameValue([ + [] +].includes([]), false, "array"); var sample = [42]; assert.sameValue(sample.includes(sample), false, "this"); diff --git a/test/built-ins/Array/prototype/includes/sparse.js b/test/built-ins/Array/prototype/includes/sparse.js index bd272fe935..751c2c928e 100644 --- a/test/built-ins/Array/prototype/includes/sparse.js +++ b/test/built-ins/Array/prototype/includes/sparse.js @@ -21,18 +21,18 @@ info: | ---*/ assert.sameValue( - [ , , , ].includes(undefined), + [, , , ].includes(undefined), true, "[ , , , ].includes(undefined)" ); assert.sameValue( - [ , , , 42, ].includes(undefined, 4), + [, , , 42, ].includes(undefined, 4), false, "[ , , , 42, ].includes(undefined, 4)" ); -var sample = [ , , , 42, , ]; +var sample = [, , , 42, , ]; assert.sameValue( sample.includes(undefined), diff --git a/test/built-ins/Array/prototype/includes/tolength-length.js b/test/built-ins/Array/prototype/includes/tolength-length.js index a3c868474a..c1e82b9da5 100644 --- a/test/built-ins/Array/prototype/includes/tolength-length.js +++ b/test/built-ins/Array/prototype/includes/tolength-length.js @@ -72,8 +72,16 @@ assert.sameValue([].includes.call(obj, "a"), false, "false"); obj.length = true; assert.sameValue([].includes.call(obj, "a"), true, "true"); -obj.length = { valueOf: function() { return 2; } }; +obj.length = { + valueOf: function() { + return 2; + } +}; assert.sameValue([].includes.call(obj, "b"), true, "ordinary object.valueOf"); -obj.length = { toString: function() { return 2; } }; +obj.length = { + toString: function() { + return 2; + } +}; assert.sameValue([].includes.call(obj, "b"), true, "ordinary object.toString"); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-1.js index 1eb9ef72e0..ea9ca6068f 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-1.js @@ -9,5 +9,5 @@ description: Array.prototype.indexOf applied to undefined throws a TypeError assert.throws(TypeError, function() { - Array.prototype.indexOf.call(undefined); + Array.prototype.indexOf.call(undefined); }); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-10.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-10.js index 1a55202188..4622e10a06 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-10.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-10.js @@ -7,7 +7,7 @@ es5id: 15.4.4.14-1-10 description: Array.prototype.indexOf applied to the Math object ---*/ - Math[1] = true; - Math.length = 2; +Math[1] = true; +Math.length = 2; assert.sameValue(Array.prototype.indexOf.call(Math, true), 1, 'Array.prototype.indexOf.call(Math, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-11.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-11.js index bcb3b21ead..51d4a331e9 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-11.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-11.js @@ -7,8 +7,8 @@ es5id: 15.4.4.14-1-11 description: Array.prototype.indexOf applied to Date object ---*/ - var obj = new Date(); - obj.length = 2; - obj[1] = true; +var obj = new Date(); +obj.length = 2; +obj[1] = true; assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-12.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-12.js index c416b6e1b9..4c23949e9c 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-12.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-12.js @@ -7,8 +7,8 @@ es5id: 15.4.4.14-1-12 description: Array.prototype.indexOf applied to RegExp object ---*/ - var obj = new RegExp(); - obj.length = 2; - obj[1] = true; +var obj = new RegExp(); +obj.length = 2; +obj[1] = true; assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-13.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-13.js index c1ca787316..b339869a0a 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-13.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-13.js @@ -7,9 +7,9 @@ es5id: 15.4.4.14-1-13 description: Array.prototype.indexOf applied to the JSON object ---*/ - var targetObj = {}; +var targetObj = {}; - JSON[3] = targetObj; - JSON.length = 5; +JSON[3] = targetObj; +JSON.length = 5; assert.sameValue(Array.prototype.indexOf.call(JSON, targetObj), 3, 'Array.prototype.indexOf.call(JSON, targetObj)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-14.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-14.js index 6f116d5cee..06c02d8f18 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-14.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-14.js @@ -7,8 +7,8 @@ es5id: 15.4.4.14-1-14 description: Array.prototype.indexOf applied to Error object ---*/ - var obj = new SyntaxError(); - obj[1] = true; - obj.length = 2; +var obj = new SyntaxError(); +obj[1] = true; +obj.length = 2; assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-15.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-15.js index 7a6c9b7ca4..598ba594e1 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-15.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-15.js @@ -7,9 +7,9 @@ es5id: 15.4.4.14-1-15 description: Array.prototype.indexOf applied to Arguments object ---*/ - function fun() { - return arguments; - } - var obj = fun(1, true, 3); +function fun() { + return arguments; +} +var obj = fun(1, true, 3); assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-2.js index 5584d5f68f..5e348a54ec 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-2.js @@ -9,5 +9,5 @@ description: Array.prototype.indexOf applied to null throws a TypeError assert.throws(TypeError, function() { - Array.prototype.indexOf.call(null); + Array.prototype.indexOf.call(null); }); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-3.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-3.js index 510a693ed4..3bfe5e7a6e 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-3.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-3.js @@ -7,9 +7,9 @@ es5id: 15.4.4.14-1-3 description: Array.prototype.indexOf applied to boolean primitive ---*/ - var targetObj = {}; +var targetObj = {}; - Boolean.prototype[1] = targetObj; - Boolean.prototype.length = 2; +Boolean.prototype[1] = targetObj; +Boolean.prototype.length = 2; assert.sameValue(Array.prototype.indexOf.call(true, targetObj), 1, 'Array.prototype.indexOf.call(true, targetObj)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-4.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-4.js index 844e34af49..5f0dd9ed5f 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-4.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-4.js @@ -7,8 +7,8 @@ es5id: 15.4.4.14-1-4 description: Array.prototype.indexOf applied to Boolean Object ---*/ - var obj = new Boolean(false); - obj.length = 2; - obj[1] = true; +var obj = new Boolean(false); +obj.length = 2; +obj[1] = true; assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-5.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-5.js index ccca657760..4fa661c8b8 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-5.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-5.js @@ -7,9 +7,9 @@ es5id: 15.4.4.14-1-5 description: Array.prototype.indexOf applied to number primitive ---*/ - var targetObj = {}; +var targetObj = {}; - Number.prototype[1] = targetObj; - Number.prototype.length = 2; +Number.prototype[1] = targetObj; +Number.prototype.length = 2; assert.sameValue(Array.prototype.indexOf.call(5, targetObj), 1, 'Array.prototype.indexOf.call(5, targetObj)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-6.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-6.js index c6416ebe4e..928377959b 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-6.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-6.js @@ -7,8 +7,8 @@ es5id: 15.4.4.14-1-6 description: Array.prototype.indexOf applied to Number object ---*/ - var obj = new Number(-3); - obj.length = 2; - obj[1] = true; +var obj = new Number(-3); +obj.length = 2; +obj[1] = true; assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-8.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-8.js index 46575fb68d..eaa29361e3 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-8.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-8.js @@ -7,6 +7,6 @@ es5id: 15.4.4.14-1-8 description: Array.prototype.indexOf applied to String object ---*/ - var obj = new String("null"); +var obj = new String("null"); assert.sameValue(Array.prototype.indexOf.call(obj, 'l'), 2, 'Array.prototype.indexOf.call(obj, "l")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-9.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-9.js index 76d8e87c0b..065d31bc74 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-9.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-9.js @@ -7,9 +7,9 @@ es5id: 15.4.4.14-1-9 description: Array.prototype.indexOf applied to Function object ---*/ - var obj = function (a, b) { - return a + b; - }; - obj[1] = true; +var obj = function(a, b) { + return a + b; +}; +obj[1] = true; assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-10-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-10-1.js index c0d6c537ac..8a77b86f52 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-10-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-10-1.js @@ -9,13 +9,13 @@ description: > array ---*/ - var a = new Array(); - a[100] = 1; - a[99999] = ""; - a[10] = new Object(); - a[5555] = 5.5; - a[123456] = "str"; - a[5] = 1E+309; +var a = new Array(); +a[100] = 1; +a[99999] = ""; +a[10] = new Object(); +a[5555] = 5.5; +a[123456] = "str"; +a[5] = 1E+309; assert.sameValue(a.indexOf(1), 100, 'a.indexOf(1)'); assert.sameValue(a.indexOf(""), 99999, 'a.indexOf("")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-10-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-10-2.js index 124043c97f..fbb9268888 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-10-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-10-2.js @@ -9,12 +9,19 @@ description: > access any other properties ---*/ - var accessed = false; - var f = {length: 0}; - Object.defineProperty(f,"0",{get: function () {accessed = true; return 1;}}); +var accessed = false; +var f = { + length: 0 +}; +Object.defineProperty(f, "0", { + get: function() { + accessed = true; + return 1; + } +}); - var i = Array.prototype.indexOf.call(f,1); +var i = Array.prototype.indexOf.call(f, 1); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-1.js index 61dd7f2946..e14c28ba31 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-1.js @@ -9,8 +9,14 @@ description: > Array-like object ---*/ - var objOne = { 1: true, length: 2 }; - var objTwo = { 2: true, length: 2 }; +var objOne = { + 1: true, + length: 2 +}; +var objTwo = { + 2: true, + length: 2 +}; assert.sameValue(Array.prototype.indexOf.call(objOne, true), 1, 'Array.prototype.indexOf.call(objOne, true)'); assert.sameValue(Array.prototype.indexOf.call(objTwo, true), -1, 'Array.prototype.indexOf.call(objTwo, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-10.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-10.js index f4c6f0b83a..bde4a7b79b 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-10.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-10.js @@ -7,21 +7,21 @@ es5id: 15.4.4.14-2-10 description: Array.prototype.indexOf - 'length' is inherited accessor property ---*/ - var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 2; - }, - configurable: true - }); +var proto = {}; +Object.defineProperty(proto, "length", { + get: function() { + return 2; + }, + configurable: true +}); - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var childOne = new Con(); - childOne[1] = true; - var childTwo = new Con(); - childTwo[2] = true; +var childOne = new Con(); +childOne[1] = true; +var childTwo = new Con(); +childTwo[2] = true; assert.sameValue(Array.prototype.indexOf.call(childOne, true), 1, 'Array.prototype.indexOf.call(childOne, true)'); assert.sameValue(Array.prototype.indexOf.call(childTwo, true), -1, 'Array.prototype.indexOf.call(childTwo, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-11.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-11.js index bb89914e0b..d5d473e994 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-11.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-11.js @@ -9,10 +9,12 @@ description: > without a get function ---*/ - var obj = { 1: true }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); +var obj = { + 1: true +}; +Object.defineProperty(obj, "length", { + set: function() {}, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(obj, true), -1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-12.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-12.js index ff9ac06df0..205d52fbe5 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-12.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-12.js @@ -10,17 +10,19 @@ description: > property ---*/ - Object.defineProperty(Object.prototype, "length", { - get: function () { - return 20; - }, - configurable: true - }); +Object.defineProperty(Object.prototype, "length", { + get: function() { + return 20; + }, + configurable: true +}); - var obj = { 1: 1 }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); +var obj = { + 1: 1 +}; +Object.defineProperty(obj, "length", { + set: function() {}, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(obj, 1), -1, 'Array.prototype.indexOf.call(obj, 1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-13.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-13.js index 6aa17ff1ea..833c45d701 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-13.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-13.js @@ -9,16 +9,16 @@ description: > without a get function ---*/ - var proto = {}; - Object.defineProperty(proto, "length", { - set: function () { }, - configurable: true - }); +var proto = {}; +Object.defineProperty(proto, "length", { + set: function() {}, + configurable: true +}); - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[1] = true; +var child = new Con(); +child[1] = true; assert.sameValue(Array.prototype.indexOf.call(child, true), -1, 'Array.prototype.indexOf.call(child, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-14.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-14.js index 6ffd345dbe..8807657e82 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-14.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-14.js @@ -7,6 +7,9 @@ es5id: 15.4.4.14-2-14 description: Array.prototype.indexOf - 'length' is undefined property ---*/ - var obj = { 0: true, 1: true }; +var obj = { + 0: true, + 1: true +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), -1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-17.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-17.js index 2df7594957..cce214933d 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-17.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-17.js @@ -9,10 +9,10 @@ description: > implements its own property get method ---*/ - var func = function (a, b) { - arguments[2] = false; - return Array.prototype.indexOf.call(arguments, true) === 1 && - Array.prototype.indexOf.call(arguments, false) === -1; - }; +var func = function(a, b) { + arguments[2] = false; + return Array.prototype.indexOf.call(arguments, true) === 1 && + Array.prototype.indexOf.call(arguments, false) === -1; +}; assert(func(0, true), 'func(0, true) !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-18.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-18.js index e48cb33de8..e739dd81a1 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-18.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-18.js @@ -9,9 +9,9 @@ description: > its own property get method ---*/ - var str = new String("012"); +var str = new String("012"); - String.prototype[3] = "3"; +String.prototype[3] = "3"; assert.sameValue(Array.prototype.indexOf.call(str, "2"), 2, 'Array.prototype.indexOf.call(str, "2")'); assert.sameValue(Array.prototype.indexOf.call(str, "3"), -1, 'Array.prototype.indexOf.call(str, "3")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-19.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-19.js index 09bb09dd3a..b5735739ff 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-19.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-19.js @@ -9,11 +9,11 @@ description: > implements its own property get method ---*/ - var obj = function (a, b) { - return a + b; - }; - obj[1] = "b"; - obj[2] = "c"; +var obj = function(a, b) { + return a + b; +}; +obj[1] = "b"; +obj[2] = "c"; assert.sameValue(Array.prototype.indexOf.call(obj, obj[1]), 1, 'Array.prototype.indexOf.call(obj, obj[1])'); assert.sameValue(Array.prototype.indexOf.call(obj, obj[2]), -1, 'Array.prototype.indexOf.call(obj, obj[2])'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-2.js index d1fb4b7bb6..9fba718211 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-2.js @@ -7,9 +7,9 @@ es5id: 15.4.4.14-2-2 description: Array.prototype.indexOf - 'length' is own data property on an Array ---*/ - var targetObj = {}; +var targetObj = {}; - Array.prototype[2] = targetObj; +Array.prototype[2] = targetObj; assert.sameValue([0, targetObj].indexOf(targetObj), 1, '[0, targetObj].indexOf(targetObj)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-3.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-3.js index c0c72be3b0..db7ecfe839 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-3.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-3.js @@ -9,13 +9,15 @@ description: > overrides an inherited data property on an Array-like object ---*/ - var proto = { length: 0 }; +var proto = { + length: 0 +}; - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 2; - child[1] = true; +var child = new Con(); +child.length = 2; +child[1] = true; assert.sameValue(Array.prototype.indexOf.call(child, true), 1, 'Array.prototype.indexOf.call(child, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-4.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-4.js index 5a4f6f2386..dfc01cd8d7 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-4.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-4.js @@ -9,10 +9,10 @@ description: > overrides an inherited data property on an Array ---*/ - var targetObj = {}; - var arrProtoLen; +var targetObj = {}; +var arrProtoLen; - arrProtoLen = Array.prototype.length; - Array.prototype.length = 0; +arrProtoLen = Array.prototype.length; +Array.prototype.length = 0; assert.sameValue([0, targetObj].indexOf(targetObj), 1, '[0, targetObj].indexOf(targetObj)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-5.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-5.js index 8c5523964a..0f3909236c 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-5.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-5.js @@ -9,23 +9,23 @@ description: > overrides an inherited accessor property on an Array-like object ---*/ - var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 0; - }, - configurable: true - }); +var proto = {}; +Object.defineProperty(proto, "length", { + get: function() { + return 0; + }, + configurable: true +}); - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); +var child = new Con(); - Object.defineProperty(child, "length", { - value: 2, - configurable: true - }); - child[1] = true; +Object.defineProperty(child, "length", { + value: 2, + configurable: true +}); +child[1] = true; assert.sameValue(Array.prototype.indexOf.call(child, true), 1, 'Array.prototype.indexOf.call(child, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-6.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-6.js index 39788558ae..79269969a1 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-6.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-6.js @@ -7,15 +7,17 @@ es5id: 15.4.4.14-2-6 description: Array.prototype.indexOf - 'length' is an inherited data property ---*/ - var proto = { length: 2 }; +var proto = { + length: 2 +}; - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var childOne = new Con(); - childOne[1] = true; - var childTwo = new Con(); - childTwo[2] = true; +var childOne = new Con(); +childOne[1] = true; +var childTwo = new Con(); +childTwo[2] = true; assert.sameValue(Array.prototype.indexOf.call(childOne, true), 1, 'Array.prototype.indexOf.call(childOne, true)'); assert.sameValue(Array.prototype.indexOf.call(childTwo, true), -1, 'Array.prototype.indexOf.call(childTwo, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-7.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-7.js index 975a8673ab..6a0ec25878 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-7.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-7.js @@ -7,20 +7,24 @@ es5id: 15.4.4.14-2-7 description: Array.prototype.indexOf - 'length' is own accessor property ---*/ - var objOne = { 1: true }; - var objTwo = { 2: true }; - Object.defineProperty(objOne, "length", { - get: function () { - return 2; - }, - configurable: true - }); - Object.defineProperty(objTwo, "length", { - get: function () { - return 2; - }, - configurable: true - }); +var objOne = { + 1: true +}; +var objTwo = { + 2: true +}; +Object.defineProperty(objOne, "length", { + get: function() { + return 2; + }, + configurable: true +}); +Object.defineProperty(objTwo, "length", { + get: function() { + return 2; + }, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(objOne, true), 1, 'Array.prototype.indexOf.call(objOne, true)'); assert.sameValue(Array.prototype.indexOf.call(objTwo, true), -1, 'Array.prototype.indexOf.call(objTwo, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-8.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-8.js index 92bf58f7ab..8ad55630ea 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-8.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-8.js @@ -9,19 +9,21 @@ description: > overrides an inherited data property ---*/ - var proto = { length: 0 }; +var proto = { + length: 0 +}; - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[1] = true; +var child = new Con(); +child[1] = true; - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(child, "length", { + get: function() { + return 2; + }, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(child, true), 1, 'Array.prototype.indexOf.call(child, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-9.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-9.js index 5ec60e0581..2bf8c82efe 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-9.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-9.js @@ -9,25 +9,25 @@ description: > overrides an inherited accessor property ---*/ - var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 0; - }, - configurable: true - }); +var proto = {}; +Object.defineProperty(proto, "length", { + get: function() { + return 0; + }, + configurable: true +}); - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[1] = true; +var child = new Con(); +child[1] = true; - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(child, "length", { + get: function() { + return 2; + }, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(child, true), 1, 'Array.prototype.indexOf.call(child, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-1.js index 528bb1f489..0787c3a9c4 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-1.js @@ -7,6 +7,10 @@ es5id: 15.4.4.14-3-1 description: Array.prototype.indexOf - value of 'length' is undefined ---*/ - var obj = { 0: 1, 1: 1, length: undefined }; +var obj = { + 0: 1, + 1: 1, + length: undefined +}; assert.sameValue(Array.prototype.indexOf.call(obj, 1), -1, 'Array.prototype.indexOf.call(obj, 1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-10.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-10.js index 2d422228ca..503c2206df 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-10.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-10.js @@ -9,6 +9,9 @@ description: > (value is NaN) ---*/ - var obj = { 0: 0, length: NaN }; +var obj = { + 0: 0, + length: NaN +}; assert.sameValue(Array.prototype.indexOf.call(obj, 0), -1, 'Array.prototype.indexOf.call(obj, 0)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-11.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-11.js index dbccc238b9..9914d8d78c 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-11.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-11.js @@ -9,7 +9,11 @@ description: > positive number ---*/ - var obj = { 1: 1, 2: 2, length: "2" }; +var obj = { + 1: 1, + 2: 2, + length: "2" +}; assert.sameValue(Array.prototype.indexOf.call(obj, 1), 1, 'Array.prototype.indexOf.call(obj, 1)'); assert.sameValue(Array.prototype.indexOf.call(obj, 2), -1, 'Array.prototype.indexOf.call(obj, 2)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-12.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-12.js index c147d93553..edc04e60cb 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-12.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-12.js @@ -9,7 +9,11 @@ description: > negative number ---*/ - var obj = { 1: "true", 2: "2", length: "-4294967294" }; +var obj = { + 1: "true", + 2: "2", + length: "-4294967294" +}; assert.sameValue(Array.prototype.indexOf.call(obj, "true"), -1, 'Array.prototype.indexOf.call(obj, "true")'); assert.sameValue(Array.prototype.indexOf.call(obj, "2"), -1, 'Array.prototype.indexOf.call(obj, "2")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-13.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-13.js index d2ff4af50f..0b2ea6bb6d 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-13.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-13.js @@ -9,7 +9,11 @@ description: > decimal number ---*/ - var obj = { 199: true, 200: "200.59", length: "200.59" }; +var obj = { + 199: true, + 200: "200.59", + length: "200.59" +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), 199, 'Array.prototype.indexOf.call(obj, true)'); assert.sameValue(Array.prototype.indexOf.call(obj, "200.59"), -1, 'Array.prototype.indexOf.call(obj, "200.59")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-14.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-14.js index f37712cf31..ec4c578d21 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-14.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-14.js @@ -9,9 +9,21 @@ description: > +/-Infinity ---*/ - var objOne = { 0: true, 1: true, length: "Infinity" }; - var objTwo = { 0: true, 1: true, length: "+Infinity" }; - var objThree = { 0: true, 1: true, length: "-Infinity" }; +var objOne = { + 0: true, + 1: true, + length: "Infinity" +}; +var objTwo = { + 0: true, + 1: true, + length: "+Infinity" +}; +var objThree = { + 0: true, + 1: true, + length: "-Infinity" +}; assert.sameValue(Array.prototype.indexOf.call(objOne, true), 0, 'Array.prototype.indexOf.call(objOne, true)'); assert.sameValue(Array.prototype.indexOf.call(objTwo, true), 0, 'Array.prototype.indexOf.call(objTwo, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-15.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-15.js index e35a97c2cd..2bf0dd8b2b 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-15.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-15.js @@ -9,7 +9,11 @@ description: > exponential number ---*/ - var obj = { 1: true, 2: "2E0", length: "2E0" }; +var obj = { + 1: true, + 2: "2E0", + length: "2E0" +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); assert.sameValue(Array.prototype.indexOf.call(obj, "2E0"), -1, 'Array.prototype.indexOf.call(obj, "2E0")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-16.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-16.js index adc6ff83a4..c3cd2c458f 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-16.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-16.js @@ -9,7 +9,11 @@ description: > number ---*/ - var obj = { 10: true, 11: "0x00B", length: "0x00B" }; +var obj = { + 10: true, + 11: "0x00B", + length: "0x00B" +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), 10, 'Array.prototype.indexOf.call(obj, true)'); assert.sameValue(Array.prototype.indexOf.call(obj, "0x00B"), -1, 'Array.prototype.indexOf.call(obj, "0x00B")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-17.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-17.js index 3f5d9a1735..66bb812c35 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-17.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-17.js @@ -9,7 +9,11 @@ description: > with leading zeros ---*/ - var obj = { 1: true, 2: "0002.0", length: "0002.0" }; +var obj = { + 1: true, + 2: "0002.0", + length: "0002.0" +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); assert.sameValue(Array.prototype.indexOf.call(obj, "0002.0"), -1, 'Array.prototype.indexOf.call(obj, "0002.0")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-18.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-18.js index 71c052c5bf..382df40af8 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-18.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-18.js @@ -9,6 +9,10 @@ description: > convert to a number ---*/ - var obj = { 0: true, 100: true, length: "one" }; +var obj = { + 0: true, + 100: true, + length: "one" +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), -1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-19.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-19.js index 17a3c545ac..b770f05777 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-19.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-19.js @@ -9,22 +9,22 @@ description: > an own toString method. ---*/ - // objects inherit the default valueOf() method from Object - // that simply returns itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. +// objects inherit the default valueOf() method from Object +// that simply returns itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. - var obj = { - 1: true, - 2: 2, +var obj = { + 1: true, + 2: 2, - length: { - toString: function () { - return '2'; - } - } - }; + length: { + toString: function() { + return '2'; + } + } +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); assert.sameValue(Array.prototype.indexOf.call(obj, 2), -1, 'Array.prototype.indexOf.call(obj, 2)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-2.js index 8cfa825b89..a645ce3b0b 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-2.js @@ -9,7 +9,11 @@ description: > (value is true) ---*/ - var obj = { 0: 0, 1: 1, length: true }; +var obj = { + 0: 0, + 1: 1, + length: true +}; assert.sameValue(Array.prototype.indexOf.call(obj, 0), 0, 'Array.prototype.indexOf.call(obj, 0)'); assert.sameValue(Array.prototype.indexOf.call(obj, 1), -1, 'Array.prototype.indexOf.call(obj, 1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-20.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-20.js index 3479154f06..6c9c56ff27 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-20.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-20.js @@ -9,16 +9,16 @@ description: > an own valueOf method. ---*/ - //valueOf method will be invoked first, since hint is Number - var obj = { - 1: true, - 2: 2, - length: { - valueOf: function () { - return 2; - } - } - }; +//valueOf method will be invoked first, since hint is Number +var obj = { + 1: true, + 2: 2, + length: { + valueOf: function() { + return 2; + } + } +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); assert.sameValue(Array.prototype.indexOf.call(obj, 2), -1, 'Array.prototype.indexOf.call(obj, 2)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-21.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-21.js index a9ad676ad9..f1de649c87 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-21.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-21.js @@ -10,23 +10,23 @@ description: > returns a string ---*/ - var toStringAccessed = false; - var valueOfAccessed = false; +var toStringAccessed = false; +var valueOfAccessed = false; - var obj = { - 1: true, - length: { - toString: function () { - toStringAccessed = true; - return '2'; - }, +var obj = { + 1: true, + length: { + toString: function() { + toStringAccessed = true; + return '2'; + }, - valueOf: function () { - valueOfAccessed = true; - return {}; - } - } - }; + valueOf: function() { + valueOfAccessed = true; + return {}; + } + } +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); assert(toStringAccessed, 'toStringAccessed !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-22.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-22.js index 5cb92837cb..ad43241289 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-22.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-22.js @@ -10,25 +10,25 @@ description: > primitive values ---*/ - var toStringAccessed = false; - var valueOfAccessed = false; +var toStringAccessed = false; +var valueOfAccessed = false; - var obj = { - length: { - toString: function () { - toStringAccessed = true; - return {}; - }, +var obj = { + length: { + toString: function() { + toStringAccessed = true; + return {}; + }, - valueOf: function () { - valueOfAccessed = true; - return {}; - } - } - }; + valueOf: function() { + valueOfAccessed = true; + return {}; + } + } +}; assert.throws(TypeError, function() { - Array.prototype.indexOf.call(obj); + Array.prototype.indexOf.call(obj); }); assert(toStringAccessed, 'toStringAccessed'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-23.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-23.js index 5b30d00cf6..a87a044d5f 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-23.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-23.js @@ -10,29 +10,29 @@ description: > methods ---*/ - var toStringAccessed = false; - var valueOfAccessed = false; +var toStringAccessed = false; +var valueOfAccessed = false; - var proto = { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - }; +var proto = { + valueOf: function() { + valueOfAccessed = true; + return 2; + } +}; - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.toString = function () { - toStringAccessed = true; - return 2; - }; +var child = new Con(); +child.toString = function() { + toStringAccessed = true; + return 2; +}; - var obj = { - 1: true, - length: child - }; +var obj = { + 1: true, + length: child +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); assert(valueOfAccessed, 'valueOfAccessed !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-24.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-24.js index 539f8d669d..109eca9ec1 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-24.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-24.js @@ -9,7 +9,11 @@ description: > non-integer, ensure truncation occurs in the proper direction ---*/ - var obj = { 122: true, 123: false, length: 123.321 }; //length will be 123 finally +var obj = { + 122: true, + 123: false, + length: 123.321 +}; //length will be 123 finally assert.sameValue(Array.prototype.indexOf.call(obj, true), 122, 'Array.prototype.indexOf.call(obj, true)'); assert.sameValue(Array.prototype.indexOf.call(obj, false), -1, 'Array.prototype.indexOf.call(obj, false)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-25.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-25.js index 4e275b17fb..d1c35a4858 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-25.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-25.js @@ -9,7 +9,11 @@ description: > non-integer ---*/ - var obj = { 1: true, 2: false, length: -4294967294.5 }; //length will be 0 finally +var obj = { + 1: true, + 2: false, + length: -4294967294.5 +}; //length will be 0 finally assert.sameValue(Array.prototype.indexOf.call(obj, true), -1, 'Array.prototype.indexOf.call(obj, true)'); assert.sameValue(Array.prototype.indexOf.call(obj, false), -1, 'Array.prototype.indexOf.call(obj, false)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-28.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-28.js index 62702eed76..b6f651f695 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-28.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-28.js @@ -9,12 +9,12 @@ description: > (2^32) ---*/ - var targetObj = {}; - var obj = { - 0: targetObj, - 4294967294: targetObj, - 4294967295: targetObj, - length: 4294967296 - }; +var targetObj = {}; +var obj = { + 0: targetObj, + 4294967294: targetObj, + 4294967295: targetObj, + length: 4294967296 +}; assert.sameValue(Array.prototype.indexOf.call(obj, targetObj), 0, 'Array.prototype.indexOf.call(obj, targetObj)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-29.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-29.js index 23bb38ae78..41298b8a34 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-29.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-29.js @@ -9,12 +9,12 @@ description: > (2^32 + 1) ---*/ - var targetObj = {}; - var obj = { - 0: targetObj, - 1: 4294967297, - length: 4294967297 - }; +var targetObj = {}; +var obj = { + 0: targetObj, + 1: 4294967297, + length: 4294967297 +}; assert.sameValue(Array.prototype.indexOf.call(obj, targetObj), 0, 'Array.prototype.indexOf.call(obj, targetObj)'); assert.sameValue(Array.prototype.indexOf.call(obj, 4294967297), 1, 'Array.prototype.indexOf.call(obj, 4294967297)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-3.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-3.js index 83c239e170..2db8c77fc6 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-3.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-3.js @@ -9,6 +9,9 @@ description: > 0) ---*/ - var obj = { 0: true, length: 0 }; +var obj = { + 0: true, + length: 0 +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), -1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-4.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-4.js index e2dc4190fa..c2f4f22c83 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-4.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-4.js @@ -9,6 +9,9 @@ description: > +0) ---*/ - var obj = { 0: true, length: +0 }; +var obj = { + 0: true, + length: +0 +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), -1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-5.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-5.js index 6fccac8750..4ca356c5f9 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-5.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-5.js @@ -9,6 +9,9 @@ description: > -0) ---*/ - var obj = { 0: true, length: -0 }; +var obj = { + 0: true, + length: -0 +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), -1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-6.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-6.js index 50cc7c262c..841c6b02ed 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-6.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-6.js @@ -9,7 +9,11 @@ description: > positive) ---*/ - var obj = { 3: true, 4: false, length: 4 }; +var obj = { + 3: true, + 4: false, + length: 4 +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), 3, 'Array.prototype.indexOf.call(obj, true)'); assert.sameValue(Array.prototype.indexOf.call(obj, false), -1, 'Array.prototype.indexOf.call(obj, false)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-7.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-7.js index 1ff3602c0b..bbc47c9817 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-7.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-7.js @@ -9,7 +9,11 @@ description: > negative) ---*/ - var obj = { 4: true, 5: false, length: 5 - Math.pow(2, 32) }; +var obj = { + 4: true, + 5: false, + length: 5 - Math.pow(2, 32) +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), -1, 'Array.prototype.indexOf.call(obj, true)'); assert.sameValue(Array.prototype.indexOf.call(obj, false), -1, 'Array.prototype.indexOf.call(obj, false)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-8.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-8.js index c7873e9ee7..b7ffedc0c6 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-8.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-8.js @@ -9,6 +9,9 @@ description: > Infinity) ---*/ - var obj = { 0: 0, length: Infinity }; +var obj = { + 0: 0, + length: Infinity +}; assert.sameValue(Array.prototype.indexOf.call(obj, 0), 0, 'Array.prototype.indexOf.call(obj, 0)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-9.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-9.js index faf4a227c4..00fafbc745 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-9.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-9.js @@ -9,6 +9,9 @@ description: > -Infinity) ---*/ - var obj = { 0: 0, length: -Infinity }; +var obj = { + 0: 0, + length: -Infinity +}; assert.sameValue(Array.prototype.indexOf.call(obj, 0), -1, 'Array.prototype.indexOf.call(obj, 0)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-1.js index 5b6a62eb99..7f753d7855 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-1.js @@ -7,6 +7,6 @@ es5id: 15.4.4.14-4-1 description: Array.prototype.indexOf returns -1 if 'length' is 0 (empty array) ---*/ - var i = [].indexOf(42); +var i = [].indexOf(42); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-10.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-10.js index 6af3e10a85..47a90a2287 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-10.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-10.js @@ -7,7 +7,11 @@ es5id: 15.4.4.14-4-10 description: Array.prototype.indexOf - 'length' is a number of value -6e-1 ---*/ - var targetObj = []; - var obj = { 0: targetObj, 100: targetObj, length: -6e-1 }; +var targetObj = []; +var obj = { + 0: targetObj, + 100: targetObj, + length: -6e-1 +}; assert.sameValue(Array.prototype.indexOf.call(obj, targetObj), -1, 'Array.prototype.indexOf.call(obj, targetObj)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-11.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-11.js index 3410cb85c8..94da778486 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-11.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-11.js @@ -7,7 +7,11 @@ es5id: 15.4.4.14-4-11 description: Array.prototype.indexOf - 'length' is an empty string ---*/ - var targetObj = []; - var obj = { 0: targetObj, 100: targetObj, length: "" }; +var targetObj = []; +var obj = { + 0: targetObj, + 100: targetObj, + length: "" +}; assert.sameValue(Array.prototype.indexOf.call(obj, targetObj), -1, 'Array.prototype.indexOf.call(obj, targetObj)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-2.js index 485bcf04e6..e39faf7b10 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-2.js @@ -9,7 +9,9 @@ description: > overridden to null (type conversion)) ---*/ - var i = Array.prototype.indexOf.call({length: null}, 1); +var i = Array.prototype.indexOf.call({ + length: null +}, 1); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-3.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-3.js index 535a46c8e1..ccca42340f 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-3.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-3.js @@ -9,7 +9,9 @@ description: > overridden to false (type conversion)) ---*/ - var i = Array.prototype.indexOf.call({length: false}, 1); +var i = Array.prototype.indexOf.call({ + length: false +}, 1); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-4.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-4.js index c614ca9385..d665e97c1f 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-4.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-4.js @@ -9,7 +9,9 @@ description: > 'array' with length 0 ) ---*/ - var i = Array.prototype.lastIndexOf.call({length: 0}, 1); +var i = Array.prototype.lastIndexOf.call({ + length: 0 +}, 1); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-5.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-5.js index 5951225794..7cd825ba8d 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-5.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-5.js @@ -9,7 +9,9 @@ description: > overridden to '0' (type conversion)) ---*/ - var i = Array.prototype.indexOf.call({length: '0'}, 1); +var i = Array.prototype.indexOf.call({ + length: '0' +}, 1); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-6.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-6.js index 365da0c371..bdb5f01fa1 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-6.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-6.js @@ -9,7 +9,13 @@ description: > Array, length overridden with obj with valueOf) ---*/ - var i = Array.prototype.indexOf.call({length: { valueOf: function () { return 0;}}}, 1); +var i = Array.prototype.indexOf.call({ + length: { + valueOf: function() { + return 0; + } + } +}, 1); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-7.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-7.js index ed4cf98947..c6c14d7736 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-7.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-7.js @@ -9,12 +9,18 @@ description: > object overridden with obj w/o valueOf (toString)) ---*/ - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - var i = Array.prototype.indexOf.call({length: { toString: function () { return '0';}}}, 1); +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. +var i = Array.prototype.indexOf.call({ + length: { + toString: function() { + return '0'; + } + } +}, 1); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-8.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-8.js index 04ad4c7fb6..2c863ea490 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-8.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-8.js @@ -9,20 +9,22 @@ description: > empty array) ---*/ - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. - var i = Array.prototype.indexOf.call({length: [ ]}, 1); +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. +// +// The toString( ) method on Array converts the array elements to strings, +// then returns the result of concatenating these strings, with commas in +// between. An array with no elements converts to the empty string, which +// converts to the number 0. If an array has a single element that is a +// number n, the array converts to a string representation of n, which is +// then converted back to n itself. If an array contains more than one element, +// or if its one element is not a number, the array converts to NaN. +var i = Array.prototype.indexOf.call({ + length: [] +}, 1); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-9.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-9.js index e90ce2e4c9..b64c1213aa 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-9.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-9.js @@ -7,7 +7,11 @@ es5id: 15.4.4.14-4-9 description: Array.prototype.indexOf - 'length' is a number of value 0.1 ---*/ - var targetObj = []; - var obj = { 0: targetObj, 100: targetObj, length: 0.1 }; +var targetObj = []; +var obj = { + 0: targetObj, + 100: targetObj, + length: 0.1 +}; assert.sameValue(Array.prototype.indexOf.call(obj, targetObj), -1, 'Array.prototype.indexOf.call(obj, targetObj)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-1.js index 146456dbab..bfb7c07cdf 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-1.js @@ -7,7 +7,7 @@ es5id: 15.4.4.14-5-1 description: Array.prototype.indexOf when fromIndex is string ---*/ - var a = [1,2,1,2,1,2]; +var a = [1, 2, 1, 2, 1, 2]; -assert.sameValue(a.indexOf(2,"2"), 3, '"2" resolves to 2'); -assert.sameValue(a.indexOf(2,"one"), 1, '"one" resolves to 0'); +assert.sameValue(a.indexOf(2, "2"), 3, '"2" resolves to 2'); +assert.sameValue(a.indexOf(2, "one"), 1, '"one" resolves to 0'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-10.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-10.js index 7c006a5d04..4ec2ce2a05 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-10.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-10.js @@ -9,7 +9,7 @@ description: > is positive number) ---*/ - var targetObj = {}; +var targetObj = {}; assert.sameValue([0, targetObj, 2].indexOf(targetObj, 2), -1, '[0, targetObj, 2].indexOf(targetObj, 2)'); assert.sameValue([0, 1, targetObj].indexOf(targetObj, 2), 2, '[0, 1, targetObj].indexOf(targetObj, 2)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-11.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-11.js index e8dccbd1d9..873dcea190 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-11.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-11.js @@ -9,7 +9,7 @@ description: > is negative number) ---*/ - var targetObj = {}; +var targetObj = {}; assert.sameValue([0, targetObj, 2].indexOf(targetObj, -1), -1, '[0, targetObj, 2].indexOf(targetObj, -1)'); assert.sameValue([0, 1, targetObj].indexOf(targetObj, -1), 2, '[0, 1, targetObj].indexOf(targetObj, -1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-12.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-12.js index dbdc234eb5..ef4baf22eb 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-12.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-12.js @@ -9,7 +9,7 @@ description: > is Infinity) ---*/ - var arr = []; - arr[Math.pow(2, 32) - 2] = true; //length is the max value of Uint type +var arr = []; +arr[Math.pow(2, 32) - 2] = true; //length is the max value of Uint type assert.sameValue(arr.indexOf(true, Infinity), -1, 'arr.indexOf(true, Infinity)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-16.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-16.js index 68e8cbe5fe..6f9afde36a 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-16.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-16.js @@ -9,7 +9,7 @@ description: > containing Infinity ---*/ - var arr = []; - arr[Math.pow(2, 32) - 2] = true; //length is the max value of Uint type +var arr = []; +arr[Math.pow(2, 32) - 2] = true; //length is the max value of Uint type assert.sameValue(arr.indexOf(true, "Infinity"), -1, 'arr.indexOf(true, "Infinity")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-18.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-18.js index 7729f74b5f..66bfabd2fa 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-18.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-18.js @@ -9,7 +9,7 @@ description: > containing an exponential number ---*/ - var targetObj = {}; +var targetObj = {}; assert.sameValue([0, 1, targetObj, 3, 4].indexOf(targetObj, "3E0"), -1, '[0, 1, targetObj, 3, 4].indexOf(targetObj, "3E0")'); assert.sameValue([0, 1, 2, targetObj, 4].indexOf(targetObj, "3E0"), 3, '[0, 1, 2, targetObj, 4].indexOf(targetObj, "3E0")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-19.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-19.js index ef2936fb7b..123b1304f7 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-19.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-19.js @@ -9,7 +9,7 @@ description: > containing a hex number ---*/ - var targetObj = {}; +var targetObj = {}; assert.sameValue([0, 1, targetObj, 3, 4].indexOf(targetObj, "0x0003"), -1, '[0, 1, targetObj, 3, 4].indexOf(targetObj, "0x0003")'); assert.sameValue([0, 1, 2, targetObj, 4].indexOf(targetObj, "0x0003"), 3, '[0, 1, 2, targetObj, 4].indexOf(targetObj, "0x0003")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-2.js index 6fbcc5ced6..092e4127f6 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-2.js @@ -7,8 +7,8 @@ es5id: 15.4.4.14-5-2 description: Array.prototype.indexOf when fromIndex is floating point number ---*/ - var a = new Array(1,2,3); +var a = new Array(1, 2, 3); -assert.sameValue(a.indexOf(3,0.49), 2, '0.49 resolves to 0'); -assert.sameValue(a.indexOf(1,0.51), 0, '0.51 resolves to 0'); -assert.sameValue(a.indexOf(1,1.51), -1, '1.51 resolves to 1'); +assert.sameValue(a.indexOf(3, 0.49), 2, '0.49 resolves to 0'); +assert.sameValue(a.indexOf(1, 0.51), 0, '0.51 resolves to 0'); +assert.sameValue(a.indexOf(1, 1.51), -1, '1.51 resolves to 1'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-20.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-20.js index 0471343e27..106b630ba1 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-20.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-20.js @@ -9,7 +9,7 @@ description: > containing a number with leading zeros ---*/ - var targetObj = {}; +var targetObj = {}; assert.sameValue([0, 1, targetObj, 3, 4].indexOf(targetObj, "0003.10"), -1, '[0, 1, targetObj, 3, 4].indexOf(targetObj, "0003.10")'); assert.sameValue([0, 1, 2, targetObj, 4].indexOf(targetObj, "0003.10"), 3, '[0, 1, 2, targetObj, 4].indexOf(targetObj, "0003.10")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-21.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-21.js index 05fbacd4df..887de235ac 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-21.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-21.js @@ -9,15 +9,15 @@ description: > has an own toString method ---*/ - // objects inherit the default valueOf() method from Object - // that simply returns itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - var fromIndex = { - toString: function () { - return '1'; - } - }; +// objects inherit the default valueOf() method from Object +// that simply returns itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. +var fromIndex = { + toString: function() { + return '1'; + } +}; assert.sameValue([0, true].indexOf(true, fromIndex), 1, '[0, true].indexOf(true, fromIndex)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-22.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-22.js index 21bb6b03a7..e1ed131978 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-22.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-22.js @@ -9,11 +9,11 @@ description: > has an own valueOf method ---*/ - var fromIndex = { - valueOf: function () { - return 1; - } - }; +var fromIndex = { + valueOf: function() { + return 1; + } +}; assert.sameValue([0, true].indexOf(true, fromIndex), 1, '[0, true].indexOf(true, fromIndex)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-23.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-23.js index 64f186fc81..8bfad2363f 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-23.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-23.js @@ -10,20 +10,20 @@ description: > method that returns a string ---*/ - var toStringAccessed = false; - var valueOfAccessed = false; +var toStringAccessed = false; +var valueOfAccessed = false; - var fromIndex = { - toString: function () { - toStringAccessed = true; - return '1'; - }, +var fromIndex = { + toString: function() { + toStringAccessed = true; + return '1'; + }, - valueOf: function () { - valueOfAccessed = true; - return {}; - } - }; + valueOf: function() { + valueOfAccessed = true; + return {}; + } +}; assert.sameValue([0, true].indexOf(true, fromIndex), 1, '[0, true].indexOf(true, fromIndex)'); assert(toStringAccessed, 'toStringAccessed !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-24.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-24.js index 3f83428a20..881197259d 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-24.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-24.js @@ -10,22 +10,22 @@ description: > don�t return primitive values ---*/ - var toStringAccessed = false; - var valueOfAccessed = false; - var fromIndex = { - toString: function () { - toStringAccessed = true; - return {}; - }, +var toStringAccessed = false; +var valueOfAccessed = false; +var fromIndex = { + toString: function() { + toStringAccessed = true; + return {}; + }, - valueOf: function () { - valueOfAccessed = true; - return {}; - } - }; + valueOf: function() { + valueOfAccessed = true; + return {}; + } +}; assert.throws(TypeError, function() { - [0, true].indexOf(true, fromIndex); + [0, true].indexOf(true, fromIndex); }); assert(toStringAccessed, 'toStringAccessed'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-25.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-25.js index a8139b7512..f3943fc490 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-25.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-25.js @@ -10,24 +10,24 @@ description: > valueOf methods ---*/ - var toStringAccessed = false; - var valueOfAccessed = false; +var toStringAccessed = false; +var valueOfAccessed = false; - var proto = { - valueOf: function () { - valueOfAccessed = true; - return 1; - } - }; +var proto = { + valueOf: function() { + valueOfAccessed = true; + return 1; + } +}; - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.toString = function () { - toStringAccessed = true; - return 2; - }; +var child = new Con(); +child.toString = function() { + toStringAccessed = true; + return 2; +}; assert.sameValue([0, true].indexOf(true, child), 1, '[0, true].indexOf(true, child)'); assert(valueOfAccessed, 'valueOfAccessed !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-26.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-26.js index 6c66928cee..43307ad734 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-26.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-26.js @@ -9,30 +9,30 @@ description: > visible when an exception occurs ---*/ - var stepTwoOccurs = false; - var stepFiveOccurs = false; +var stepTwoOccurs = false; +var stepFiveOccurs = false; - var obj = {}; +var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - stepTwoOccurs = true; - if (stepFiveOccurs) { - throw new Error("Step 5 occurred out of order"); - } - return 20; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + stepTwoOccurs = true; + if (stepFiveOccurs) { + throw new Error("Step 5 occurred out of order"); + } + return 20; + }, + configurable: true +}); - var fromIndex = { - valueOf: function () { - stepFiveOccurs = true; - return 0; - } - }; +var fromIndex = { + valueOf: function() { + stepFiveOccurs = true; + return 0; + } +}; - Array.prototype.indexOf.call(obj, undefined, fromIndex); +Array.prototype.indexOf.call(obj, undefined, fromIndex); assert(stepTwoOccurs, 'stepTwoOccurs !== true'); assert(stepFiveOccurs, 'stepFiveOccurs !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-27.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-27.js index 0207afac1e..ec03ca8394 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-27.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-27.js @@ -9,34 +9,34 @@ description: > visible when an exception occurs ---*/ - var stepThreeOccurs = false; - var stepFiveOccurs = false; +var stepThreeOccurs = false; +var stepFiveOccurs = false; - var obj = {}; +var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - return { - valueOf: function () { - stepThreeOccurs = true; - if (stepFiveOccurs) { - throw new Error("Step 5 occurred out of order"); - } - return 20; - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + valueOf: function() { + stepThreeOccurs = true; + if (stepFiveOccurs) { + throw new Error("Step 5 occurred out of order"); + } + return 20; + } + }; + }, + configurable: true +}); - var fromIndex = { - valueOf: function () { - stepFiveOccurs = true; - return 0; - } - }; +var fromIndex = { + valueOf: function() { + stepFiveOccurs = true; + return 0; + } +}; - Array.prototype.indexOf.call(obj, undefined, fromIndex); +Array.prototype.indexOf.call(obj, undefined, fromIndex); assert(stepThreeOccurs, 'stepThreeOccurs !== true'); assert(stepFiveOccurs, 'stepFiveOccurs !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-28.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-28.js index 9e83835459..71adbb3478 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-28.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-28.js @@ -9,14 +9,14 @@ description: > visible when an exception occurs ---*/ - var stepFiveOccurs = false; - var fromIndex = { - valueOf: function () { - stepFiveOccurs = true; - return 0; - } - }; +var stepFiveOccurs = false; +var fromIndex = { + valueOf: function() { + stepFiveOccurs = true; + return 0; + } +}; assert.throws(TypeError, function() { - Array.prototype.indexOf.call(undefined, undefined, fromIndex); + Array.prototype.indexOf.call(undefined, undefined, fromIndex); }); assert.sameValue(stepFiveOccurs, false, 'stepFiveOccurs'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-29.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-29.js index 30381433b8..373bbc7e50 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-29.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-29.js @@ -9,23 +9,23 @@ description: > visible when an exception occurs ---*/ - var stepFiveOccurs = false; +var stepFiveOccurs = false; - var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - throw new RangeError(); - }, - configurable: true - }); +var obj = {}; +Object.defineProperty(obj, "length", { + get: function() { + throw new RangeError(); + }, + configurable: true +}); - var fromIndex = { - valueOf: function () { - stepFiveOccurs = true; - return 0; - } - }; +var fromIndex = { + valueOf: function() { + stepFiveOccurs = true; + return 0; + } +}; assert.throws(RangeError, function() { - Array.prototype.indexOf.call(obj, undefined, fromIndex); + Array.prototype.indexOf.call(obj, undefined, fromIndex); }); assert.sameValue(stepFiveOccurs, false, 'stepFiveOccurs'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-3.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-3.js index 9030d5314c..f9ec42cc87 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-3.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-3.js @@ -7,7 +7,7 @@ es5id: 15.4.4.14-5-3 description: Array.prototype.indexOf when fromIndex is boolean ---*/ - var a = [1,2,3]; +var a = [1, 2, 3]; -assert.sameValue(a.indexOf(1,true), -1, 'true resolves to 1'); -assert.sameValue(a.indexOf(1,false), 0, 'false resolves to 0'); +assert.sameValue(a.indexOf(1, true), -1, 'true resolves to 1'); +assert.sameValue(a.indexOf(1, false), 0, 'false resolves to 0'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-30.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-30.js index 9a229e976c..d3eac966c0 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-30.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-30.js @@ -9,27 +9,27 @@ description: > visible when an exception occurs ---*/ - var stepFiveOccurs = false; +var stepFiveOccurs = false; - var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - return { - valueOf: function () { - throw new TypeError(); - } - }; - }, - configurable: true - }); +var obj = {}; +Object.defineProperty(obj, "length", { + get: function() { + return { + valueOf: function() { + throw new TypeError(); + } + }; + }, + configurable: true +}); - var fromIndex = { - valueOf: function () { - stepFiveOccurs = true; - return 0; - } - }; +var fromIndex = { + valueOf: function() { + stepFiveOccurs = true; + return 0; + } +}; assert.throws(TypeError, function() { - Array.prototype.indexOf.call(obj, undefined, fromIndex); + Array.prototype.indexOf.call(obj, undefined, fromIndex); }); assert.sameValue(stepFiveOccurs, false, 'stepFiveOccurs'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-31.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-31.js index 9a7f1d3ff5..64442d0db8 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-31.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-31.js @@ -9,7 +9,7 @@ description: > verify truncation occurs in the proper direction ---*/ - var targetObj = {}; +var targetObj = {}; assert.sameValue([0, targetObj, 2].indexOf(targetObj, 2.5), -1, '[0, targetObj, 2].indexOf(targetObj, 2.5)'); assert.sameValue([0, 1, targetObj].indexOf(targetObj, 2.5), 2, '[0, 1, targetObj].indexOf(targetObj, 2.5)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-32.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-32.js index df4812b786..a11186d51e 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-32.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-32.js @@ -9,7 +9,7 @@ description: > verify truncation occurs in the proper direction ---*/ - var targetObj = {}; +var targetObj = {}; assert.sameValue([0, targetObj, 2].indexOf(targetObj, -1.5), -1, '[0, targetObj, 2].indexOf(targetObj, -1.5)'); assert.sameValue([0, 1, targetObj].indexOf(targetObj, -1.5), 2, '[0, 1, targetObj].indexOf(targetObj, -1.5)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-4.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-4.js index 3611b17992..4230ef2bc0 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-4.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-4.js @@ -7,7 +7,7 @@ es5id: 15.4.4.14-5-4 description: Array.prototype.indexOf returns 0 if fromIndex is 'undefined' ---*/ - var a = [1,2,3]; +var a = [1, 2, 3]; // undefined resolves to 0 -assert.sameValue(a.indexOf(1,undefined), 0, 'a.indexOf(1,undefined)'); +assert.sameValue(a.indexOf(1, undefined), 0, 'a.indexOf(1,undefined)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-5.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-5.js index 9056a5fe94..4cd4418d56 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-5.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-5.js @@ -7,7 +7,7 @@ es5id: 15.4.4.14-5-5 description: Array.prototype.indexOf returns 0 if fromIndex is null ---*/ - var a = [1,2,3]; +var a = [1, 2, 3]; // null resolves to 0 -assert.sameValue(a.indexOf(1,null), 0, 'a.indexOf(1,null)'); +assert.sameValue(a.indexOf(1, null), 0, 'a.indexOf(1,null)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-6.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-6.js index 69610b347a..2ea05b825e 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-6.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-6.js @@ -7,8 +7,8 @@ es5id: 15.4.4.14-5-6 description: Array.prototype.indexOf - 'fromIndex' isn't passed ---*/ - var arr = [0, 1, 2, 3, 4]; - //'fromIndex' will be set as 0 if not passed by default +var arr = [0, 1, 2, 3, 4]; +//'fromIndex' will be set as 0 if not passed by default assert.sameValue(arr.indexOf(0), arr.indexOf(0, 0), 'arr.indexOf(0)'); assert.sameValue(arr.indexOf(2), arr.indexOf(2, 0), 'arr.indexOf(2)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-6-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-6-1.js index f2da76943c..1309ad967a 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-6-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-6-1.js @@ -9,8 +9,8 @@ description: > Array length ---*/ - var a = [1,2,3]; +var a = [1, 2, 3]; -assert.sameValue(a.indexOf(1,5), -1, 'a.indexOf(1,5)'); -assert.sameValue(a.indexOf(1,3), -1, 'a.indexOf(1,3)'); -assert.sameValue([ ].indexOf(1,0), -1, '[ ].indexOf(1,0)'); +assert.sameValue(a.indexOf(1, 5), -1, 'a.indexOf(1,5)'); +assert.sameValue(a.indexOf(1, 3), -1, 'a.indexOf(1,3)'); +assert.sameValue([].indexOf(1, 0), -1, '[ ].indexOf(1,0)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-8-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-8-1.js index 57d4f191db..4531f80519 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-8-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-8-1.js @@ -7,10 +7,10 @@ es5id: 15.4.4.14-8-1 description: Array.prototype.indexOf with negative fromIndex ---*/ - var a = new Array(1,2,3); +var a = new Array(1, 2, 3); -assert.sameValue(a.indexOf(2,-1), -1, 'a.indexOf(2,-1)'); -assert.sameValue(a.indexOf(2,-2), 1, 'a.indexOf(2,-2)'); -assert.sameValue(a.indexOf(1,-3), 0, 'a.indexOf(1,-3)'); -assert.sameValue(a.indexOf(1,-5.3), 0, 'a.indexOf(1,-5.3)'); +assert.sameValue(a.indexOf(2, -1), -1, 'a.indexOf(2,-1)'); +assert.sameValue(a.indexOf(2, -2), 1, 'a.indexOf(2,-2)'); +assert.sameValue(a.indexOf(1, -3), 0, 'a.indexOf(1,-3)'); +assert.sameValue(a.indexOf(1, -5.3), 0, 'a.indexOf(1,-5.3)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-1.js index 94125fa817..91a596078f 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-1.js @@ -7,9 +7,13 @@ es5id: 15.4.4.14-9-1 description: Array.prototype.indexOf must return correct index (boolean) ---*/ - var obj = {toString:function (){return true}}; - var _false = false; - var a = [obj,"true", undefined,0,_false,null,1,"str",0,1,true,false,true,false]; +var obj = { + toString: function() { + return true + } +}; +var _false = false; +var a = [obj, "true", undefined, 0, _false, null, 1, "str", 0, 1, true, false, true, false]; - assert.sameValue(a.indexOf(true), 10, 'a[10]=true'); - assert.sameValue(a.indexOf(false), 4, 'a[4] =_false'); +assert.sameValue(a.indexOf(true), 10, 'a[10]=true'); +assert.sameValue(a.indexOf(false), 4, 'a[4] =_false'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-10.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-10.js index 4b3ec82c6a..92ebaa80aa 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-10.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-10.js @@ -10,7 +10,11 @@ es5id: 15.4.4.14-9-10 description: Array.prototype.indexOf must return correct index (NaN) ---*/ - var _NaN = NaN; - var a = new Array("NaN",undefined,0,false,null,{toString:function (){return NaN}},"false",_NaN,NaN); +var _NaN = NaN; +var a = new Array("NaN", undefined, 0, false, null, { + toString: function() { + return NaN + } +}, "false", _NaN, NaN); assert.sameValue(a.indexOf(NaN), -1, 'NaN is equal to nothing, including itself.'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-11.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-11.js index cf1aac5412..77108424d9 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-11.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-11.js @@ -9,14 +9,14 @@ description: > adding elements to the array during iteration ---*/ - var arr = [20]; +var arr = [20]; - Object.defineProperty(arr, "0", { - get: function () { - arr[1] = 1; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + arr[1] = 1; + return 0; + }, + configurable: true +}); assert.sameValue(arr.indexOf(1), -1, 'arr.indexOf(1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-2.js index fcce013d2c..410a7c0ef1 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-2.js @@ -7,12 +7,16 @@ es5id: 15.4.4.14-9-2 description: Array.prototype.indexOf must return correct index (Number) ---*/ - var obj = {toString:function (){return 0}}; - var one = 1; - var _float = -(4/3); - var a = new Array(false,undefined,null,"0",obj,-1.3333333333333, "str",-0,true,+0, one, 1,0, false, _float, -(4/3)); +var obj = { + toString: function() { + return 0 + } +}; +var one = 1; +var _float = -(4 / 3); +var a = new Array(false, undefined, null, "0", obj, -1.3333333333333, "str", -0, true, +0, one, 1, 0, false, _float, -(4 / 3)); -assert.sameValue(a.indexOf(-(4/3)), 14, 'a[14]=_float===-(4/3)'); +assert.sameValue(a.indexOf(-(4 / 3)), 14, 'a[14]=_float===-(4/3)'); assert.sameValue(a.indexOf(0), 7, 'a[7] = +0, 0===+0'); assert.sameValue(a.indexOf(-0), 7, 'a[7] = +0, -0===+0'); assert.sameValue(a.indexOf(1), 10, 'a[10] =one=== 1'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-3.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-3.js index 3c83a98d95..8b4ff007cc 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-3.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-3.js @@ -7,8 +7,12 @@ es5id: 15.4.4.14-9-3 description: Array.prototype.indexOf must return correct index(string) ---*/ - var obj = {toString:function (){return "false"}}; - var szFalse = "false"; - var a = new Array("false1",undefined,0,false,null,1,obj,0,szFalse, "false"); +var obj = { + toString: function() { + return "false" + } +}; +var szFalse = "false"; +var a = new Array("false1", undefined, 0, false, null, 1, obj, 0, szFalse, "false"); assert.sameValue(a.indexOf("false"), 8, 'a[8]=szFalse'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-4.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-4.js index d0b3a3a3ef..697f919678 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-4.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-4.js @@ -7,9 +7,13 @@ es5id: 15.4.4.14-9-4 description: Array.prototype.indexOf must return correct index(undefined) ---*/ - var obj = {toString:function (){return undefined;}}; - var _undefined1 = undefined; - var _undefined2; - var a = new Array(true,0,false,null,1,"undefined",obj,1,_undefined2,_undefined1,undefined); +var obj = { + toString: function() { + return undefined; + } +}; +var _undefined1 = undefined; +var _undefined2; +var a = new Array(true, 0, false, null, 1, "undefined", obj, 1, _undefined2, _undefined1, undefined); assert.sameValue(a.indexOf(undefined), 8, 'a[8]=_undefined2'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-5.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-5.js index 3a31b1477a..8537c3ac30 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-5.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-5.js @@ -7,9 +7,21 @@ es5id: 15.4.4.14-9-5 description: Array.prototype.indexOf must return correct index (Object) ---*/ - var obj1 = {toString:function (){return "false"}}; - var obj2 = {toString:function (){return "false"}}; - var obj3 = obj1; - var a = new Array(false,undefined,0,false,null,{toString:function (){return "false"}},"false",obj2,obj1,obj3); +var obj1 = { + toString: function() { + return "false" + } +}; +var obj2 = { + toString: function() { + return "false" + } +}; +var obj3 = obj1; +var a = new Array(false, undefined, 0, false, null, { + toString: function() { + return "false" + } +}, "false", obj2, obj1, obj3); assert.sameValue(a.indexOf(obj3), 8, 'a[8] = obj1'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-6.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-6.js index adb3280e8a..cb657505bb 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-6.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-6.js @@ -7,8 +7,12 @@ es5id: 15.4.4.14-9-6 description: Array.prototype.indexOf must return correct index(null) ---*/ - var obj = {toString:function (){return null}}; - var _null = null; - var a = new Array(true,undefined,0,false,_null,1,"str",0,1,obj,true,false,null); +var obj = { + toString: function() { + return null + } +}; +var _null = null; +var a = new Array(true, undefined, 0, false, _null, 1, "str", 0, 1, obj, true, false, null); assert.sameValue(a.indexOf(null), 4, 'a[4]=_null'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-7.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-7.js index 33bf64933b..0a8028b4e7 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-7.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-7.js @@ -7,8 +7,8 @@ es5id: 15.4.4.14-9-7 description: Array.prototype.indexOf must return correct index (self reference) ---*/ - var a = new Array(0,1,2,3); - a[2] = a; +var a = new Array(0, 1, 2, 3); +a[2] = a; assert.sameValue(a.indexOf(a), 2, 'a.indexOf(a)'); assert.sameValue(a.indexOf(3), 3, 'a.indexOf(3)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-8.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-8.js index 86889e4372..7e07ce058f 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-8.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-8.js @@ -7,8 +7,8 @@ es5id: 15.4.4.14-9-8 description: Array.prototype.indexOf must return correct index (Array) ---*/ - var b = new Array("0,1"); - var a = new Array(0,b,"0,1",3); +var b = new Array("0,1"); +var a = new Array(0, b, "0,1", 3); assert.sameValue(a.indexOf(b.toString()), 2, 'a.indexOf(b.toString())'); assert.sameValue(a.indexOf("0,1"), 2, 'a.indexOf("0,1")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-9.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-9.js index 82fc8113c1..800f568bf4 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-9.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-9.js @@ -7,15 +7,15 @@ es5id: 15.4.4.14-9-9 description: Array.prototype.indexOf must return correct index (Sparse Array) ---*/ - var a = new Array(0,1); - a[4294967294] = 2; // 2^32-2 - is max array element - a[4294967295] = 3; // 2^32-1 added as non-array element property - a[4294967296] = 4; // 2^32 added as non-array element property - a[4294967297] = 5; // 2^32+1 added as non-array element property +var a = new Array(0, 1); +a[4294967294] = 2; // 2^32-2 - is max array element +a[4294967295] = 3; // 2^32-1 added as non-array element property +a[4294967296] = 4; // 2^32 added as non-array element property +a[4294967297] = 5; // 2^32+1 added as non-array element property - // start searching near the end so in case implementation actually tries to test all missing elements!! +// start searching near the end so in case implementation actually tries to test all missing elements!! -assert.sameValue(a.indexOf(2,4294967290 ), 4294967294, 'a.indexOf(2,4294967290 )'); -assert.sameValue(a.indexOf(3,4294967290), -1, 'a.indexOf(3,4294967290)'); -assert.sameValue(a.indexOf(4,4294967290), -1, 'a.indexOf(4,4294967290)'); -assert.sameValue(a.indexOf(5,4294967290), -1, 'a.indexOf(5,4294967290)'); +assert.sameValue(a.indexOf(2, 4294967290), 4294967294, 'a.indexOf(2,4294967290 )'); +assert.sameValue(a.indexOf(3, 4294967290), -1, 'a.indexOf(3,4294967290)'); +assert.sameValue(a.indexOf(4, 4294967290), -1, 'a.indexOf(4,4294967290)'); +assert.sameValue(a.indexOf(5, 4294967290), -1, 'a.indexOf(5,4294967290)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-1.js index 0d17a2be4b..043314c607 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-1.js @@ -9,14 +9,14 @@ description: > here ---*/ - var arr = { }; +var arr = {}; - Object.defineProperty(arr, "length", { - get: function () { - arr[2] = "length"; - return 3; - }, - configurable: true - }); +Object.defineProperty(arr, "length", { + get: function() { + arr[2] = "length"; + return 3; + }, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(arr, "length"), 2, 'Array.prototype.indexOf.call(arr, "length")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-10.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-10.js index ff6b0a9c8e..4a2797e620 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-10.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-10.js @@ -9,19 +9,19 @@ description: > after current position are visited on an Array ---*/ - var arr = [0, , 2]; +var arr = [0, , 2]; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(Array.prototype, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); assert.sameValue(arr.indexOf(6.99), 1, 'arr.indexOf(6.99)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-11.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-11.js index 6e9587d5a8..65e5043253 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-11.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-11.js @@ -9,21 +9,23 @@ description: > property not to be visited on an Array-like object ---*/ - var arr = { length: 2 }; +var arr = { + length: 2 +}; - Object.defineProperty(arr, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + return 6.99; + }, + configurable: true +}); - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(arr, 6.99), -1, 'Array.prototype.indexOf.call(arr, 6.99)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-12.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-12.js index 172dd11336..d07f4a7102 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-12.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-12.js @@ -9,21 +9,21 @@ description: > property not to be visited on an Array ---*/ - var arr = [1, 2]; +var arr = [1, 2]; - Object.defineProperty(arr, "1", { - get: function () { - return "6.99"; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + return "6.99"; + }, + configurable: true +}); - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); assert.sameValue(arr.indexOf("6.99"), -1, 'arr.indexOf("6.99")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-13.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-13.js index 2390e6e7f5..f45f555cf6 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-13.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-13.js @@ -9,16 +9,19 @@ description: > prototype index property not to be visited on an Array-like Object ---*/ - var arr = { 2: 2, length: 20 }; +var arr = { + 2: 2, + length: 20 +}; - Object.defineProperty(arr, "0", { - get: function () { - delete Object.prototype[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete Object.prototype[1]; + return 0; + }, + configurable: true +}); - Object.prototype[1] = 1; +Object.prototype[1] = 1; assert.sameValue(Array.prototype.indexOf.call(arr, 1), -1, 'Array.prototype.indexOf.call(arr, 1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-14.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-14.js index 81cbe7b988..216e4da0b3 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-14.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-14.js @@ -9,16 +9,16 @@ description: > prototype index property not to be visited on an Array ---*/ - var arr = [0, , 2]; +var arr = [0, , 2]; - Object.defineProperty(arr, "0", { - get: function () { - delete Array.prototype[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete Array.prototype[1]; + return 0; + }, + configurable: true +}); - Array.prototype[1] = 1; +Array.prototype[1] = 1; assert.sameValue(arr.indexOf(1), -1, 'arr.indexOf(1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-15.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-15.js index c7c60d7c43..5c5be6dc92 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-15.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-15.js @@ -10,16 +10,21 @@ description: > Array-like object ---*/ - var arr = { 0: 0, 1: 111, 2: 2, length: 10 }; +var arr = { + 0: 0, + 1: 111, + 2: 2, + length: 10 +}; - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); - Object.prototype[1] = 1; +Object.prototype[1] = 1; assert.sameValue(Array.prototype.indexOf.call(arr, 1), 1, 'Array.prototype.indexOf.call(arr, 1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-16.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-16.js index 707207440e..ed4072719d 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-16.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-16.js @@ -9,16 +9,16 @@ description: > property causes prototype index property to be visited on an Array ---*/ - var arr = [0, 111, 2]; +var arr = [0, 111, 2]; - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); - Array.prototype[1] = 1; +Array.prototype[1] = 1; assert.sameValue(arr.indexOf(1), 1, 'arr.indexOf(1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-17.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-17.js index 74a6eddb42..8309a3b86e 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-17.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-17.js @@ -9,14 +9,14 @@ description: > property not to be visited ---*/ - var arr = [0, 1, 2, "last"]; +var arr = [0, 1, 2, "last"]; - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 3; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + arr.length = 3; + return 0; + }, + configurable: true +}); assert.sameValue(arr.indexOf("last"), -1, 'arr.indexOf("last")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-18.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-18.js index f1e2fa4f4c..1d728bce1f 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-18.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-18.js @@ -9,21 +9,21 @@ description: > prototype property causes prototype index property to be visited ---*/ - var arr = [0, 1, 2]; +var arr = [0, 1, 2]; - Object.defineProperty(Array.prototype, "2", { - get: function () { - return "prototype"; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "2", { + get: function() { + return "prototype"; + }, + configurable: true +}); - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + arr.length = 2; + return 1; + }, + configurable: true +}); assert.sameValue(arr.indexOf("prototype"), 2, 'arr.indexOf("prototype")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-19.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-19.js index b30be5fdab..0fab8d12b7 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-19.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-19.js @@ -10,22 +10,22 @@ description: > flags: [noStrict] ---*/ - var arr = [0, 1, 2]; +var arr = [0, 1, 2]; - Object.defineProperty(arr, "2", { - get: function () { - return "unconfigurable"; - }, - configurable: false - }); +Object.defineProperty(arr, "2", { + get: function() { + return "unconfigurable"; + }, + configurable: false +}); - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + arr.length = 2; + return 1; + }, + configurable: true +}); assert.sameValue(arr.indexOf("unconfigurable"), 2, 'arr.indexOf("unconfigurable")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-2.js index a0e8b82956..fac0434b98 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-2.js @@ -9,15 +9,17 @@ description: > here on an Array-like object ---*/ - var arr = { length: 30 }; - var targetObj = function () { }; +var arr = { + length: 30 +}; +var targetObj = function() {}; - var fromIndex = { - valueOf: function () { - arr[4] = targetObj; - return 3; - } - }; +var fromIndex = { + valueOf: function() { + arr[4] = targetObj; + return 3; + } +}; assert.sameValue(Array.prototype.indexOf.call(arr, targetObj, fromIndex), 4, 'Array.prototype.indexOf.call(arr, targetObj, fromIndex)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-3.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-3.js index 5ac6827ee6..d7954ea908 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-3.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-3.js @@ -9,15 +9,15 @@ description: > here on an Array ---*/ - var arr = []; - arr.length = 30; - var targetObj = function () { }; +var arr = []; +arr.length = 30; +var targetObj = function() {}; - var fromIndex = { - valueOf: function () { - arr[4] = targetObj; - return 3; - } - }; +var fromIndex = { + valueOf: function() { + arr[4] = targetObj; + return 3; + } +}; assert.sameValue(arr.indexOf(targetObj, fromIndex), 4, 'arr.indexOf(targetObj, fromIndex)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-4.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-4.js index 8a5e756c56..1340a1d67b 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-4.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-4.js @@ -9,14 +9,16 @@ description: > here ---*/ - var arr = { 2: 6.99 }; +var arr = { + 2: 6.99 +}; - Object.defineProperty(arr, "length", { - get: function () { - delete arr[2]; - return 3; - }, - configurable: true - }); +Object.defineProperty(arr, "length", { + get: function() { + delete arr[2]; + return 3; + }, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(arr, 6.99), -1, 'Array.prototype.indexOf.call(arr, 6.99)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-5.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-5.js index 255c327a3f..926a37aeb5 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-5.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-5.js @@ -9,13 +9,16 @@ description: > here on an Array-like object ---*/ - var arr = { 10: false, length: 30 }; +var arr = { + 10: false, + length: 30 +}; - var fromIndex = { - valueOf: function () { - delete arr[10]; - return 3; - } - }; +var fromIndex = { + valueOf: function() { + delete arr[10]; + return 3; + } +}; assert.sameValue(Array.prototype.indexOf.call(arr, false, fromIndex), -1, 'Array.prototype.indexOf.call(arr, false, fromIndex)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-6.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-6.js index e78f717c3c..41e275c6ce 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-6.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-6.js @@ -9,15 +9,15 @@ description: > here on an Array ---*/ - var arr = []; - arr[10] = "10"; - arr.length = 20; +var arr = []; +arr[10] = "10"; +arr.length = 20; - var fromIndex = { - valueOf: function () { - delete arr[10]; - return 3; - } - }; +var fromIndex = { + valueOf: function() { + delete arr[10]; + return 3; + } +}; assert.sameValue(arr.indexOf("10", fromIndex), -1, 'arr.indexOf("10", fromIndex)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-7.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-7.js index 58e38614c5..317816ab65 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-7.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-7.js @@ -9,19 +9,21 @@ description: > current position are visited on an Array-like object ---*/ - var arr = { length: 2 }; +var arr = { + length: 2 +}; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(arr, "1", { + get: function() { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(arr, 1), 1, 'Array.prototype.indexOf.call(arr, 1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-8.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-8.js index aa43ed573b..af3577d7db 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-8.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-8.js @@ -9,19 +9,19 @@ description: > current position are visited on an Array ---*/ - var arr = [0, , 2]; +var arr = [0, , 2]; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(arr, "1", { + get: function() { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); assert.sameValue(arr.indexOf(1), 1, 'arr.indexOf(1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-9.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-9.js index e36af343da..22ea6154ae 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-9.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-9.js @@ -9,19 +9,21 @@ description: > after current position are visited on an Array-like object ---*/ - var arr = { length: 2 }; +var arr = { + length: 2 +}; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(Object.prototype, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(arr, 6.99), 1, 'Array.prototype.indexOf.call(arr, 6.99)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-1.js index dc8bba8671..211c212ccd 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-1.js @@ -9,7 +9,12 @@ description: > property on an Array-like object ---*/ - var obj = { 0: 0, 1: 1, 2: 2, length: 3 }; +var obj = { + 0: 0, + 1: 1, + 2: 2, + length: 3 +}; assert.sameValue(Array.prototype.indexOf.call(obj, 0), 0, 'Array.prototype.indexOf.call(obj, 0)'); assert.sameValue(Array.prototype.indexOf.call(obj, 1), 1, 'Array.prototype.indexOf.call(obj, 1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-10.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-10.js index 8cf69e48dd..af735dd418 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-10.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-10.js @@ -9,27 +9,29 @@ description: > property on an Array-like object ---*/ - var obj = { length: 3 }; - Object.defineProperty(obj, "0", { - get: function () { - return 0; - }, - configurable: true - }); +var obj = { + length: 3 +}; +Object.defineProperty(obj, "0", { + get: function() { + return 0; + }, + configurable: true +}); - Object.defineProperty(obj, "1", { - get: function () { - return 1; - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + return 1; + }, + configurable: true +}); - Object.defineProperty(obj, "2", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(obj, "2", { + get: function() { + return 2; + }, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(obj, 0), 0, 'Array.prototype.indexOf.call(obj, 0)'); assert.sameValue(Array.prototype.indexOf.call(obj, 1), 1, 'Array.prototype.indexOf.call(obj, 1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-11.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-11.js index 0d1ca8e702..d744fec56c 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-11.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-11.js @@ -9,14 +9,14 @@ description: > property that overrides an inherited data property on an Array ---*/ - var arr = []; +var arr = []; - Array.prototype[0] = false; - Object.defineProperty(arr, "0", { - get: function () { - return true; - }, - configurable: true - }); +Array.prototype[0] = false; +Object.defineProperty(arr, "0", { + get: function() { + return true; + }, + configurable: true +}); assert.sameValue(arr.indexOf(true), 0, 'arr.indexOf(true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-12.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-12.js index de13d9f38a..77f337f6b1 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-12.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-12.js @@ -10,14 +10,16 @@ description: > Array-like object ---*/ - var obj = { length: 1 }; +var obj = { + length: 1 +}; - Object.prototype[0] = false; - Object.defineProperty(obj, "0", { - get: function () { - return true; - }, - configurable: true - }); +Object.prototype[0] = false; +Object.defineProperty(obj, "0", { + get: function() { + return true; + }, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(obj, true), 0, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-13.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-13.js index 27be95dc60..f260b91bfa 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-13.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-13.js @@ -9,20 +9,20 @@ description: > property that overrides an inherited accessor property on an Array ---*/ - var arr = []; +var arr = []; - Object.defineProperty(Array.prototype, "0", { - get: function () { - return false; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return false; + }, + configurable: true +}); - Object.defineProperty(arr, "0", { - get: function () { - return true; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + return true; + }, + configurable: true +}); assert.sameValue(arr.indexOf(true), 0, 'arr.indexOf(true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-14.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-14.js index 265667e71a..b3133a5bcb 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-14.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-14.js @@ -10,20 +10,22 @@ description: > Array-like object ---*/ - var obj = { length: 1 }; +var obj = { + length: 1 +}; - Object.defineProperty(Object.prototype, "0", { - get: function () { - return false; - }, - configurable: true - }); +Object.defineProperty(Object.prototype, "0", { + get: function() { + return false; + }, + configurable: true +}); - Object.defineProperty(obj, "0", { - get: function () { - return true; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + return true; + }, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(obj, true), 0, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-15.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-15.js index 44b2da7afd..e9f5b47b76 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-15.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-15.js @@ -9,26 +9,26 @@ description: > accessor property on an Array ---*/ - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 10; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return 10; + }, + configurable: true +}); - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 20; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "1", { + get: function() { + return 20; + }, + configurable: true +}); - Object.defineProperty(Array.prototype, "2", { - get: function () { - return 30; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "2", { + get: function() { + return 30; + }, + configurable: true +}); assert.sameValue([, , , ].indexOf(10), 0, '[, , , ].indexOf(10)'); assert.sameValue([, , , ].indexOf(20), 1, '[, , , ].indexOf(20)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-16.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-16.js index 754db8aad4..8a8057ee9f 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-16.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-16.js @@ -9,27 +9,33 @@ description: > accessor property on an Array-like object ---*/ - Object.defineProperty(Object.prototype, "0", { - get: function () { - return 10; - }, - configurable: true - }); +Object.defineProperty(Object.prototype, "0", { + get: function() { + return 10; + }, + configurable: true +}); - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 20; - }, - configurable: true - }); +Object.defineProperty(Object.prototype, "1", { + get: function() { + return 20; + }, + configurable: true +}); - Object.defineProperty(Object.prototype, "2", { - get: function () { - return 30; - }, - configurable: true - }); +Object.defineProperty(Object.prototype, "2", { + get: function() { + return 30; + }, + configurable: true +}); -assert.sameValue(Array.prototype.indexOf.call({ length: 3 }, 10), 0, 'Array.prototype.indexOf.call({ length: 3 }, 10)'); -assert.sameValue(Array.prototype.indexOf.call({ length: 3 }, 20), 1, 'Array.prototype.indexOf.call({ length: 3 }, 20)'); -assert.sameValue(Array.prototype.indexOf.call({ length: 3 }, 30), 2, 'Array.prototype.indexOf.call({ length: 3 }, 30)'); +assert.sameValue(Array.prototype.indexOf.call({ + length: 3 +}, 10), 0, 'Array.prototype.indexOf.call({ length: 3 }, 10)'); +assert.sameValue(Array.prototype.indexOf.call({ + length: 3 +}, 20), 1, 'Array.prototype.indexOf.call({ length: 3 }, 20)'); +assert.sameValue(Array.prototype.indexOf.call({ + length: 3 +}, 30), 2, 'Array.prototype.indexOf.call({ length: 3 }, 30)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-17.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-17.js index 551e2a30e7..9ffbbe16ca 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-17.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-17.js @@ -9,10 +9,10 @@ description: > property without a get function on an Array ---*/ - var arr = []; - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); +var arr = []; +Object.defineProperty(arr, "0", { + set: function() {}, + configurable: true +}); assert.sameValue(arr.indexOf(undefined), 0, 'arr.indexOf(undefined)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-18.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-18.js index 4701e3fd8d..e79db90e3b 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-18.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-18.js @@ -9,10 +9,12 @@ description: > property without a get function on an Array-like object ---*/ - var obj = { length: 1 }; - Object.defineProperty(obj, "0", { - set: function () { }, - configurable: true - }); +var obj = { + length: 1 +}; +Object.defineProperty(obj, "0", { + set: function() {}, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(obj, undefined), 0, 'Array.prototype.indexOf.call(obj, undefined)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-19.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-19.js index b640d89655..2ded8363e7 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-19.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-19.js @@ -10,18 +10,18 @@ description: > accessor property on an Array ---*/ - var arr = []; +var arr = []; - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(arr, "0", { + set: function() {}, + configurable: true +}); - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return 2; + }, + configurable: true +}); assert.sameValue(arr.indexOf(undefined), 0, 'arr.indexOf(undefined)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-20.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-20.js index 56508fe508..793084e9e0 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-20.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-20.js @@ -10,23 +10,23 @@ description: > accessor property on an Array-like object ---*/ - var proto = {}; - Object.defineProperty(proto, "0", { - get: function () { - return 2; - }, - configurable: true - }); +var proto = {}; +Object.defineProperty(proto, "0", { + get: function() { + return 2; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 1; +var child = new Con(); +child.length = 1; - Object.defineProperty(child, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(child, "0", { + set: function() {}, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(child, undefined), 0, 'Array.prototype.indexOf.call(child, undefined)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-21.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-21.js index 24144df082..ffc9331489 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-21.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-21.js @@ -9,9 +9,9 @@ description: > accessor property without a get function on an Array ---*/ - Object.defineProperty(Array.prototype, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + set: function() {}, + configurable: true +}); assert.sameValue([, ].indexOf(undefined), 0, '[, ].indexOf(undefined)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-22.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-22.js index 922d2e7ce1..f9fa4d41a2 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-22.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-22.js @@ -9,9 +9,11 @@ description: > accessor property without a get function on an Array-like object ---*/ - Object.defineProperty(Object.prototype, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(Object.prototype, "0", { + set: function() {}, + configurable: true +}); -assert.sameValue(Array.prototype.indexOf.call({ length: 1 }, undefined), 0, 'Array.prototype.indexOf.call({ length: 1 }, undefined)'); +assert.sameValue(Array.prototype.indexOf.call({ + length: 1 +}, undefined), 0, 'Array.prototype.indexOf.call({ length: 1 }, undefined)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-25.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-25.js index b2f3bc442a..4e5bb8b13b 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-25.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-25.js @@ -10,9 +10,9 @@ description: > less than number of parameters) ---*/ - var func = function (a, b) { - return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) && - -1 === Array.prototype.indexOf.call(arguments, arguments[1]); - }; +var func = function(a, b) { + return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) && + -1 === Array.prototype.indexOf.call(arguments, arguments[1]); +}; assert(func(true), 'func(true) !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-26.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-26.js index 330ea1966e..caa167d9d5 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-26.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-26.js @@ -10,10 +10,10 @@ description: > to number of parameters) ---*/ - var func = function (a, b) { - return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) && - 1 === Array.prototype.indexOf.call(arguments, arguments[1]) && - -1 === Array.prototype.indexOf.call(arguments, arguments[2]); - }; +var func = function(a, b) { + return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) && + 1 === Array.prototype.indexOf.call(arguments, arguments[1]) && + -1 === Array.prototype.indexOf.call(arguments, arguments[2]); +}; assert(func(0, true), 'func(0, true) !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-27.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-27.js index 5935f22bae..02017a9292 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-27.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-27.js @@ -10,10 +10,10 @@ description: > greater than number of parameters) ---*/ - var func = function (a, b) { - return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) && - 3 === Array.prototype.indexOf.call(arguments, arguments[3]) && - -1 === Array.prototype.indexOf.call(arguments, arguments[4]); - }; +var func = function(a, b) { + return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) && + 3 === Array.prototype.indexOf.call(arguments, arguments[3]) && + -1 === Array.prototype.indexOf.call(arguments, arguments[4]); +}; assert(func(0, false, 0, true), 'func(0, false, 0, true) !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-28.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-28.js index dc9119d68e..2a13283be2 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-28.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-28.js @@ -9,26 +9,26 @@ description: > iterations on an Array ---*/ - var preIterVisible = false; - var arr = []; +var preIterVisible = false; +var arr = []; - Object.defineProperty(arr, "0", { - get: function () { - preIterVisible = true; - return false; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + preIterVisible = true; + return false; + }, + configurable: true +}); - Object.defineProperty(arr, "1", { - get: function () { - if (preIterVisible) { - return true; - } else { - return false; - } - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + if (preIterVisible) { + return true; + } else { + return false; + } + }, + configurable: true +}); assert.sameValue(arr.indexOf(true), 1, 'arr.indexOf(true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-29.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-29.js index 1c941586ec..475817a8e8 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-29.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-29.js @@ -9,26 +9,28 @@ description: > iterations on an Array-like object ---*/ - var preIterVisible = false; - var obj = { length: 2 }; +var preIterVisible = false; +var obj = { + length: 2 +}; - Object.defineProperty(obj, "0", { - get: function () { - preIterVisible = true; - return false; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + preIterVisible = true; + return false; + }, + configurable: true +}); - Object.defineProperty(obj, "1", { - get: function () { - if (preIterVisible) { - return true; - } else { - return false; - } - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + if (preIterVisible) { + return true; + } else { + return false; + } + }, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-3.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-3.js index 1df5d9eb96..84006e81e4 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-3.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-3.js @@ -9,6 +9,6 @@ description: > property that overrides an inherited data property on an Array ---*/ - Array.prototype[0] = false; +Array.prototype[0] = false; assert.sameValue([true].indexOf(true), 0, '[true].indexOf(true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-30.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-30.js index 440a314480..c2c8d13507 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-30.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-30.js @@ -9,24 +9,24 @@ description: > exception on an Array ---*/ - var accessed = false; - var arr = []; +var accessed = false; +var arr = []; - Object.defineProperty(arr, "0", { - get: function () { - throw new TypeError(); - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + throw new TypeError(); + }, + configurable: true +}); - Object.defineProperty(arr, "1", { - get: function () { - accessed = true; - return true; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + accessed = true; + return true; + }, + configurable: true +}); assert.throws(TypeError, function() { - arr.indexOf(true); + arr.indexOf(true); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-31.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-31.js index 9cae879bc5..8977a98939 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-31.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-31.js @@ -9,24 +9,26 @@ description: > exception on an Array-like object ---*/ - var accessed = false; - var obj = { length: 2 }; +var accessed = false; +var obj = { + length: 2 +}; - Object.defineProperty(obj, "0", { - get: function () { - throw new TypeError(); - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + throw new TypeError(); + }, + configurable: true +}); - Object.defineProperty(obj, "1", { - get: function () { - accessed = true; - return true; - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + accessed = true; + return true; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.indexOf.call(obj, true); + Array.prototype.indexOf.call(obj, true); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-4.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-4.js index 171ced904f..8920684262 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-4.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-4.js @@ -10,6 +10,10 @@ description: > Array-like object ---*/ - Object.prototype[0] = false; +Object.prototype[0] = false; -assert.sameValue(Array.prototype.indexOf.call({ 0: true, 1: 1, length: 2 }, true), 0, 'Array.prototype.indexOf.call({ 0: true, 1: 1, length: 2 }, true)'); +assert.sameValue(Array.prototype.indexOf.call({ + 0: true, + 1: 1, + length: 2 +}, true), 0, 'Array.prototype.indexOf.call({ 0: true, 1: 1, length: 2 }, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-5.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-5.js index 24a4076913..1d4332e749 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-5.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-5.js @@ -9,11 +9,11 @@ description: > property that overrides an inherited accessor property on an Array ---*/ - Object.defineProperty(Array.prototype, "0", { - get: function () { - return false; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return false; + }, + configurable: true +}); assert.sameValue([true].indexOf(true), 0, '[true].indexOf(true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-6.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-6.js index 22e410e7d1..4661515c4f 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-6.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-6.js @@ -10,11 +10,15 @@ description: > Array-like object ---*/ - Object.defineProperty(Object.prototype, "0", { - get: function () { - return false; - }, - configurable: true - }); +Object.defineProperty(Object.prototype, "0", { + get: function() { + return false; + }, + configurable: true +}); -assert.sameValue(Array.prototype.indexOf.call({ 0: true, 1: 1, length: 2 }, true), 0, 'Array.prototype.indexOf.call({ 0: true, 1: 1, length: 2 }, true)'); +assert.sameValue(Array.prototype.indexOf.call({ + 0: true, + 1: 1, + length: 2 +}, true), 0, 'Array.prototype.indexOf.call({ 0: true, 1: 1, length: 2 }, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-7.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-7.js index 9382abf00c..6344f1784d 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-7.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-7.js @@ -9,9 +9,9 @@ description: > data property on an Array ---*/ - Array.prototype[0] = true; - Array.prototype[1] = false; - Array.prototype[2] = "true"; +Array.prototype[0] = true; +Array.prototype[1] = false; +Array.prototype[2] = "true"; assert.sameValue([, , , ].indexOf(true), 0, '[, , , ].indexOf(true)'); assert.sameValue([, , , ].indexOf(false), 1, '[, , , ].indexOf(false)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-8.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-8.js index 52e280f1c4..7ac1d98104 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-8.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-8.js @@ -9,10 +9,16 @@ description: > data property on an Array-like object ---*/ - Object.prototype[0] = true; - Object.prototype[1] = false; - Object.prototype[2] = "true"; +Object.prototype[0] = true; +Object.prototype[1] = false; +Object.prototype[2] = "true"; -assert.sameValue(Array.prototype.indexOf.call({ length: 3 }, true), 0, 'Array.prototype.indexOf.call({ length: 3 }, true)'); -assert.sameValue(Array.prototype.indexOf.call({ length: 3 }, false), 1, 'Array.prototype.indexOf.call({ length: 3 }, false)'); -assert.sameValue(Array.prototype.indexOf.call({ length: 3 }, "true"), 2, 'Array.prototype.indexOf.call({ length: 3 }, "true")'); +assert.sameValue(Array.prototype.indexOf.call({ + length: 3 +}, true), 0, 'Array.prototype.indexOf.call({ length: 3 }, true)'); +assert.sameValue(Array.prototype.indexOf.call({ + length: 3 +}, false), 1, 'Array.prototype.indexOf.call({ length: 3 }, false)'); +assert.sameValue(Array.prototype.indexOf.call({ + length: 3 +}, "true"), 2, 'Array.prototype.indexOf.call({ length: 3 }, "true")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-9.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-9.js index ed295d2011..007bbcc02c 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-9.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-9.js @@ -9,27 +9,27 @@ description: > property on an Array ---*/ - var arr = [, , , ]; - Object.defineProperty(arr, "0", { - get: function () { - return 0; - }, - configurable: true - }); +var arr = [, , , ]; +Object.defineProperty(arr, "0", { + get: function() { + return 0; + }, + configurable: true +}); - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + return 1; + }, + configurable: true +}); - Object.defineProperty(arr, "2", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(arr, "2", { + get: function() { + return 2; + }, + configurable: true +}); assert.sameValue(arr.indexOf(0), 0, 'arr.indexOf(0)'); assert.sameValue(arr.indexOf(1), 1, 'arr.indexOf(1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-1.js index 8c2c6d709b..9402b5c034 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-1.js @@ -14,4 +14,6 @@ assert.sameValue(["0"].indexOf(0), -1, '["0"].indexOf(0)'); assert.sameValue([false].indexOf(0), -1, '[false].indexOf(0)'); assert.sameValue([undefined].indexOf(0), -1, '[undefined].indexOf(0)'); assert.sameValue([null].indexOf(0), -1, '[null].indexOf(0)'); -assert.sameValue([[]].indexOf(0), -1, '[[]].indexOf(0)'); +assert.sameValue([ + [] +].indexOf(0), -1, '[[]].indexOf(0)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-11.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-11.js index 8aad97866b..dcce4f0170 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-11.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-11.js @@ -9,8 +9,8 @@ description: > are Object type, and they refer to the same object ---*/ - var obj1 = {}; - var obj2 = {}; - var obj3 = obj2; +var obj1 = {}; +var obj2 = {}; +var obj3 = obj2; assert.sameValue([{}, obj1, obj2].indexOf(obj3), 2, '[{}, obj1, obj2].indexOf(obj3)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-iii-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-iii-2.js index a593c8ce48..94a30fd4a6 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-iii-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-iii-2.js @@ -9,26 +9,26 @@ description: > element once search value is found ---*/ - var arr = [1, 2, , 1, 2]; - var elementThirdAccessed = false; - var elementFifthAccessed = false; +var arr = [1, 2, , 1, 2]; +var elementThirdAccessed = false; +var elementFifthAccessed = false; - Object.defineProperty(arr, "2", { - get: function () { - elementThirdAccessed = true; - return 2; - }, - configurable: true - }); - Object.defineProperty(arr, "4", { - get: function () { - elementFifthAccessed = true; - return 2; - }, - configurable: true - }); +Object.defineProperty(arr, "2", { + get: function() { + elementThirdAccessed = true; + return 2; + }, + configurable: true +}); +Object.defineProperty(arr, "4", { + get: function() { + elementFifthAccessed = true; + return 2; + }, + configurable: true +}); - arr.indexOf(2); +arr.indexOf(2); assert.sameValue(elementThirdAccessed, false, 'elementThirdAccessed'); assert.sameValue(elementFifthAccessed, false, 'elementFifthAccessed'); diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A1.2_T1.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A1.2_T1.js index 1953684e56..002775eac9 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A1.2_T1.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A1.2_T1.js @@ -9,7 +9,7 @@ description: Checking this use new Array() and [] ---*/ //CHECK#1 -var x = new Array(0,1,2,3); +var x = new Array(0, 1, 2, 3); if (x.join() !== "0,1,2,3") { $ERROR('#1: x = new Array(0,1,2,3); x.join() === "0,1,2,3". Actual: ' + (x.join())); } diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A1.2_T2.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A1.2_T2.js index abb176f63e..9ec63f6c75 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A1.2_T2.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A1.2_T2.js @@ -9,7 +9,7 @@ description: Checking this use new Array() and [] ---*/ //CHECK#1 -var x = new Array(0,1,2,3); +var x = new Array(0, 1, 2, 3); if (x.join(undefined) !== "0,1,2,3") { $ERROR('#1: x = new Array(0,1,2,3); x.join(undefined) === "0,1,2,3". Actual: ' + (x.join(undefined))); } diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A1.3_T1.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A1.3_T1.js index 8d8a730b0e..bbe9801e5b 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A1.3_T1.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A1.3_T1.js @@ -23,7 +23,7 @@ if (x.join() !== "") { } //CHECK#3 -x = Array(undefined,1,null,3); +x = Array(undefined, 1, null, 3); if (x.join() !== ",1,,3") { $ERROR('#3: x = Array(undefined,1,null,3); x.join() === ",1,,3". Actual: ' + (x.join())); } diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T1.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T1.js index 0b9c69bf8d..e9b56c0533 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T1.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T1.js @@ -16,14 +16,14 @@ obj.join = Array.prototype.join; if (obj.length !== undefined) { $ERROR('#0: var obj = {}; obj.length === undefined. Actual: ' + (obj.length)); } else { - //CHECK#1 - if (obj.join() !== "") { - $ERROR('#1: var obj = {}; obj.join = Array.prototype.join; obj.join() === "". Actual: ' + (obj.join())); - } - //CHECK#2 - if (obj.length !== undefined) { - $ERROR('#2: var obj = {}; obj.join = Array.prototype.join; obj.join(); obj.length === undefined. Actual: ' + (obj.length)); - } + //CHECK#1 + if (obj.join() !== "") { + $ERROR('#1: var obj = {}; obj.join = Array.prototype.join; obj.join() === "". Actual: ' + (obj.join())); + } + //CHECK#2 + if (obj.length !== undefined) { + $ERROR('#2: var obj = {}; obj.join = Array.prototype.join; obj.join(); obj.length === undefined. Actual: ' + (obj.length)); + } } //CHECK#3 diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T2.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T2.js index 3cd42a8324..8a6fbb9809 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T2.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T2.js @@ -43,7 +43,7 @@ if (obj.join() !== "") { if (obj.length !== -0) { $ERROR('#8: var obj = {}; obj.length = -0; obj.join = Array.prototype.join; obj.join(); obj.length === 0. Actual: ' + (obj.length)); } else { - if (1/obj.length !== Number.NEGATIVE_INFINITY) { + if (1 / obj.length !== Number.NEGATIVE_INFINITY) { $ERROR('#8: var obj = {}; obj.length = -0; obj.join = Array.prototype.join; obj.join(); obj.length === -0. Actual: ' + (obj.length)); } } diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T4.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T4.js index ac019fb798..729580e042 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T4.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T4.js @@ -16,26 +16,51 @@ var obj = {}; obj.join = Array.prototype.join; //CHECK#1 -obj.length = {valueOf: function() {return 3}}; +obj.length = { + valueOf: function() { + return 3 + } +}; if (obj.join() !== ",,") { $ERROR('#1: obj.length = {valueOf: function() {return 3}} obj.join() === ",,". Actual: ' + (obj.join())); } //CHECK#2 -obj.length = {valueOf: function() {return 3}, toString: function() {return 2}}; +obj.length = { + valueOf: function() { + return 3 + }, + toString: function() { + return 2 + } +}; if (obj.join() !== ",,") { $ERROR('#2: obj.length = {valueOf: function() {return 3}, toString: function() {return 2}} obj.join() === ",,". Actual: ' + (obj.join())); } //CHECK#3 -obj.length = {valueOf: function() {return 3}, toString: function() {return {}}}; +obj.length = { + valueOf: function() { + return 3 + }, + toString: function() { + return {} + } +}; if (obj.join() !== ",,") { $ERROR('#3: obj.length = {valueOf: function() {return 3}, toString: function() {return {}}} obj.join() === ",,". Actual: ' + (obj.join())); } //CHECK#4 try { - obj.length = {valueOf: function() {return 3}, toString: function() {throw "error"}}; + obj.length = { + valueOf: function() { + return 3 + }, + toString: function() { + throw "error" + } + }; if (obj.join() !== ",,") { $ERROR('#4.1: obj.length = {valueOf: function() {return 3}, toString: function() {throw "error"}}; obj.join() === ",". Actual: ' + (obj.join())); } @@ -49,20 +74,38 @@ catch (e) { } //CHECK#5 -obj.length = {toString: function() {return 2}}; +obj.length = { + toString: function() { + return 2 + } +}; if (obj.join() !== ",") { $ERROR('#5: obj.length = {toString: function() {return 2}} obj.join() === ",". Actual: ' + (obj.join())); } //CHECK#6 -obj.length = {valueOf: function() {return {}}, toString: function() {return 2}} +obj.length = { + valueOf: function() { + return {} + }, + toString: function() { + return 2 + } +} if (obj.join() !== ",") { $ERROR('#6: obj.length = {valueOf: function() {return {}}, toString: function() {return 2}} obj.join() === ",". Actual: ' + (obj.join())); } //CHECK#7 try { - obj.length = {valueOf: function() {throw "error"}, toString: function() {return 2}}; + obj.length = { + valueOf: function() { + throw "error" + }, + toString: function() { + return 2 + } + }; obj.join(); $ERROR('#7.1: obj.length = {valueOf: function() {throw "error"}, toString: function() {return 2}}; obj.join() throw "error". Actual: ' + (obj.join())); } @@ -74,7 +117,14 @@ catch (e) { //CHECK#8 try { - obj.length = {valueOf: function() {return {}}, toString: function() {return {}}}; + obj.length = { + valueOf: function() { + return {} + }, + toString: function() { + return {} + } + }; obj.join(); $ERROR('#8.1: obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.join() throw TypeError. Actual: ' + (obj.join())); } diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A3.1_T1.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A3.1_T1.js index 2bcd9eead5..a76e7ba020 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A3.1_T1.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A3.1_T1.js @@ -11,13 +11,13 @@ description: > ---*/ //CHECK#0 -var x = new Array(0,1,2,3); +var x = new Array(0, 1, 2, 3); if (x.join("") !== "0123") { $ERROR('#0: x = new Array(0,1,2,3); x.join("") === "0123". Actual: ' + (x.join(""))); } //CHECK#1 -x = new Array(0,1,2,3); +x = new Array(0, 1, 2, 3); if (x.join("\\") !== "0\\1\\2\\3") { $ERROR('#1: x = new Array(0,1,2,3); x.join("\\") === "0\\1\\2\\3". Actual: ' + (x.join("\\"))); } diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A3.1_T2.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A3.1_T2.js index 70efad97b8..28925d93e3 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A3.1_T2.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A3.1_T2.js @@ -10,28 +10,53 @@ description: > String) ---*/ -var x = new Array(0,1,2,3); +var x = new Array(0, 1, 2, 3); //CHECK#1 -var object = {valueOf: function() {return "+"}}; +var object = { + valueOf: function() { + return "+" + } +}; if (x.join(object) !== "0[object Object]1[object Object]2[object Object]3") { $ERROR('#1: var object = {valueOf: function() {return "+"}}; x.join(object) === "0[object Object]1[object Object]2[object Object]3". Actual: ' + (x.join(object))); } //CHECK#2 -var object = {valueOf: function() {return "+"}, toString: function() {return "*"}}; +var object = { + valueOf: function() { + return "+" + }, + toString: function() { + return "*" + } +}; if (x.join(object) !== "0*1*2*3") { $ERROR('#2: var object = {valueOf: function() {return "+"}, toString: function() {return "*"}}; x.join(object) === "0*1*2*3". Actual: ' + (x.join(object))); } //CHECK#3 -var object = {valueOf: function() {return "+"}, toString: function() {return {}}}; +var object = { + valueOf: function() { + return "+" + }, + toString: function() { + return {} + } +}; if (x.join(object) !== "0+1+2+3") { $ERROR('#3: var object = {valueOf: function() {return "+"}, toString: function() {return {}}}; x.join(object) === "0+1+2+3". Actual: ' + (x.join(object))); } //CHECK#4 try { - var object = {valueOf: function() {throw "error"}, toString: function() {return "*"}}; + var object = { + valueOf: function() { + throw "error" + }, + toString: function() { + return "*" + } + }; if (x.join(object) !== "0*1*2*3") { $ERROR('#4.1: var object = {valueOf: function() {throw "error"}, toString: function() {return "*"}}; x.join(object) === "0*1*2*3". Actual: ' + (x.join(object))); } @@ -45,20 +70,38 @@ catch (e) { } //CHECK#5 -var object = {toString: function() {return "*"}}; +var object = { + toString: function() { + return "*" + } +}; if (x.join(object) !== "0*1*2*3") { $ERROR('#5: var object = {toString: function() {return "*"}}; x.join(object) === "0*1*2*3". Actual: ' + (x.join(object))); } //CHECK#6 -var object = {valueOf: function() {return {}}, toString: function() {return "*"}} +var object = { + valueOf: function() { + return {} + }, + toString: function() { + return "*" + } +} if (x.join(object) !== "0*1*2*3") { $ERROR('#6: var object = {valueOf: function() {return {}}, toString: function() {return "*"}}; x.join(object) === "0*1*2*3". Actual: ' + (x.join(object))); } //CHECK#7 try { - var object = {valueOf: function() {return "+"}, toString: function() {throw "error"}}; + var object = { + valueOf: function() { + return "+" + }, + toString: function() { + throw "error" + } + }; x.join(object); $ERROR('#7.1: var object = {valueOf: function() {return "+"}, toString: function() {throw "error"}}; x.join(object) throw "error". Actual: ' + (x.join(object))); } @@ -70,7 +113,14 @@ catch (e) { //CHECK#8 try { - var object = {valueOf: function() {return {}}, toString: function() {return {}}}; + var object = { + valueOf: function() { + return {} + }, + toString: function() { + return {} + } + }; x.join(object); $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; x.join(object) throw TypeError. Actual: ' + (x.join(object))); } @@ -82,12 +132,16 @@ catch (e) { //CHECK#9 try { - var object = {toString: function() {throw "error"}}; - [].join(object); - $ERROR('#9.1: var object = {toString: function() {throw "error"}}; [].join(object) throw "error". Actual: ' + ([].join(object))); + var object = { + toString: function() { + throw "error" + } + }; + [].join(object); + $ERROR('#9.1: var object = {toString: function() {throw "error"}}; [].join(object) throw "error". Actual: ' + ([].join(object))); } catch (e) { - if (e !== "error") { - $ERROR('#9.2: var object = {toString: function() {throw "error"}}; [].join(object) throw "error". Actual: ' + (e)); - } + if (e !== "error") { + $ERROR('#9.2: var object = {toString: function() {throw "error"}}; [].join(object) throw "error". Actual: ' + (e)); + } } diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A3.2_T1.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A3.2_T1.js index f6a4966557..e90ed6ffe7 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A3.2_T1.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A3.2_T1.js @@ -11,13 +11,13 @@ description: > ---*/ //CHECK#0 -var x = new Array("","",""); +var x = new Array("", "", ""); if (x.join("") !== "") { $ERROR('#0: var x = new Array("","",""); x.join("") === "". Actual: ' + (x.join(""))); } //CHECK#1 -var x = new Array("\\","\\","\\"); +var x = new Array("\\", "\\", "\\"); if (x.join("\\") !== "\\\\\\\\\\") { $ERROR('#1: var x = new Array("\\","\\","\\"); x.join("\\") === "\\\\\\\\\\". Actual: ' + (x.join("\\"))); } @@ -29,31 +29,31 @@ if (x.join("&") !== "&&&&&") { } //CHECK#3 -var x = new Array(true,true,true); +var x = new Array(true, true, true); if (x.join() !== "true,true,true") { - $ERROR('#3: var x = new Array(true,true,true); x.join(true,true,true) === "true,true,true". Actual: ' + (x.join(true,true,true))); + $ERROR('#3: var x = new Array(true,true,true); x.join(true,true,true) === "true,true,true". Actual: ' + (x.join(true, true, true))); } //CHECK#4 -var x = new Array(null,null,null); +var x = new Array(null, null, null); if (x.join() !== ",,") { - $ERROR('#4: var x = new Array(null,null,null); x.join(null,null,null) === ",,". Actual: ' + (x.join(null,null,null))); + $ERROR('#4: var x = new Array(null,null,null); x.join(null,null,null) === ",,". Actual: ' + (x.join(null, null, null))); } //CHECK#5 -var x = new Array(undefined,undefined,undefined); +var x = new Array(undefined, undefined, undefined); if (x.join() !== ",,") { - $ERROR('#5: var x = new Array(undefined,undefined,undefined); x.join(undefined,undefined,undefined) === ",,". Actual: ' + (x.join(undefined,undefined,undefined))); + $ERROR('#5: var x = new Array(undefined,undefined,undefined); x.join(undefined,undefined,undefined) === ",,". Actual: ' + (x.join(undefined, undefined, undefined))); } //CHECK#6 -var x = new Array(Infinity,Infinity,Infinity); +var x = new Array(Infinity, Infinity, Infinity); if (x.join() !== "Infinity,Infinity,Infinity") { - $ERROR('#6: var x = new Array(Infinity,Infinity,Infinity); x.join(Infinity,Infinity,Infinity) === "Infinity,Infinity,Infinity". Actual: ' + (x.join(Infinity,Infinity,Infinity))); + $ERROR('#6: var x = new Array(Infinity,Infinity,Infinity); x.join(Infinity,Infinity,Infinity) === "Infinity,Infinity,Infinity". Actual: ' + (x.join(Infinity, Infinity, Infinity))); } //CHECK#7 -var x = new Array(NaN,NaN,NaN); +var x = new Array(NaN, NaN, NaN); if (x.join() !== "NaN,NaN,NaN") { - $ERROR('#7: var x = new Array(NaN,NaN,NaN); x.join(NaN,NaN,NaN) === "NaN,NaN,NaN". Actual: ' + (x.join(NaN,NaN,NaN))); + $ERROR('#7: var x = new Array(NaN,NaN,NaN); x.join(NaN,NaN,NaN) === "NaN,NaN,NaN". Actual: ' + (x.join(NaN, NaN, NaN))); } diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A3.2_T2.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A3.2_T2.js index 863cead865..4dc0ff12a1 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A3.2_T2.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A3.2_T2.js @@ -9,21 +9,39 @@ description: If Type(argument) is Object, evaluate ToPrimitive(argument, String) ---*/ //CHECK#1 -var object = {valueOf: function() {return "+"}}; +var object = { + valueOf: function() { + return "+" + } +}; var x = new Array(object); if (x.join() !== "[object Object]") { $ERROR('#1: var object = {valueOf: function() {return "+"}} var x = new Array(object); x.join() === "[object Object]". Actual: ' + (x.join())); } //CHECK#2 -var object = {valueOf: function() {return "+"}, toString: function() {return "*"}}; +var object = { + valueOf: function() { + return "+" + }, + toString: function() { + return "*" + } +}; var x = new Array(object); if (x.join() !== "*") { $ERROR('#2: var object = {valueOf: function() {return "+"}, toString: function() {return "*"}} var x = new Array(object); x.join() === "*". Actual: ' + (x.join())); } //CHECK#3 -var object = {valueOf: function() {return "+"}, toString: function() {return {}}}; +var object = { + valueOf: function() { + return "+" + }, + toString: function() { + return {} + } +}; var x = new Array(object); if (x.join() !== "+") { $ERROR('#3: var object = {valueOf: function() {return "+"}, toString: function() {return {}}} var x = new Array(object); x.join() === "+". Actual: ' + (x.join())); @@ -31,7 +49,14 @@ if (x.join() !== "+") { //CHECK#4 try { - var object = {valueOf: function() {throw "error"}, toString: function() {return "*"}}; + var object = { + valueOf: function() { + throw "error" + }, + toString: function() { + return "*" + } + }; var x = new Array(object); if (x.join() !== "*") { $ERROR('#4.1: var object = {valueOf: function() {throw "error"}, toString: function() {return "*"}} var x = new Array(object); x.join() === "*". Actual: ' + (x.join())); @@ -46,14 +71,25 @@ catch (e) { } //CHECK#5 -var object = {toString: function() {return "*"}}; +var object = { + toString: function() { + return "*" + } +}; var x = new Array(object); if (x.join() !== "*") { $ERROR('#5: var object = {toString: function() {return "*"}} var x = new Array(object); x.join() === "*". Actual: ' + (x.join())); } //CHECK#6 -var object = {valueOf: function() {return {}}, toString: function() {return "*"}} +var object = { + valueOf: function() { + return {} + }, + toString: function() { + return "*" + } +} var x = new Array(object); if (x.join() !== "*") { $ERROR('#6: var object = {valueOf: function() {return {}}, toString: function() {return "*"}} var x = new Array(object); x.join() === "*". Actual: ' + (x.join())); @@ -61,7 +97,14 @@ if (x.join() !== "*") { //CHECK#7 try { - var object = {valueOf: function() {return "+"}, toString: function() {throw "error"}}; + var object = { + valueOf: function() { + return "+" + }, + toString: function() { + throw "error" + } + }; var x = new Array(object); x.join(); $ERROR('#7.1: var object = {valueOf: function() {return "+"}, toString: function() {throw "error"}} var x = new Array(object); x.join() throw "error". Actual: ' + (x.join())); @@ -74,7 +117,14 @@ catch (e) { //CHECK#8 try { - var object = {valueOf: function() {return {}}, toString: function() {return {}}}; + var object = { + valueOf: function() { + return {} + }, + toString: function() { + return {} + } + }; var x = new Array(object); x.join(); $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}} var x = new Array(object); x.join() throw TypeError. Actual: ' + (x.join())); diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A5_T1.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A5_T1.js index e8e7817939..90ecc5cfff 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A5_T1.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A5_T1.js @@ -22,7 +22,9 @@ if (x.join() !== "0,1") { Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.join = Array.prototype.join; -x = {0:0}; +x = { + 0: 0 +}; if (x.join() !== "0,1") { $ERROR('#2: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.join = Array.prototype.join; x = {0:0}; x.join() === "0,1". Actual: ' + (x.join())); } diff --git a/test/built-ins/Array/prototype/keys/iteration-mutable.js b/test/built-ins/Array/prototype/keys/iteration-mutable.js index c20b26ee95..d2a2ecdbbb 100644 --- a/test/built-ins/Array/prototype/keys/iteration-mutable.js +++ b/test/built-ins/Array/prototype/keys/iteration-mutable.js @@ -20,7 +20,7 @@ var result; array.push('a'); result = iterator.next(); -assert.sameValue(result.done, false , 'First result `done` flag'); +assert.sameValue(result.done, false, 'First result `done` flag'); assert.sameValue(result.value, 0, 'First result `value`'); result = iterator.next(); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-1.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-1.js index 39fc4df94e..a1048adc8f 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-1.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-1.js @@ -9,5 +9,5 @@ description: Array.prototype.lastIndexOf applied to undefined throws a TypeError assert.throws(TypeError, function() { - Array.prototype.lastIndexOf.call(undefined); + Array.prototype.lastIndexOf.call(undefined); }); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-10.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-10.js index f2f1afb8b2..ba6aec098f 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-10.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-10.js @@ -7,7 +7,7 @@ es5id: 15.4.4.15-1-10 description: Array.prototype.lastIndexOf applied to the Math object ---*/ - Math.length = 2; - Math[1] = 100; +Math.length = 2; +Math[1] = 100; assert.sameValue(Array.prototype.lastIndexOf.call(Math, 100), 1, 'Array.prototype.lastIndexOf.call(Math, 100)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-11.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-11.js index acfcd13a2a..ed42913de9 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-11.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-11.js @@ -7,8 +7,8 @@ es5id: 15.4.4.15-1-11 description: Array.prototype.lastIndexOf applied to Date object ---*/ - var obj = new Date(); - obj.length = 2; - obj[1] = true; +var obj = new Date(); +obj.length = 2; +obj[1] = true; assert.sameValue(Array.prototype.lastIndexOf.call(obj, true), 1, 'Array.prototype.lastIndexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-12.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-12.js index 54d128eb5f..26b2c14920 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-12.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-12.js @@ -7,8 +7,8 @@ es5id: 15.4.4.15-1-12 description: Array.prototype.lastIndexOf applied to RegExp object ---*/ - var obj = new RegExp("afdasf"); - obj.length = 100; - obj[1] = "afdasf"; +var obj = new RegExp("afdasf"); +obj.length = 100; +obj[1] = "afdasf"; assert.sameValue(Array.prototype.lastIndexOf.call(obj, "afdasf"), 1, 'Array.prototype.lastIndexOf.call(obj, "afdasf")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-13.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-13.js index e6a2d81668..8ac92c3852 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-13.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-13.js @@ -7,9 +7,9 @@ es5id: 15.4.4.15-1-13 description: Array.prototype.lastIndexOf applied to the JSON object ---*/ - var targetObj = {}; +var targetObj = {}; - JSON[3] = targetObj; - JSON.length = 5; +JSON[3] = targetObj; +JSON.length = 5; assert.sameValue(Array.prototype.lastIndexOf.call(JSON, targetObj), 3, 'Array.prototype.lastIndexOf.call(JSON, targetObj)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-14.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-14.js index 258d52b25c..13cd332841 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-14.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-14.js @@ -7,8 +7,8 @@ es5id: 15.4.4.15-1-14 description: Array.prototype.lastIndexOf applied to Error object ---*/ - var obj = new SyntaxError(); - obj.length = 2; - obj[1] = Infinity; +var obj = new SyntaxError(); +obj.length = 2; +obj[1] = Infinity; assert.sameValue(Array.prototype.lastIndexOf.call(obj, Infinity), 1, 'Array.prototype.lastIndexOf.call(obj, Infinity)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-15.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-15.js index 717e839b36..4d0dcb42a6 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-15.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-15.js @@ -7,8 +7,8 @@ es5id: 15.4.4.15-1-15 description: Array.prototype.lastIndexOf applied to the Arguments object ---*/ - var obj = (function fun() { - return arguments; - }(1, 2, 3)); +var obj = (function fun() { + return arguments; +}(1, 2, 3)); assert.sameValue(Array.prototype.lastIndexOf.call(obj, 2), 1, 'Array.prototype.lastIndexOf.call(obj, 2)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-2.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-2.js index d09b72ba63..ee2d9c1dc9 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-2.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-2.js @@ -9,5 +9,5 @@ description: Array.prototype.lastIndexOf applied to null throws a TypeError assert.throws(TypeError, function() { - Array.prototype.lastIndexOf.call(null); + Array.prototype.lastIndexOf.call(null); }); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-3.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-3.js index 07823a7430..80339e81ed 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-3.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-3.js @@ -7,7 +7,7 @@ es5id: 15.4.4.15-1-3 description: Array.prototype.lastIndexOf applied to boolean primitive ---*/ - Boolean.prototype[1] = true; - Boolean.prototype.length = 2; +Boolean.prototype[1] = true; +Boolean.prototype.length = 2; assert.sameValue(Array.prototype.lastIndexOf.call(true, true), 1, 'Array.prototype.lastIndexOf.call(true, true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-4.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-4.js index d04aef167e..6a71084ce9 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-4.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-4.js @@ -7,8 +7,8 @@ es5id: 15.4.4.15-1-4 description: Array.prototype.lastIndexOf applied to Boolean object ---*/ - var obj = new Boolean(false); - obj.length = 2; - obj[1] = true; +var obj = new Boolean(false); +obj.length = 2; +obj[1] = true; assert.sameValue(Array.prototype.lastIndexOf.call(obj, true), 1, 'Array.prototype.lastIndexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-5.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-5.js index 1119ac1aaf..840ae225c2 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-5.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-5.js @@ -7,7 +7,7 @@ es5id: 15.4.4.15-1-5 description: Array.prototype.lastIndexOf applied to number primitive ---*/ - Number.prototype[1] = isNaN; - Number.prototype.length = 2; +Number.prototype[1] = isNaN; +Number.prototype.length = 2; assert.sameValue(Array.prototype.lastIndexOf.call(5, isNaN), 1, 'Array.prototype.lastIndexOf.call(5, isNaN)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-6.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-6.js index 5e96b816e2..e35973cd83 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-6.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-6.js @@ -7,8 +7,8 @@ es5id: 15.4.4.15-1-6 description: Array.prototype.lastIndexOf applied to Number object ---*/ - var obj = new Number(-3); - obj.length = 2; - obj[1] = true; +var obj = new Number(-3); +obj.length = 2; +obj[1] = true; assert.sameValue(Array.prototype.lastIndexOf.call(obj, true), 1, 'Array.prototype.lastIndexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-8.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-8.js index d623c9beab..9983969957 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-8.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-8.js @@ -7,6 +7,6 @@ es5id: 15.4.4.15-1-8 description: Array.prototype.lastIndexOf applied to String object ---*/ - var obj = new String("undefined"); +var obj = new String("undefined"); assert.sameValue(Array.prototype.lastIndexOf.call(obj, "f"), 4, 'Array.prototype.lastIndexOf.call(obj, "f")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-9.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-9.js index 7372b6b1f7..6d69baa7c3 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-9.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-9.js @@ -7,9 +7,9 @@ es5id: 15.4.4.15-1-9 description: Array.prototype.lastIndexOf applied to Function object ---*/ - var obj = function (a, b) { - return a + b; - }; - obj[1] = true; +var obj = function(a, b) { + return a + b; +}; +obj[1] = true; assert.sameValue(Array.prototype.lastIndexOf.call(obj, true), 1, 'Array.prototype.lastIndexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-1.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-1.js index 5da3312da3..09c37e87c7 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-1.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-1.js @@ -9,7 +9,11 @@ description: > Array-like object ---*/ - var obj = { 1: null, 2: undefined, length: 2 }; +var obj = { + 1: null, + 2: undefined, + length: 2 +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, null), 1, 'Array.prototype.lastIndexOf.call(obj, null)'); assert.sameValue(Array.prototype.lastIndexOf.call(obj, undefined), -1, 'Array.prototype.lastIndexOf.call(obj, undefined)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-10.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-10.js index a77b62b124..8a17af9c01 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-10.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-10.js @@ -9,20 +9,20 @@ description: > property on an Array-like object ---*/ - var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 2; - }, - configurable: true - }); +var proto = {}; +Object.defineProperty(proto, "length", { + get: function() { + return 2; + }, + configurable: true +}); - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[1] = 1; - child[2] = 2; +var child = new Con(); +child[1] = 1; +child[2] = 2; assert.sameValue(Array.prototype.lastIndexOf.call(child, 1), 1, 'Array.prototype.lastIndexOf.call(child, 1)'); assert.sameValue(Array.prototype.lastIndexOf.call(child, 2), -1, 'Array.prototype.lastIndexOf.call(child, 2)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-11.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-11.js index 0ae767b6f0..ab2b9fdd70 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-11.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-11.js @@ -9,10 +9,12 @@ description: > without a get function on an Array-like object ---*/ - var obj = { 0: 1 }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); +var obj = { + 0: 1 +}; +Object.defineProperty(obj, "length", { + set: function() {}, + configurable: true +}); assert.sameValue(Array.prototype.lastIndexOf.call(obj, 1), -1, 'Array.prototype.lastIndexOf.call(obj, 1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-12.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-12.js index 98cf2147a2..fcd9b41d15 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-12.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-12.js @@ -10,17 +10,19 @@ description: > property on an Array-like object ---*/ - Object.defineProperty(Object.prototype, "length", { - get: function () { - return 20; - }, - configurable: true - }); +Object.defineProperty(Object.prototype, "length", { + get: function() { + return 20; + }, + configurable: true +}); - var obj = { 1: 1 }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); +var obj = { + 1: 1 +}; +Object.defineProperty(obj, "length", { + set: function() {}, + configurable: true +}); assert.sameValue(Array.prototype.lastIndexOf.call(obj, 1), -1, 'Array.prototype.lastIndexOf.call(obj, 1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-13.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-13.js index 59045d59d4..6f379e8861 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-13.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-13.js @@ -9,16 +9,16 @@ description: > property without a get function on an Array-like object ---*/ - var proto = {}; - Object.defineProperty(proto, "length", { - set: function () { }, - configurable: true - }); +var proto = {}; +Object.defineProperty(proto, "length", { + set: function() {}, + configurable: true +}); - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[0] = true; +var child = new Con(); +child[0] = true; assert.sameValue(Array.prototype.lastIndexOf.call(child, true), -1, 'Array.prototype.lastIndexOf.call(child, true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-14.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-14.js index f88b2b3c84..f47f32dc70 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-14.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-14.js @@ -9,6 +9,9 @@ description: > Array-like object ---*/ - var obj = { 0: null, 1: undefined }; +var obj = { + 0: null, + 1: undefined +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, null), -1, 'Array.prototype.lastIndexOf.call(obj, null)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-17.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-17.js index 02ea04ddd9..62532d79aa 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-17.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-17.js @@ -9,11 +9,11 @@ description: > implements its own property get method ---*/ - var targetObj = function () { }; - var func = function (a, b) { - arguments[2] = function () { }; - return Array.prototype.lastIndexOf.call(arguments, targetObj) === 1 && - Array.prototype.lastIndexOf.call(arguments, arguments[2]) === -1; - }; +var targetObj = function() {}; +var func = function(a, b) { + arguments[2] = function() {}; + return Array.prototype.lastIndexOf.call(arguments, targetObj) === 1 && + Array.prototype.lastIndexOf.call(arguments, arguments[2]) === -1; +}; assert(func(0, targetObj), 'func(0, targetObj) !== true'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-18.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-18.js index 6cf87f6445..f2a6682fe8 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-18.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-18.js @@ -9,9 +9,9 @@ description: > implements its own property get method ---*/ - var str = new String("012"); +var str = new String("012"); - String.prototype[3] = "3"; +String.prototype[3] = "3"; assert.sameValue(Array.prototype.lastIndexOf.call(str, "2"), 2, 'Array.prototype.lastIndexOf.call(str, "2")'); assert.sameValue(Array.prototype.lastIndexOf.call(str, "3"), -1, 'Array.prototype.lastIndexOf.call(str, "3")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-19.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-19.js index 89565918b6..e5542f0ed6 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-19.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-19.js @@ -9,11 +9,11 @@ description: > implements its own property get method ---*/ - var obj = function (a, b) { - return a + b; - }; - obj[1] = "b"; - obj[2] = "c"; +var obj = function(a, b) { + return a + b; +}; +obj[1] = "b"; +obj[2] = "c"; assert.sameValue(Array.prototype.lastIndexOf.call(obj, obj[1]), 1, 'Array.prototype.lastIndexOf.call(obj, obj[1])'); assert.sameValue(Array.prototype.lastIndexOf.call(obj, obj[2]), -1, 'Array.prototype.lastIndexOf.call(obj, obj[2])'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-2.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-2.js index 6514929541..134cd566a4 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-2.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-2.js @@ -9,9 +9,9 @@ description: > Array ---*/ - var targetObj = {}; +var targetObj = {}; - Array.prototype[2] = targetObj; +Array.prototype[2] = targetObj; assert.sameValue([0, targetObj].lastIndexOf(targetObj), 1, '[0, targetObj].lastIndexOf(targetObj)'); assert.sameValue([0, 1].lastIndexOf(targetObj), -1, '[0, 1].lastIndexOf(targetObj)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-3.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-3.js index b500b9f10e..5d2a8bbf1f 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-3.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-3.js @@ -9,13 +9,15 @@ description: > overrides an inherited data property on an Array-like object ---*/ - var proto = {length: 0}; +var proto = { + length: 0 +}; - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 2; - child[1] = child; +var child = new Con(); +child.length = 2; +child[1] = child; assert.sameValue(Array.prototype.lastIndexOf.call(child, child), 1, 'Array.prototype.lastIndexOf.call(child, child)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-4.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-4.js index a13cc99a93..0a8f124f3a 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-4.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-4.js @@ -9,10 +9,10 @@ description: > that overrides an inherited data property on an Array ---*/ - var targetObj = {}; - var arrProtoLen; +var targetObj = {}; +var arrProtoLen; - arrProtoLen = Array.prototype.length; - Array.prototype.length = 0; +arrProtoLen = Array.prototype.length; +Array.prototype.length = 0; assert.sameValue([0, targetObj, 2].lastIndexOf(targetObj), 1, '[0, targetObj, 2].lastIndexOf(targetObj)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-5.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-5.js index fa29875100..33e9075e60 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-5.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-5.js @@ -9,23 +9,23 @@ description: > overrides an inherited accessor property on an Array-like object ---*/ - var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 0; - }, - configurable: true - }); +var proto = {}; +Object.defineProperty(proto, "length", { + get: function() { + return 0; + }, + configurable: true +}); - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); +var child = new Con(); - Object.defineProperty(child, "length", { - value: 2, - configurable: true - }); - child[1] = null; +Object.defineProperty(child, "length", { + value: 2, + configurable: true +}); +child[1] = null; assert.sameValue(Array.prototype.lastIndexOf.call(child, null), 1, 'Array.prototype.lastIndexOf.call(child, null)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-6.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-6.js index bfe82a3ac7..05900f832f 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-6.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-6.js @@ -9,14 +9,16 @@ description: > property on an Array-like object ---*/ - var proto = { length: 2 }; +var proto = { + length: 2 +}; - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[1] = "x"; - child[2] = "y"; +var child = new Con(); +child[1] = "x"; +child[2] = "y"; assert.sameValue(Array.prototype.lastIndexOf.call(child, "x"), 1, 'Array.prototype.lastIndexOf.call(child, "x")'); assert.sameValue(Array.prototype.lastIndexOf.call(child, "y"), -1, 'Array.prototype.lastIndexOf.call(child, "y")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-7.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-7.js index d5b4431157..4c38da5be2 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-7.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-7.js @@ -9,14 +9,17 @@ description: > an Array-like object ---*/ - var obj = { 1: true, 2: false }; +var obj = { + 1: true, + 2: false +}; - Object.defineProperty(obj, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return 2; + }, + configurable: true +}); assert.sameValue(Array.prototype.lastIndexOf.call(obj, true), 1, 'Array.prototype.lastIndexOf.call(obj, true)'); assert.sameValue(Array.prototype.lastIndexOf.call(obj, false), -1, 'Array.prototype.lastIndexOf.call(obj, false)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-8.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-8.js index 61f659a699..ef7ea0a519 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-8.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-8.js @@ -9,19 +9,21 @@ description: > that overrides an inherited data property on an Array-like object ---*/ - var proto = { length: 0 }; +var proto = { + length: 0 +}; - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[1] = eval; +var child = new Con(); +child[1] = eval; - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(child, "length", { + get: function() { + return 2; + }, + configurable: true +}); assert.sameValue(Array.prototype.lastIndexOf.call(child, eval), 1, 'Array.prototype.lastIndexOf.call(child, eval)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-9.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-9.js index 3e0695eb83..9bc7a8b5bd 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-9.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-9.js @@ -10,25 +10,25 @@ description: > object ---*/ - var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 0; - }, - configurable: true - }); +var proto = {}; +Object.defineProperty(proto, "length", { + get: function() { + return 0; + }, + configurable: true +}); - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[1] = true; +var child = new Con(); +child[1] = true; - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(child, "length", { + get: function() { + return 2; + }, + configurable: true +}); assert.sameValue(Array.prototype.lastIndexOf.call(child, true), 1, 'Array.prototype.lastIndexOf.call(child, true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-1.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-1.js index 374141ad0b..1141fd90a1 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-1.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-1.js @@ -7,6 +7,10 @@ es5id: 15.4.4.15-3-1 description: Array.prototype.lastIndexOf - value of 'length' is undefined ---*/ - var obj = { 0: 1, 1: 1, length: undefined }; +var obj = { + 0: 1, + 1: 1, + length: undefined +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, 1), -1, 'Array.prototype.lastIndexOf.call(obj, 1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-10.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-10.js index c6da763395..761fd85c13 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-10.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-10.js @@ -9,6 +9,9 @@ description: > is NaN) ---*/ - var obj = { 0: 0, length: NaN }; +var obj = { + 0: 0, + length: NaN +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, 0), -1, 'Array.prototype.lastIndexOf.call(obj, 0)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-11.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-11.js index f0838068e5..dae527da98 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-11.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-11.js @@ -9,7 +9,11 @@ description: > containing positive number ---*/ - var obj = {1: true, 2: false, length: "2"}; +var obj = { + 1: true, + 2: false, + length: "2" +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, true), 1, 'Array.prototype.lastIndexOf.call(obj, true)'); assert.sameValue(Array.prototype.lastIndexOf.call(obj, false), -1, 'Array.prototype.lastIndexOf.call(obj, false)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-12.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-12.js index 6811ff35d8..99df97b76d 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-12.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-12.js @@ -9,7 +9,11 @@ description: > containing negative number ---*/ - var obj = {1: null, 2: undefined, length: "-4294967294"}; +var obj = { + 1: null, + 2: undefined, + length: "-4294967294" +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, null), -1, 'Array.prototype.lastIndexOf.call(obj, null)'); assert.sameValue(Array.prototype.lastIndexOf.call(obj, undefined), -1, 'Array.prototype.lastIndexOf.call(obj, undefined)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-13.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-13.js index afdcf21df2..394744d693 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-13.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-13.js @@ -9,7 +9,11 @@ description: > containing a decimal number ---*/ - var obj = { 4: 4, 5: 5, length: "5.512345" }; +var obj = { + 4: 4, + 5: 5, + length: "5.512345" +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, 4), 4, 'Array.prototype.lastIndexOf.call(obj, 4)'); assert.sameValue(Array.prototype.lastIndexOf.call(obj, 5), -1, 'Array.prototype.lastIndexOf.call(obj, 5)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-14.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-14.js index a49316794d..3751aeb805 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-14.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-14.js @@ -9,6 +9,10 @@ description: > containing -Infinity ---*/ - var objThree = { 0: true, 1: true, length: "-Infinity" }; +var objThree = { + 0: true, + 1: true, + length: "-Infinity" +}; assert.sameValue(Array.prototype.lastIndexOf.call(objThree, true), -1, 'Array.prototype.lastIndexOf.call(objThree, true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-15.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-15.js index 281305e13f..cb669fc016 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-15.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-15.js @@ -9,7 +9,11 @@ description: > containing an exponential number ---*/ - var obj = {229: 229, 230: 2.3E2, length: "2.3E2"}; +var obj = { + 229: 229, + 230: 2.3E2, + length: "2.3E2" +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, 229), 229, 'Array.prototype.lastIndexOf.call(obj, 229)'); assert.sameValue(Array.prototype.lastIndexOf.call(obj, 2.3E2), -1, 'Array.prototype.lastIndexOf.call(obj, 2.3E2)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-16.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-16.js index 6c0e5e388d..653a8ea366 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-16.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-16.js @@ -9,7 +9,11 @@ description: > is able to be converted into hex number ---*/ - var obj = { 2573: 2573, 2574: 0x000A0E, length: "0x000A0E" }; +var obj = { + 2573: 2573, + 2574: 0x000A0E, + length: "0x000A0E" +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, 2573), 2573, 'Array.prototype.lastIndexOf.call(obj, 2573)'); assert.sameValue(Array.prototype.lastIndexOf.call(obj, 0x000A0E), -1, 'Array.prototype.lastIndexOf.call(obj, 0x000A0E)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-17.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-17.js index c603231587..345e54e146 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-17.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-17.js @@ -9,7 +9,11 @@ description: > containing a number with leading zeros ---*/ - var obj = { 1: 1, 2: 2, length: "0002.0" }; +var obj = { + 1: 1, + 2: 2, + length: "0002.0" +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, 1), 1, 'Array.prototype.lastIndexOf.call(obj, 1)'); assert.sameValue(Array.prototype.lastIndexOf.call(obj, 2), -1, 'Array.prototype.lastIndexOf.call(obj, 2)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-18.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-18.js index a56ab67a71..76161d8da0 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-18.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-18.js @@ -9,7 +9,10 @@ description: > can't convert to a number ---*/ - var targetObj = new String("123abc123"); - var obj = { 0: targetObj, length: "123abc123" }; +var targetObj = new String("123abc123"); +var obj = { + 0: targetObj, + length: "123abc123" +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, targetObj), -1, 'Array.prototype.lastIndexOf.call(obj, targetObj)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-19.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-19.js index 419be48569..bbbf635c8b 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-19.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-19.js @@ -9,23 +9,23 @@ description: > has an own toString method ---*/ - // objects inherit the default valueOf() method from Object - // that simply returns itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. +// objects inherit the default valueOf() method from Object +// that simply returns itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. - var targetObj = this; - var obj = { - 1: targetObj, - 2: 2, +var targetObj = this; +var obj = { + 1: targetObj, + 2: 2, - length: { - toString: function () { - return '2'; - } - } - }; + length: { + toString: function() { + return '2'; + } + } +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, targetObj), 1, 'Array.prototype.lastIndexOf.call(obj, targetObj)'); assert.sameValue(Array.prototype.lastIndexOf.call(obj, 2), -1, 'Array.prototype.lastIndexOf.call(obj, 2)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-2.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-2.js index 16314cad2c..1f603c3804 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-2.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-2.js @@ -9,7 +9,11 @@ description: > boolean (value is true) ---*/ - var obj = { 0: 0, 1: 1, length: true }; +var obj = { + 0: 0, + 1: 1, + length: true +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, 0), 0, 'Array.prototype.lastIndexOf.call(obj, 0)'); assert.sameValue(Array.prototype.lastIndexOf.call(obj, 1), -1, 'Array.prototype.lastIndexOf.call(obj, 1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-20.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-20.js index 56d05e1a12..51df323239 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-20.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-20.js @@ -9,17 +9,17 @@ description: > has an own valueOf method ---*/ - //valueOf method will be invoked first, since hint is Number - var obj = { - 1: true, - 2: 2, +//valueOf method will be invoked first, since hint is Number +var obj = { + 1: true, + 2: 2, - length: { - valueOf: function () { - return 2; - } - } - }; + length: { + valueOf: function() { + return 2; + } + } +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, true), 1, 'Array.prototype.lastIndexOf.call(obj, true)'); assert.sameValue(Array.prototype.lastIndexOf.call(obj, 2), -1, 'Array.prototype.lastIndexOf.call(obj, 2)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-21.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-21.js index d568434fa9..4ffe9d3bfd 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-21.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-21.js @@ -10,24 +10,24 @@ description: > returns a string ---*/ - var toStringAccessed = false; - var valueOfAccessed = false; +var toStringAccessed = false; +var valueOfAccessed = false; - var targetObj = this; - var obj = { - 1: targetObj, - length: { - toString: function () { - toStringAccessed = true; - return '3'; - }, +var targetObj = this; +var obj = { + 1: targetObj, + length: { + toString: function() { + toStringAccessed = true; + return '3'; + }, - valueOf: function () { - valueOfAccessed = true; - return {}; - } - } - }; + valueOf: function() { + valueOfAccessed = true; + return {}; + } + } +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, targetObj), 1, 'Array.prototype.lastIndexOf.call(obj, targetObj)'); assert(toStringAccessed, 'toStringAccessed !== true'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-22.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-22.js index 9624defeb8..69aa3c8f9e 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-22.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-22.js @@ -10,26 +10,26 @@ description: > return primitive values ---*/ - var toStringAccessed = false; - var valueOfAccessed = false; +var toStringAccessed = false; +var valueOfAccessed = false; - var obj = { - 1: true, - length: { - toString: function () { - toStringAccessed = true; - return {}; - }, +var obj = { + 1: true, + length: { + toString: function() { + toStringAccessed = true; + return {}; + }, - valueOf: function () { - valueOfAccessed = true; - return {}; - } - } - }; + valueOf: function() { + valueOfAccessed = true; + return {}; + } + } +}; assert.throws(TypeError, function() { - Array.prototype.lastIndexOf.call(obj, true); + Array.prototype.lastIndexOf.call(obj, true); }); assert(toStringAccessed, 'toStringAccessed'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-23.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-23.js index a69b33edfc..178517a413 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-23.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-23.js @@ -10,29 +10,29 @@ description: > valueOf methods ---*/ - var toStringAccessed = false; - var valueOfAccessed = false; +var toStringAccessed = false; +var valueOfAccessed = false; - var proto = { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - }; +var proto = { + valueOf: function() { + valueOfAccessed = true; + return 2; + } +}; - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.toString = function () { - toStringAccessed = true; - return 2; - }; +var child = new Con(); +child.toString = function() { + toStringAccessed = true; + return 2; +}; - var obj = { - 1: child, - length: child - }; +var obj = { + 1: child, + length: child +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, child), 1, 'Array.prototype.lastIndexOf.call(obj, child)'); assert(valueOfAccessed, 'valueOfAccessed !== true'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-24.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-24.js index 31ffe0ed73..08763b5905 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-24.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-24.js @@ -9,7 +9,11 @@ description: > non-integer, ensure truncation occurs in the proper direction ---*/ - var obj = { 122: true, 123: false, length: 123.5 }; +var obj = { + 122: true, + 123: false, + length: 123.5 +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, true), 122, 'Array.prototype.lastIndexOf.call(obj, true)'); assert.sameValue(Array.prototype.lastIndexOf.call(obj, false), -1, 'Array.prototype.lastIndexOf.call(obj, false)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-25.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-25.js index 12e37f63be..fe78a4e2db 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-25.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-25.js @@ -9,7 +9,11 @@ description: > non-integer ---*/ - var obj = { 1: true, 2: false, length: -4294967294.5 }; +var obj = { + 1: true, + 2: false, + length: -4294967294.5 +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, true), -1, 'Array.prototype.lastIndexOf.call(obj, true)'); assert.sameValue(Array.prototype.lastIndexOf.call(obj, false), -1, 'Array.prototype.lastIndexOf.call(obj, false)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-28.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-28.js index a28fbc7465..4768053245 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-28.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-28.js @@ -9,12 +9,12 @@ description: > (2^32) ---*/ - var targetObj = {}; - var obj = { - 0: targetObj, - 4294967294: targetObj, - 4294967295: targetObj, - length: 4294967296 - }; +var targetObj = {}; +var obj = { + 0: targetObj, + 4294967294: targetObj, + 4294967295: targetObj, + length: 4294967296 +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, targetObj), 4294967295, 'verify length is 4294967296 finally'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-3.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-3.js index 069585fb21..98bb896dff 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-3.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-3.js @@ -9,6 +9,9 @@ description: > is 0) ---*/ - var obj = { 0: "undefined", length: 0 }; +var obj = { + 0: "undefined", + length: 0 +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, "undefined"), -1, 'Array.prototype.lastIndexOf.call(obj, "undefined")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-4.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-4.js index 1c8a99b9cf..5e6cedae92 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-4.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-4.js @@ -9,6 +9,9 @@ description: > is -0) ---*/ - var obj = { 0: true, length: -0 }; +var obj = { + 0: true, + length: -0 +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, true), -1, 'Array.prototype.lastIndexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-5.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-5.js index 927ee3daa2..60a1721895 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-5.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-5.js @@ -9,6 +9,9 @@ description: > is +0) ---*/ - var obj = { 0: +0, length: +0 }; +var obj = { + 0: +0, + length: +0 +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, +0), -1, 'Array.prototype.lastIndexOf.call(obj, +0)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-6.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-6.js index 8aec6c2c1d..5f097dbb01 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-6.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-6.js @@ -9,7 +9,11 @@ description: > is a positive number) ---*/ - var obj = { 99: true, 100: 100, length: 100 }; +var obj = { + 99: true, + 100: 100, + length: 100 +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, true), 99, 'Array.prototype.lastIndexOf.call(obj, true)'); assert.sameValue(Array.prototype.lastIndexOf.call(obj, 100), -1, 'Array.prototype.lastIndexOf.call(obj, 100)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-7.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-7.js index ff7fbc0d28..8f91298497 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-7.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-7.js @@ -9,7 +9,11 @@ description: > is a negative number) ---*/ - var obj = { 4: -Infinity, 5: Infinity, length: 5 - Math.pow(2, 32) }; +var obj = { + 4: -Infinity, + 5: Infinity, + length: 5 - Math.pow(2, 32) +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, -Infinity), -1, 'Array.prototype.lastIndexOf.call(obj, -Infinity)'); assert.sameValue(Array.prototype.lastIndexOf.call(obj, Infinity), -1, 'Array.prototype.lastIndexOf.call(obj, Infinity)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-9.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-9.js index 39856e7132..b938783416 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-9.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-9.js @@ -9,6 +9,9 @@ description: > is -Infinity) ---*/ - var obj = { 0: 0, length: -Infinity }; +var obj = { + 0: 0, + length: -Infinity +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, 0), -1, 'Array.prototype.lastIndexOf.call(obj, 0)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-1.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-1.js index f073190b94..f6fc912532 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-1.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-1.js @@ -9,6 +9,6 @@ description: > array) ---*/ - var i = [].lastIndexOf(42); +var i = [].lastIndexOf(42); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-10.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-10.js index 72514438f6..1899442e7a 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-10.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-10.js @@ -7,7 +7,11 @@ es5id: 15.4.4.15-4-10 description: Array.prototype.lastIndexOf - 'length' is a number of value -6e-1 ---*/ - var targetObj = []; - var obj = { 0: targetObj, 100: targetObj, length: -6e-1 }; +var targetObj = []; +var obj = { + 0: targetObj, + 100: targetObj, + length: -6e-1 +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, targetObj), -1, 'Array.prototype.lastIndexOf.call(obj, targetObj)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-11.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-11.js index fdf1b598e2..cec59b134a 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-11.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-11.js @@ -7,7 +7,11 @@ es5id: 15.4.4.15-4-11 description: Array.prototype.lastIndexOf - 'length' is an empty string ---*/ - var targetObj = []; - var obj = { 0: targetObj, 100: targetObj, length: "" }; +var targetObj = []; +var obj = { + 0: targetObj, + 100: targetObj, + length: "" +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, targetObj), -1, 'Array.prototype.lastIndexOf.call(obj, targetObj)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-2.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-2.js index ced61de4cc..5ed7ad2496 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-2.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-2.js @@ -9,7 +9,9 @@ description: > overridden to null (type conversion)) ---*/ - var i = Array.prototype.lastIndexOf.call({length: null}, 1); +var i = Array.prototype.lastIndexOf.call({ + length: null +}, 1); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-3.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-3.js index 52e2fa68c1..2004e36780 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-3.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-3.js @@ -9,7 +9,9 @@ description: > overridden to false (type conversion)) ---*/ - var i = Array.prototype.lastIndexOf.call({length: false}, 1); +var i = Array.prototype.lastIndexOf.call({ + length: false +}, 1); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-4.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-4.js index 592a69274d..b2babee1dd 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-4.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-4.js @@ -9,12 +9,15 @@ description: > 'array' with length 0 ) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 0; +foo.prototype = new Array(1, 2, 3); - var i = Array.prototype.lastIndexOf.call({length: 0}, 1); +function foo() {} +var f = new foo(); +f.length = 0; + +var i = Array.prototype.lastIndexOf.call({ + length: 0 +}, 1); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-5.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-5.js index f664184bc1..9e72015657 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-5.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-5.js @@ -9,7 +9,9 @@ description: > overridden to '0' (type conversion)) ---*/ - var i = Array.prototype.lastIndexOf.call({length: '0'}, 1); +var i = Array.prototype.lastIndexOf.call({ + length: '0' +}, 1); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-6.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-6.js index 2a81100b76..1362e14aed 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-6.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-6.js @@ -9,7 +9,13 @@ description: > (subclassed Array, length overridden with obj with valueOf) ---*/ - var i = Array.prototype.lastIndexOf.call({length: { valueOf: function () { return 0;}}}, 1); +var i = Array.prototype.lastIndexOf.call({ + length: { + valueOf: function() { + return 0; + } + } +}, 1); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-7.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-7.js index cf238e3e2a..57850a0270 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-7.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-7.js @@ -9,19 +9,30 @@ description: > is object overridden with obj w/o valueOf (toString)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - var o = { toString: function () { return '0';}}; - f.length = o; +function foo() {} +var f = new foo(); - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - var i = Array.prototype.lastIndexOf.call({length: { toString: function () { return '0';}}}, 1); +var o = { + toString: function() { + return '0'; + } +}; +f.length = o; + +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. +var i = Array.prototype.lastIndexOf.call({ + length: { + toString: function() { + return '0'; + } + } +}, 1); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-8.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-8.js index 90fdbad630..ae98ed9f0f 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-8.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-8.js @@ -9,20 +9,22 @@ description: > an empty array) ---*/ - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. - var i = Array.prototype.lastIndexOf.call({length: [ ]}, 1); +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. +// +// The toString( ) method on Array converts the array elements to strings, +// then returns the result of concatenating these strings, with commas in +// between. An array with no elements converts to the empty string, which +// converts to the number 0. If an array has a single element that is a +// number n, the array converts to a string representation of n, which is +// then converted back to n itself. If an array contains more than one element, +// or if its one element is not a number, the array converts to NaN. +var i = Array.prototype.lastIndexOf.call({ + length: [] +}, 1); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-9.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-9.js index 6ebf6b4eb2..7f758adecc 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-9.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-9.js @@ -7,7 +7,11 @@ es5id: 15.4.4.15-4-9 description: Array.prototype.lastIndexOf - 'length' is a number of value 0.1 ---*/ - var targetObj = []; - var obj = { 0: targetObj, 100: targetObj, length: 0.1 }; +var targetObj = []; +var obj = { + 0: targetObj, + 100: targetObj, + length: 0.1 +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, targetObj), -1, 'Array.prototype.lastIndexOf.call(obj, targetObj)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-1.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-1.js index 44f9403549..f632c5bf9b 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-1.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-1.js @@ -7,7 +7,7 @@ es5id: 15.4.4.15-5-1 description: Array.prototype.lastIndexOf when fromIndex is string ---*/ - var a = new Array(0,1,1); +var a = new Array(0, 1, 1); -assert.sameValue(a.lastIndexOf(1,"1"), 1, '"1" resolves to 1'); -assert.sameValue(a.lastIndexOf(1,"one"), -1, 'NaN string resolves to 01'); +assert.sameValue(a.lastIndexOf(1, "1"), 1, '"1" resolves to 1'); +assert.sameValue(a.lastIndexOf(1, "one"), -1, 'NaN string resolves to 01'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-10.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-10.js index 6a9a11c197..3e6778af66 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-10.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-10.js @@ -9,7 +9,7 @@ description: > (value is positive number) ---*/ - var targetObj = {}; +var targetObj = {}; assert.sameValue([0, targetObj, true].lastIndexOf(targetObj, 1.5), 1, '[0, targetObj, true].lastIndexOf(targetObj, 1.5)'); assert.sameValue([0, true, targetObj].lastIndexOf(targetObj, 1.5), -1, '[0, true, targetObj].lastIndexOf(targetObj, 1.5)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-11.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-11.js index 5ed43bf0e6..839e611a8f 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-11.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-11.js @@ -9,7 +9,7 @@ description: > (value is negative number) ---*/ - var targetObj = {}; +var targetObj = {}; assert.sameValue([0, targetObj, true].lastIndexOf(targetObj, -2.5), 1, '[0, targetObj, true].lastIndexOf(targetObj, -2.5)'); assert.sameValue([0, true, targetObj].lastIndexOf(targetObj, -2.5), -1, '[0, true, targetObj].lastIndexOf(targetObj, -2.5)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-12.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-12.js index 4e7c34dd90..03d5bc0da8 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-12.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-12.js @@ -9,7 +9,7 @@ description: > (value is Infinity) ---*/ - var arr = []; - arr[Math.pow(2, 32) - 2] = null; // length is the max value of Uint type +var arr = []; +arr[Math.pow(2, 32) - 2] = null; // length is the max value of Uint type assert.sameValue(arr.lastIndexOf(null, Infinity), Math.pow(2, 32) - 2, 'arr.lastIndexOf(null, Infinity)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-16.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-16.js index a219b6b67d..ab3089950c 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-16.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-16.js @@ -9,7 +9,7 @@ description: > containing Infinity ---*/ - var arr = []; - arr[Math.pow(2, 32) - 2] = true; // length is the max value of Uint type +var arr = []; +arr[Math.pow(2, 32) - 2] = true; // length is the max value of Uint type assert.sameValue(arr.lastIndexOf(true, "Infinity"), Math.pow(2, 32) - 2, 'arr.lastIndexOf(true, "Infinity")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-18.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-18.js index 973d33cd35..d5bf6c0fa0 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-18.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-18.js @@ -9,7 +9,7 @@ description: > containing an exponential number ---*/ - var targetObj = {}; +var targetObj = {}; assert.sameValue([0, NaN, targetObj, 3, false].lastIndexOf(targetObj, "2E0"), 2, '[0, NaN, targetObj, 3, false].lastIndexOf(targetObj, "2E0")'); assert.sameValue([0, NaN, 3, targetObj, false].lastIndexOf(targetObj, "2E0"), -1, '[0, NaN, 3, targetObj, false].lastIndexOf(targetObj, "2E0")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-19.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-19.js index 90b87161fe..acb1c0140c 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-19.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-19.js @@ -9,7 +9,7 @@ description: > containing a hex number ---*/ - var targetObj = {}; +var targetObj = {}; assert.sameValue([0, true, targetObj, 3, false].lastIndexOf(targetObj, "0x0002"), 2, '[0, true, targetObj, 3, false].lastIndexOf(targetObj, "0x0002")'); assert.sameValue([0, true, 3, targetObj, false].lastIndexOf(targetObj, "0x0002"), -1, '[0, true, 3, targetObj, false].lastIndexOf(targetObj, "0x0002")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-2.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-2.js index 8dc61ceae1..95b4db82b0 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-2.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-2.js @@ -7,8 +7,8 @@ es5id: 15.4.4.15-5-2 description: Array.prototype.lastIndexOf when fromIndex is floating point number ---*/ - var a = new Array(1,2,1); +var a = new Array(1, 2, 1); -assert.sameValue(a.lastIndexOf(2,1.49), 1, '1.49 resolves to 1'); -assert.sameValue(a.lastIndexOf(2,0.51), -1, '0.51 resolves to 0'); -assert.sameValue(a.lastIndexOf(1,0.51), 0, '0.51 resolves to 0'); +assert.sameValue(a.lastIndexOf(2, 1.49), 1, '1.49 resolves to 1'); +assert.sameValue(a.lastIndexOf(2, 0.51), -1, '0.51 resolves to 0'); +assert.sameValue(a.lastIndexOf(1, 0.51), 0, '0.51 resolves to 0'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-20.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-20.js index de7d8cdea7..72a6f16fa0 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-20.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-20.js @@ -9,7 +9,7 @@ description: > string containing a number with leading zeros ---*/ - var targetObj = {}; +var targetObj = {}; assert.sameValue([0, true, targetObj, 3, false].lastIndexOf(targetObj, "0002.10"), 2, '[0, true, targetObj, 3, false].lastIndexOf(targetObj, "0002.10")'); assert.sameValue([0, true, 3, targetObj, false].lastIndexOf(targetObj, "0002.10"), -1, '[0, true, 3, targetObj, false].lastIndexOf(targetObj, "0002.10")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-21.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-21.js index 21e3ef508d..d5ec47052d 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-21.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-21.js @@ -9,17 +9,17 @@ description: > Object, and has an own toString method ---*/ - // objects inherit the default valueOf() method from Object - // that simply returns itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - var fromIndex = { - toString: function () { - return '2'; - } - }; - var targetObj = new RegExp(); +// objects inherit the default valueOf() method from Object +// that simply returns itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. +var fromIndex = { + toString: function() { + return '2'; + } +}; +var targetObj = new RegExp(); assert.sameValue([0, true, targetObj, 3, false].lastIndexOf(targetObj, fromIndex), 2, '[0, true, targetObj, 3, false].lastIndexOf(targetObj, fromIndex)'); assert.sameValue([0, true, 3, targetObj, false].lastIndexOf(targetObj, fromIndex), -1, '[0, true, 3, targetObj, false].lastIndexOf(targetObj, fromIndex)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-22.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-22.js index edd857c534..b3bcfbc461 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-22.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-22.js @@ -9,13 +9,13 @@ description: > object, and has an own valueOf method ---*/ - var fromIndex = { - valueOf: function () { - return 2; - } - }; +var fromIndex = { + valueOf: function() { + return 2; + } +}; - var targetObj = function () {}; +var targetObj = function() {}; assert.sameValue([0, true, targetObj, 3, false].lastIndexOf(targetObj, fromIndex), 2, '[0, true, targetObj, 3, false].lastIndexOf(targetObj, fromIndex)'); assert.sameValue([0, true, 3, targetObj, false].lastIndexOf(targetObj, fromIndex), -1, '[0, true, 3, targetObj, false].lastIndexOf(targetObj, fromIndex)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-23.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-23.js index 2387ba6579..e371687ad8 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-23.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-23.js @@ -10,20 +10,20 @@ description: > method that returns a string ---*/ - var toStringAccessed = false; - var valueOfAccessed = false; +var toStringAccessed = false; +var valueOfAccessed = false; - var fromIndex = { - toString: function () { - toStringAccessed = true; - return '1'; - }, +var fromIndex = { + toString: function() { + toStringAccessed = true; + return '1'; + }, - valueOf: function () { - valueOfAccessed = true; - return {}; - } - }; + valueOf: function() { + valueOfAccessed = true; + return {}; + } +}; assert.sameValue([0, true].lastIndexOf(true, fromIndex), 1, '[0, true].lastIndexOf(true, fromIndex)'); assert(toStringAccessed, 'toStringAccessed !== true'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-24.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-24.js index 52bcc45648..949b07c4ab 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-24.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-24.js @@ -10,23 +10,23 @@ description: > than don't return primitive value ---*/ - var toStringAccessed = false; - var valueOfAccessed = false; +var toStringAccessed = false; +var valueOfAccessed = false; - var fromIndex = { - toString: function () { - toStringAccessed = true; - return {}; - }, +var fromIndex = { + toString: function() { + toStringAccessed = true; + return {}; + }, - valueOf: function () { - valueOfAccessed = true; - return {}; - } - }; + valueOf: function() { + valueOfAccessed = true; + return {}; + } +}; assert.throws(TypeError, function() { - [0, null].lastIndexOf(null, fromIndex); + [0, null].lastIndexOf(null, fromIndex); }); assert(toStringAccessed, 'toStringAccessed'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-25.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-25.js index c8860be076..8de12b1843 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-25.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-25.js @@ -10,24 +10,24 @@ description: > inherited valueOf methods ---*/ - var toStringAccessed = false; - var valueOfAccessed = false; +var toStringAccessed = false; +var valueOfAccessed = false; - var proto = { - valueOf: function () { - valueOfAccessed = true; - return 1; - } - }; +var proto = { + valueOf: function() { + valueOfAccessed = true; + return 1; + } +}; - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.toString = function () { - toStringAccessed = true; - return 1; - }; +var child = new Con(); +child.toString = function() { + toStringAccessed = true; + return 1; +}; assert.sameValue([0, true].lastIndexOf(true, child), 1, '[0, true].lastIndexOf(true, child)'); assert(valueOfAccessed, 'valueOfAccessed !== true'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-26.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-26.js index 0ec967938c..6b977c909b 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-26.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-26.js @@ -9,29 +9,29 @@ description: > visible when an exception occurs ---*/ - var stepTwoOccurs = false; - var stepFiveOccurs = false; - var obj = {}; +var stepTwoOccurs = false; +var stepFiveOccurs = false; +var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - stepTwoOccurs = true; - if (stepFiveOccurs) { - throw new Error("Step 5 occurred out of order"); - } - return 20; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + stepTwoOccurs = true; + if (stepFiveOccurs) { + throw new Error("Step 5 occurred out of order"); + } + return 20; + }, + configurable: true +}); - var fromIndex = { - valueOf: function () { - stepFiveOccurs = true; - return 0; - } - }; +var fromIndex = { + valueOf: function() { + stepFiveOccurs = true; + return 0; + } +}; - Array.prototype.lastIndexOf.call(obj, undefined, fromIndex); +Array.prototype.lastIndexOf.call(obj, undefined, fromIndex); assert(stepTwoOccurs, 'stepTwoOccurs !== true'); assert(stepFiveOccurs, 'stepFiveOccurs !== true'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-27.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-27.js index 491866633a..dc56d995c4 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-27.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-27.js @@ -9,34 +9,34 @@ description: > visible when an exception occurs ---*/ - var stepThreeOccurs = false; - var stepFiveOccurs = false; +var stepThreeOccurs = false; +var stepFiveOccurs = false; - var obj = {}; +var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - return { - valueOf: function () { - stepThreeOccurs = true; - if (stepFiveOccurs) { - throw new Error("Step 5 occurred out of order"); - } - return 20; - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + valueOf: function() { + stepThreeOccurs = true; + if (stepFiveOccurs) { + throw new Error("Step 5 occurred out of order"); + } + return 20; + } + }; + }, + configurable: true +}); - var fromIndex = { - valueOf: function () { - stepFiveOccurs = true; - return 0; - } - }; +var fromIndex = { + valueOf: function() { + stepFiveOccurs = true; + return 0; + } +}; - Array.prototype.lastIndexOf.call(obj, undefined, fromIndex); +Array.prototype.lastIndexOf.call(obj, undefined, fromIndex); assert(stepThreeOccurs, 'stepThreeOccurs !== true'); assert(stepFiveOccurs, 'stepFiveOccurs !== true'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-28.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-28.js index f3538884d7..b2a3da5977 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-28.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-28.js @@ -9,14 +9,14 @@ description: > visible when an exception occurs ---*/ - var stepFiveOccurs = false; - var fromIndex = { - valueOf: function () { - stepFiveOccurs = true; - return 0; - } - }; +var stepFiveOccurs = false; +var fromIndex = { + valueOf: function() { + stepFiveOccurs = true; + return 0; + } +}; assert.throws(TypeError, function() { - Array.prototype.lastIndexOf.call(undefined, undefined, fromIndex); + Array.prototype.lastIndexOf.call(undefined, undefined, fromIndex); }); assert.sameValue(stepFiveOccurs, false, 'stepFiveOccurs'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-29.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-29.js index 9d4e8f5226..f1fd8f73a5 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-29.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-29.js @@ -9,23 +9,23 @@ description: > visible when an exception occurs ---*/ - var stepFiveOccurs = false; +var stepFiveOccurs = false; - var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - throw new RangeError(); - }, - configurable: true - }); +var obj = {}; +Object.defineProperty(obj, "length", { + get: function() { + throw new RangeError(); + }, + configurable: true +}); - var fromIndex = { - valueOf: function () { - stepFiveOccurs = true; - return 0; - } - }; +var fromIndex = { + valueOf: function() { + stepFiveOccurs = true; + return 0; + } +}; assert.throws(RangeError, function() { - Array.prototype.lastIndexOf.call(obj, undefined, fromIndex); + Array.prototype.lastIndexOf.call(obj, undefined, fromIndex); }); assert.sameValue(stepFiveOccurs, false, 'stepFiveOccurs'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-3.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-3.js index 5fccb2a9ce..57bf7dfd4f 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-3.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-3.js @@ -7,7 +7,7 @@ es5id: 15.4.4.15-5-3 description: Array.prototype.lastIndexOf when fromIndex is boolean ---*/ - var a = new Array(1,2,1); +var a = new Array(1, 2, 1); -assert.sameValue(a.lastIndexOf(2,true), 1, 'true resolves to 1'); -assert.sameValue(a.lastIndexOf(2,false), -1, 'false resolves to 0'); +assert.sameValue(a.lastIndexOf(2, true), 1, 'true resolves to 1'); +assert.sameValue(a.lastIndexOf(2, false), -1, 'false resolves to 0'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-30.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-30.js index 92fef085dd..4d0ad283f4 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-30.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-30.js @@ -9,27 +9,27 @@ description: > visible when an exception occurs ---*/ - var stepFiveOccurs = false; +var stepFiveOccurs = false; - var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - return { - valueOf: function () { - throw new TypeError(); - } - }; - }, - configurable: true - }); +var obj = {}; +Object.defineProperty(obj, "length", { + get: function() { + return { + valueOf: function() { + throw new TypeError(); + } + }; + }, + configurable: true +}); - var fromIndex = { - valueOf: function () { - stepFiveOccurs = true; - return 0; - } - }; +var fromIndex = { + valueOf: function() { + stepFiveOccurs = true; + return 0; + } +}; assert.throws(TypeError, function() { - Array.prototype.lastIndexOf.call(obj, undefined, fromIndex); + Array.prototype.lastIndexOf.call(obj, undefined, fromIndex); }); assert.sameValue(stepFiveOccurs, false, 'stepFiveOccurs'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-31.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-31.js index 11152525fd..66c4b8c012 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-31.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-31.js @@ -9,7 +9,7 @@ description: > non-integer, verify truncation occurs in the proper direction ---*/ - var targetObj = {}; +var targetObj = {}; assert.sameValue([0, targetObj, true].lastIndexOf(targetObj, 1.5), 1, '[0, targetObj, true].lastIndexOf(targetObj, 1.5)'); assert.sameValue([0, true, targetObj].lastIndexOf(targetObj, 1.5), -1, '[0, true, targetObj].lastIndexOf(targetObj, 1.5)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-32.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-32.js index db105484b3..75aed0966d 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-32.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-32.js @@ -9,7 +9,7 @@ description: > non-integer, verify truncation occurs in the proper direction ---*/ - var targetObj = {}; +var targetObj = {}; assert.sameValue([0, targetObj, true].lastIndexOf(targetObj, -2.5), 1, '[0, targetObj, true].lastIndexOf(targetObj, -2.5)'); assert.sameValue([0, true, targetObj].lastIndexOf(targetObj, -2.5), -1, '[0, true, targetObj].lastIndexOf(targetObj, -2.5)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-4.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-4.js index 120641ec7c..f581274c27 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-4.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-4.js @@ -7,9 +7,9 @@ es5id: 15.4.4.15-5-4 description: Array.prototype.lastIndexOf when fromIndex is undefined ---*/ - var a = new Array(1,2,1); +var a = new Array(1, 2, 1); // undefined resolves to 0, no second argument resolves to len -assert.sameValue(a.lastIndexOf(2,undefined), -1, 'a.lastIndexOf(2,undefined)'); -assert.sameValue(a.lastIndexOf(1,undefined), 0, 'a.lastIndexOf(1,undefined)'); +assert.sameValue(a.lastIndexOf(2, undefined), -1, 'a.lastIndexOf(2,undefined)'); +assert.sameValue(a.lastIndexOf(1, undefined), 0, 'a.lastIndexOf(1,undefined)'); assert.sameValue(a.lastIndexOf(1), 2, 'a.lastIndexOf(1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-5.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-5.js index 38614daf9e..72efdc3075 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-5.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-5.js @@ -7,8 +7,8 @@ es5id: 15.4.4.15-5-5 description: Array.prototype.lastIndexOf when fromIndex is null ---*/ - var a = new Array(1,2,1); +var a = new Array(1, 2, 1); // null resolves to 0 -assert.sameValue(a.lastIndexOf(2,null), -1, 'a.lastIndexOf(2,null)'); -assert.sameValue(a.lastIndexOf(1,null), 0, 'a.lastIndexOf(1,null)'); +assert.sameValue(a.lastIndexOf(2, null), -1, 'a.lastIndexOf(2,null)'); +assert.sameValue(a.lastIndexOf(1, null), 0, 'a.lastIndexOf(1,null)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-6.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-6.js index e66f4a75ef..033e078b39 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-6.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-6.js @@ -7,8 +7,8 @@ es5id: 15.4.4.15-5-6 description: Array.prototype.lastIndexOf when 'fromIndex' isn't passed ---*/ - var arr = [0, 1, 2, 3, 4]; - //'fromIndex' will be set as 4 if not passed by default +var arr = [0, 1, 2, 3, 4]; +//'fromIndex' will be set as 4 if not passed by default assert.sameValue(arr.lastIndexOf(0), arr.lastIndexOf(0, 4), 'arr.lastIndexOf(0)'); assert.sameValue(arr.lastIndexOf(2), arr.lastIndexOf(2, 4), 'arr.lastIndexOf(2)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-1.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-1.js index efe30ad08f..87cf25f0c6 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-1.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-1.js @@ -9,7 +9,7 @@ description: > Array.length ---*/ - var a = new Array(1,2,3); +var a = new Array(1, 2, 3); -assert.sameValue(a.lastIndexOf(3,5.4), 2, 'a.lastIndexOf(3,5.4)'); -assert.sameValue(a.lastIndexOf(3,3.1), 2, 'a.lastIndexOf(3,3.1)'); +assert.sameValue(a.lastIndexOf(3, 5.4), 2, 'a.lastIndexOf(3,5.4)'); +assert.sameValue(a.lastIndexOf(3, 3.1), 2, 'a.lastIndexOf(3,3.1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-7-1.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-7-1.js index f0d4f45ef5..50f0225fab 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-7-1.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-7-1.js @@ -7,9 +7,9 @@ es5id: 15.4.4.15-7-1 description: Array.prototype.lastIndexOf with negative fromIndex ---*/ - var a = new Array(1,2,3); +var a = new Array(1, 2, 3); -assert.sameValue(a.lastIndexOf(2,-2), 1, 'a.lastIndexOf(2,-2)'); -assert.sameValue(a.lastIndexOf(2,-3), -1, 'a.lastIndexOf(2,-3)'); -assert.sameValue(a.lastIndexOf(1,-5.3), -1, 'a.lastIndexOf(1,-5.3)'); +assert.sameValue(a.lastIndexOf(2, -2), 1, 'a.lastIndexOf(2,-2)'); +assert.sameValue(a.lastIndexOf(2, -3), -1, 'a.lastIndexOf(2,-3)'); +assert.sameValue(a.lastIndexOf(1, -5.3), -1, 'a.lastIndexOf(1,-5.3)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-1.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-1.js index 90b73979e9..ba9f6f41db 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-1.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-1.js @@ -7,9 +7,13 @@ es5id: 15.4.4.15-8-1 description: Array.prototype.lastIndexOf must return correct index(boolean) ---*/ - var obj = {toString:function (){return true}}; - var _false = false; - var a = new Array(false,true,false,obj,_false,true,"true", undefined,0,null,1,"str",0,1); +var obj = { + toString: function() { + return true + } +}; +var _false = false; +var a = new Array(false, true, false, obj, _false, true, "true", undefined, 0, null, 1, "str", 0, 1); assert.sameValue(a.lastIndexOf(true), 5, 'a[5]=true'); assert.sameValue(a.lastIndexOf(false), 4, 'a[4] =_false'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-10.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-10.js index c225526866..91f6f3c01a 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-10.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-10.js @@ -10,7 +10,11 @@ es5id: 15.4.4.15-8-10 description: Array.prototype.lastIndexOf must return correct index (NaN) ---*/ - var _NaN = NaN; - var a = new Array("NaN",_NaN,NaN, undefined,0,false,null,{toString:function (){return NaN}},"false"); +var _NaN = NaN; +var a = new Array("NaN", _NaN, NaN, undefined, 0, false, null, { + toString: function() { + return NaN + } +}, "false"); assert.sameValue(a.lastIndexOf(NaN), -1, 'NaN matches nothing, not even itself'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-11.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-11.js index 9e2f6d79af..0fd222276f 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-11.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-11.js @@ -9,14 +9,14 @@ description: > changed by adding elements to the array during iteration ---*/ - var arr = [20]; +var arr = [20]; - Object.defineProperty(arr, "0", { - get: function () { - arr[1] = 1; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + arr[1] = 1; + return 0; + }, + configurable: true +}); assert.sameValue(arr.lastIndexOf(1), -1, 'arr.lastIndexOf(1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-2.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-2.js index 8dcc8e602a..51273ec3b4 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-2.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-2.js @@ -7,12 +7,16 @@ es5id: 15.4.4.15-8-2 description: Array.prototype.lastIndexOf must return correct index(Number) ---*/ - var obj = {toString:function (){return 0}}; - var one = 1; - var _float = -(4/3); - var a = new Array(+0,true,0,-0, false,undefined,null,"0",obj, _float,-(4/3),-1.3333333333333,"str",one, 1, false); +var obj = { + toString: function() { + return 0 + } +}; +var one = 1; +var _float = -(4 / 3); +var a = new Array(+0, true, 0, -0, false, undefined, null, "0", obj, _float, -(4 / 3), -1.3333333333333, "str", one, 1, false); -assert.sameValue(a.lastIndexOf(-(4/3)), 10, 'a[10]=-(4/3)'); +assert.sameValue(a.lastIndexOf(-(4 / 3)), 10, 'a[10]=-(4/3)'); assert.sameValue(a.lastIndexOf(0), 3, 'a[3] = -0, but using === -0 and 0 are equal'); assert.sameValue(a.lastIndexOf(-0), 3, 'a[3] = -0'); assert.sameValue(a.lastIndexOf(1), 14, 'a[14] = 1'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-3.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-3.js index ba6b3e8261..a1f22e7de8 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-3.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-3.js @@ -7,8 +7,12 @@ es5id: 15.4.4.15-8-3 description: Array.prototype.lastIndexOf must return correct index(string) ---*/ - var obj = {toString:function (){return "false"}}; - var szFalse = "false"; - var a = new Array(szFalse, "false","false1",undefined,0,false,null,1,obj,0); +var obj = { + toString: function() { + return "false" + } +}; +var szFalse = "false"; +var a = new Array(szFalse, "false", "false1", undefined, 0, false, null, 1, obj, 0); assert.sameValue(a.lastIndexOf("false"), 1, 'a.lastIndexOf("false")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-4.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-4.js index 1c4050783c..e77e8d780b 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-4.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-4.js @@ -7,9 +7,13 @@ es5id: 15.4.4.15-8-4 description: Array.prototype.lastIndexOf must return correct index(undefined) ---*/ - var obj = {toString:function (){return undefined;}}; - var _undefined1 = undefined; - var _undefined2; - var a = new Array(_undefined1,_undefined2,undefined,true,0,false,null,1,"undefined",obj,1); +var obj = { + toString: function() { + return undefined; + } +}; +var _undefined1 = undefined; +var _undefined2; +var a = new Array(_undefined1, _undefined2, undefined, true, 0, false, null, 1, "undefined", obj, 1); assert.sameValue(a.lastIndexOf(undefined), 2, 'a.lastIndexOf(undefined)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-5.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-5.js index afd59f8ac7..2aea2f8ee1 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-5.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-5.js @@ -7,9 +7,21 @@ es5id: 15.4.4.15-8-5 description: Array.prototype.lastIndexOf must return correct index(Object) ---*/ - var obj1 = {toString:function (){return "false"}}; - var obj2 = {toString:function (){return "false"}}; - var obj3 = obj1; - var a = new Array(obj2,obj1,obj3,false,undefined,0,false,null,{toString:function (){return "false"}},"false"); +var obj1 = { + toString: function() { + return "false" + } +}; +var obj2 = { + toString: function() { + return "false" + } +}; +var obj3 = obj1; +var a = new Array(obj2, obj1, obj3, false, undefined, 0, false, null, { + toString: function() { + return "false" + } +}, "false"); assert.sameValue(a.lastIndexOf(obj3), 2, 'a.lastIndexOf(obj3)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-6.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-6.js index c3e542c7c9..18b8888ee7 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-6.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-6.js @@ -7,8 +7,12 @@ es5id: 15.4.4.15-8-6 description: Array.prototype.lastIndexOf must return correct index(null) ---*/ - var obj = {toString:function (){return null}}; - var _null = null; - var a = new Array(true,undefined,0,false,null,1,"str",0,1,null,true,false,undefined,_null,"null",undefined,"str",obj); +var obj = { + toString: function() { + return null + } +}; +var _null = null; +var a = new Array(true, undefined, 0, false, null, 1, "str", 0, 1, null, true, false, undefined, _null, "null", undefined, "str", obj); assert.sameValue(a.lastIndexOf(null), 13, 'a.lastIndexOf(null)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-7.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-7.js index 763dbfe402..543564a91c 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-7.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-7.js @@ -9,8 +9,8 @@ description: > reference) ---*/ - var a = new Array(0,1,2,3); - a[2] = a; +var a = new Array(0, 1, 2, 3); +a[2] = a; assert.sameValue(a.lastIndexOf(a), 2, 'a.lastIndexOf(a)'); assert.sameValue(a.lastIndexOf(3), 3, 'a.lastIndexOf(3)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-8.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-8.js index 1cb37a62df..b5676e56d2 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-8.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-8.js @@ -7,8 +7,8 @@ es5id: 15.4.4.15-8-8 description: Array.prototype.lastIndexOf must return correct index (Array) ---*/ - var b = new Array("0,1"); - var a = new Array(0,b,"0,1",3); +var b = new Array("0,1"); +var a = new Array(0, b, "0,1", 3); assert.sameValue(a.lastIndexOf(b.toString()), 2, 'a.lastIndexOf(b.toString())'); assert.sameValue(a.lastIndexOf("0,1"), 2, 'a.lastIndexOf("0,1")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-9.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-9.js index 7c7026a1de..c70075216b 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-9.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-9.js @@ -9,15 +9,15 @@ description: > Array) ---*/ - var a = new Array(0,1); - a[4294967294] = 2; // 2^32-2 - is max array element index - a[4294967295] = 3; // 2^32-1 added as non-array element property - a[4294967296] = 4; // 2^32 added as non-array element property - a[4294967297] = 5; // 2^32+1 added as non-array element property - // stop searching near the end in case implementation actually tries to test all missing elements!! - a[4294967200] = 3; - a[4294967201] = 4; - a[4294967202] = 5; +var a = new Array(0, 1); +a[4294967294] = 2; // 2^32-2 - is max array element index +a[4294967295] = 3; // 2^32-1 added as non-array element property +a[4294967296] = 4; // 2^32 added as non-array element property +a[4294967297] = 5; // 2^32+1 added as non-array element property +// stop searching near the end in case implementation actually tries to test all missing elements!! +a[4294967200] = 3; +a[4294967201] = 4; +a[4294967202] = 5; assert.sameValue(a.lastIndexOf(2), 4294967294, 'a.lastIndexOf(2)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-1.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-1.js index 71fb4d1b5c..8da0ba48d0 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-1.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-1.js @@ -9,14 +9,14 @@ description: > visible here ---*/ - var arr = { }; +var arr = {}; - Object.defineProperty(arr, "length", { - get: function () { - arr[2] = "length"; - return 3; - }, - configurable: true - }); +Object.defineProperty(arr, "length", { + get: function() { + arr[2] = "length"; + return 3; + }, + configurable: true +}); assert.sameValue(Array.prototype.lastIndexOf.call(arr, "length"), 2, 'Array.prototype.lastIndexOf.call(arr, "length")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-10.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-10.js index 5dd88469dd..aa82dc85b3 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-10.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-10.js @@ -9,19 +9,19 @@ description: > after current position are visited on an Array ---*/ - var arr = [0, , 2]; +var arr = [0, , 2]; - Object.defineProperty(arr, "2", { - get: function () { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "2", { + get: function() { + Object.defineProperty(Array.prototype, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); assert.sameValue(arr.lastIndexOf(6.99), 1, 'arr.lastIndexOf(6.99)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-11.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-11.js index 83d4ac5ce5..c7bd8ed99e 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-11.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-11.js @@ -9,21 +9,23 @@ description: > property not to be visited on an Array-like object ---*/ - var arr = { length: 200 }; +var arr = { + length: 200 +}; - Object.defineProperty(arr, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + return 6.99; + }, + configurable: true +}); - Object.defineProperty(arr, "100", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "100", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); assert.sameValue(Array.prototype.lastIndexOf.call(arr, 6.99), -1, 'Array.prototype.lastIndexOf.call(arr, 6.99)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-12.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-12.js index 00f8a44fed..e1b6e93ded 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-12.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-12.js @@ -9,21 +9,21 @@ description: > property not to be visited on an Array ---*/ - var arr = [1, 2, 3, 4]; +var arr = [1, 2, 3, 4]; - Object.defineProperty(arr, "1", { - get: function () { - return "6.99"; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + return "6.99"; + }, + configurable: true +}); - Object.defineProperty(arr, "3", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "3", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); assert.sameValue(arr.lastIndexOf("6.99"), -1, 'arr.lastIndexOf("6.99")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-13.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-13.js index df702ae217..052114d926 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-13.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-13.js @@ -10,16 +10,19 @@ description: > Object ---*/ - var arr = { 2: 2, length: 20 }; +var arr = { + 2: 2, + length: 20 +}; - Object.defineProperty(arr, "3", { - get: function () { - delete Object.prototype[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "3", { + get: function() { + delete Object.prototype[1]; + return 0; + }, + configurable: true +}); - Object.prototype[1] = 1; +Object.prototype[1] = 1; assert.sameValue(Array.prototype.lastIndexOf.call(arr, 1), -1, 'Array.prototype.lastIndexOf.call(arr, 1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-14.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-14.js index d86e21b9e2..864c9a8fa4 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-14.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-14.js @@ -9,16 +9,16 @@ description: > causes prototype index property not to be visited on an Array ---*/ - var arr = [0, , 2]; +var arr = [0, , 2]; - Object.defineProperty(arr, "20", { - get: function () { - delete Array.prototype[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "20", { + get: function() { + delete Array.prototype[1]; + return 0; + }, + configurable: true +}); - Array.prototype[1] = 1; +Array.prototype[1] = 1; assert.sameValue(arr.lastIndexOf(1), -1, 'arr.lastIndexOf(1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-15.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-15.js index a5ae27fef0..c9ed09f3a7 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-15.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-15.js @@ -10,16 +10,21 @@ description: > on an Array-like object ---*/ - var arr = { 0: 0, 1: 111, 2: 2, length: 10 }; +var arr = { + 0: 0, + 1: 111, + 2: 2, + length: 10 +}; - Object.defineProperty(arr, "6", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "6", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); - Object.prototype[1] = 1; +Object.prototype[1] = 1; assert.sameValue(Array.prototype.lastIndexOf.call(arr, 1), 1, 'Array.prototype.lastIndexOf.call(arr, 1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-16.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-16.js index fce1f7c2c3..49b6f786a3 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-16.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-16.js @@ -10,16 +10,16 @@ description: > on an Array ---*/ - var arr = [0, 111, 2]; +var arr = [0, 111, 2]; - Object.defineProperty(arr, "2", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "2", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); - Array.prototype[1] = 1; +Array.prototype[1] = 1; assert.sameValue(arr.lastIndexOf(1), 1, 'arr.lastIndexOf(1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-17.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-17.js index f2bd2ff1fa..5056ac8a27 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-17.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-17.js @@ -9,14 +9,14 @@ description: > index property not to be visited ---*/ - var arr = [0, 1, 2, "last", 4]; +var arr = [0, 1, 2, "last", 4]; - Object.defineProperty(arr, "4", { - get: function () { - arr.length = 3; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "4", { + get: function() { + arr.length = 3; + return 0; + }, + configurable: true +}); assert.sameValue(arr.lastIndexOf("last"), -1, 'arr.lastIndexOf("last")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-18.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-18.js index 9202ce28e3..a34d8b58e7 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-18.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-18.js @@ -9,21 +9,21 @@ description: > prototype property causes prototype index property to be visited ---*/ - var arr = [0, 1, 2, 3, 4]; +var arr = [0, 1, 2, 3, 4]; - Object.defineProperty(Array.prototype, "2", { - get: function () { - return "prototype"; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "2", { + get: function() { + return "prototype"; + }, + configurable: true +}); - Object.defineProperty(arr, "3", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "3", { + get: function() { + arr.length = 2; + return 1; + }, + configurable: true +}); assert.sameValue(arr.lastIndexOf("prototype"), 2, 'arr.lastIndexOf("prototype")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-19.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-19.js index b5c018d0cf..ca788c2bc0 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-19.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-19.js @@ -10,21 +10,21 @@ description: > flags: [noStrict] ---*/ - var arr = [0, 1, 2, 3]; +var arr = [0, 1, 2, 3]; - Object.defineProperty(arr, "2", { - get: function () { - return "unconfigurable"; - }, - configurable: false - }); +Object.defineProperty(arr, "2", { + get: function() { + return "unconfigurable"; + }, + configurable: false +}); - Object.defineProperty(arr, "3", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "3", { + get: function() { + arr.length = 2; + return 1; + }, + configurable: true +}); assert.sameValue(arr.lastIndexOf("unconfigurable"), 2, 'arr.lastIndexOf("unconfigurable")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-2.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-2.js index 416d33fc89..01d4e44dbf 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-2.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-2.js @@ -9,15 +9,17 @@ description: > visible here on an Array-like object ---*/ - var arr = { length: 30 }; - var targetObj = function () { }; +var arr = { + length: 30 +}; +var targetObj = function() {}; - var fromIndex = { - valueOf: function () { - arr[4] = targetObj; - return 10; - } - }; +var fromIndex = { + valueOf: function() { + arr[4] = targetObj; + return 10; + } +}; assert.sameValue(Array.prototype.lastIndexOf.call(arr, targetObj, fromIndex), 4, 'Array.prototype.lastIndexOf.call(arr, targetObj, fromIndex)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-3.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-3.js index e02d240e52..7ceda1ccdd 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-3.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-3.js @@ -9,15 +9,15 @@ description: > visible here on an Array ---*/ - var arr = []; - arr.length = 30; - var targetObj = function () { }; +var arr = []; +arr.length = 30; +var targetObj = function() {}; - var fromIndex = { - valueOf: function () { - arr[4] = targetObj; - return 11; - } - }; +var fromIndex = { + valueOf: function() { + arr[4] = targetObj; + return 11; + } +}; assert.sameValue(arr.lastIndexOf(targetObj, fromIndex), 4, 'arr.lastIndexOf(targetObj, fromIndex)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-4.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-4.js index 2846cf6e9e..010ffb36d7 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-4.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-4.js @@ -9,14 +9,16 @@ description: > visible here ---*/ - var arr = { 2: 6.99 }; +var arr = { + 2: 6.99 +}; - Object.defineProperty(arr, "length", { - get: function () { - delete arr[2]; - return 3; - }, - configurable: true - }); +Object.defineProperty(arr, "length", { + get: function() { + delete arr[2]; + return 3; + }, + configurable: true +}); assert.sameValue(Array.prototype.lastIndexOf.call(arr, 6.99), -1, 'Array.prototype.lastIndexOf.call(arr, 6.99)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-5.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-5.js index 4d1c2f8db6..cd592d237c 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-5.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-5.js @@ -9,13 +9,16 @@ description: > visible here on an Array-like object ---*/ - var arr = { 10: false, length: 30 }; +var arr = { + 10: false, + length: 30 +}; - var fromIndex = { - valueOf: function () { - delete arr[10]; - return 15; - } - }; +var fromIndex = { + valueOf: function() { + delete arr[10]; + return 15; + } +}; assert.sameValue(Array.prototype.lastIndexOf.call(arr, false, fromIndex), -1, 'Array.prototype.lastIndexOf.call(arr, false, fromIndex)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-6.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-6.js index 0ad3830b3d..6b23e07f8d 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-6.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-6.js @@ -9,15 +9,15 @@ description: > visible here on an Array ---*/ - var arr = []; - arr[10] = "10"; - arr.length = 20; +var arr = []; +arr[10] = "10"; +arr.length = 20; - var fromIndex = { - valueOf: function () { - delete arr[10]; - return 11; - } - }; +var fromIndex = { + valueOf: function() { + delete arr[10]; + return 11; + } +}; assert.sameValue(arr.lastIndexOf("10", fromIndex), -1, 'arr.lastIndexOf("10", fromIndex)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-7.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-7.js index af7fc70e58..e64cc5bab4 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-7.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-7.js @@ -9,19 +9,21 @@ description: > after current position are visited on an Array-like object ---*/ - var arr = { length: 8 }; +var arr = { + length: 8 +}; - Object.defineProperty(arr, "4", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "4", { + get: function() { + Object.defineProperty(arr, "1", { + get: function() { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); assert.sameValue(Array.prototype.lastIndexOf.call(arr, 1), 1, 'Array.prototype.lastIndexOf.call(arr, 1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-8.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-8.js index c368ef5706..ef7d6b6742 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-8.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-8.js @@ -9,19 +9,19 @@ description: > after current position are visited on an Array ---*/ - var arr = [0, , 2]; +var arr = [0, , 2]; - Object.defineProperty(arr, "2", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "2", { + get: function() { + Object.defineProperty(arr, "1", { + get: function() { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); assert.sameValue(arr.lastIndexOf(1), 1, 'arr.lastIndexOf(1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-9.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-9.js index 412604d03d..d0d856f617 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-9.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-9.js @@ -10,19 +10,21 @@ description: > object ---*/ - var arr = { length: 9 }; +var arr = { + length: 9 +}; - Object.defineProperty(arr, "4", { - get: function () { - Object.defineProperty(Object.prototype, "1", { - get: function () { - return Infinity; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "4", { + get: function() { + Object.defineProperty(Object.prototype, "1", { + get: function() { + return Infinity; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); assert.sameValue(Array.prototype.lastIndexOf.call(arr, Infinity), 1, 'Array.prototype.lastIndexOf.call(arr, Infinity)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-1.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-1.js index 7a4e136a62..3dfe2ffa10 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-1.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-1.js @@ -9,7 +9,12 @@ description: > property on an Array-like object ---*/ - var obj = { 0: 0, 1: 1, 2: 2, length: 3 }; +var obj = { + 0: 0, + 1: 1, + 2: 2, + length: 3 +}; assert.sameValue(Array.prototype.lastIndexOf.call(obj, 0), 0, 'Array.prototype.lastIndexOf.call(obj, 0)'); assert.sameValue(Array.prototype.lastIndexOf.call(obj, 1), 1, 'Array.prototype.lastIndexOf.call(obj, 1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-10.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-10.js index 38b41bddf6..b60f3beb3b 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-10.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-10.js @@ -9,27 +9,29 @@ description: > accessor property on an Array-like object ---*/ - var obj = { length: 3 }; - Object.defineProperty(obj, "0", { - get: function () { - return 0; - }, - configurable: true - }); +var obj = { + length: 3 +}; +Object.defineProperty(obj, "0", { + get: function() { + return 0; + }, + configurable: true +}); - Object.defineProperty(obj, "1", { - get: function () { - return 1; - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + return 1; + }, + configurable: true +}); - Object.defineProperty(obj, "2", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(obj, "2", { + get: function() { + return 2; + }, + configurable: true +}); assert.sameValue(Array.prototype.lastIndexOf.call(obj, 0), 0, 'Array.prototype.lastIndexOf.call(obj, 0)'); assert.sameValue(Array.prototype.lastIndexOf.call(obj, 1), 1, 'Array.prototype.lastIndexOf.call(obj, 1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-11.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-11.js index 72eb049479..6dfa28831c 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-11.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-11.js @@ -10,14 +10,14 @@ description: > Array ---*/ - var arr = []; +var arr = []; - Array.prototype[0] = false; - Object.defineProperty(arr, "0", { - get: function () { - return true; - }, - configurable: true - }); +Array.prototype[0] = false; +Object.defineProperty(arr, "0", { + get: function() { + return true; + }, + configurable: true +}); assert.sameValue(arr.lastIndexOf(true), 0, 'arr.lastIndexOf(true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-12.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-12.js index 94fef7d4cf..739d80bb32 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-12.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-12.js @@ -10,14 +10,16 @@ description: > Array-like object ---*/ - var obj = { length: 1 }; +var obj = { + length: 1 +}; - Object.prototype[0] = false; - Object.defineProperty(obj, "0", { - get: function () { - return true; - }, - configurable: true - }); +Object.prototype[0] = false; +Object.defineProperty(obj, "0", { + get: function() { + return true; + }, + configurable: true +}); assert.sameValue(Array.prototype.lastIndexOf.call(obj, true), 0, 'Array.prototype.lastIndexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-13.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-13.js index bd077110e0..70462919d3 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-13.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-13.js @@ -10,20 +10,20 @@ description: > an Array ---*/ - var arr = []; +var arr = []; - Object.defineProperty(Array.prototype, "0", { - get: function () { - return false; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return false; + }, + configurable: true +}); - Object.defineProperty(arr, "0", { - get: function () { - return true; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + return true; + }, + configurable: true +}); assert.sameValue(arr.lastIndexOf(true), 0, 'arr.lastIndexOf(true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-14.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-14.js index 9a326f9d47..9662f75bd5 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-14.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-14.js @@ -10,20 +10,22 @@ description: > an Array-like object ---*/ - var obj = { length: 1 }; +var obj = { + length: 1 +}; - Object.defineProperty(Object.prototype, "0", { - get: function () { - return false; - }, - configurable: true - }); +Object.defineProperty(Object.prototype, "0", { + get: function() { + return false; + }, + configurable: true +}); - Object.defineProperty(obj, "0", { - get: function () { - return true; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + return true; + }, + configurable: true +}); assert.sameValue(Array.prototype.lastIndexOf.call(obj, true), 0, 'Array.prototype.lastIndexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-15.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-15.js index e91eaf66b5..32c4149d88 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-15.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-15.js @@ -9,26 +9,26 @@ description: > accessor property on an Array ---*/ - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 10; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return 10; + }, + configurable: true +}); - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 20; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "1", { + get: function() { + return 20; + }, + configurable: true +}); - Object.defineProperty(Array.prototype, "2", { - get: function () { - return 30; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "2", { + get: function() { + return 30; + }, + configurable: true +}); assert.sameValue([, , , ].lastIndexOf(10), 0, '[, , , ].lastIndexOf(10)'); assert.sameValue([, , , ].lastIndexOf(20), 1, '[, , , ].lastIndexOf(20)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-16.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-16.js index 89205ee26e..e8cb635fd9 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-16.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-16.js @@ -9,27 +9,33 @@ description: > accessor property on an Array-like object ---*/ - Object.defineProperty(Object.prototype, "0", { - get: function () { - return 10; - }, - configurable: true - }); +Object.defineProperty(Object.prototype, "0", { + get: function() { + return 10; + }, + configurable: true +}); - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 20; - }, - configurable: true - }); +Object.defineProperty(Object.prototype, "1", { + get: function() { + return 20; + }, + configurable: true +}); - Object.defineProperty(Object.prototype, "2", { - get: function () { - return 30; - }, - configurable: true - }); +Object.defineProperty(Object.prototype, "2", { + get: function() { + return 30; + }, + configurable: true +}); -assert.sameValue(Array.prototype.lastIndexOf.call({ length: 3 }, 10), 0, 'Array.prototype.lastIndexOf.call({ length: 3 }, 10)'); -assert.sameValue(Array.prototype.lastIndexOf.call({ length: 3 }, 20), 1, 'Array.prototype.lastIndexOf.call({ length: 3 }, 20)'); -assert.sameValue(Array.prototype.lastIndexOf.call({ length: 3 }, 30), 2, 'Array.prototype.lastIndexOf.call({ length: 3 }, 30)'); +assert.sameValue(Array.prototype.lastIndexOf.call({ + length: 3 +}, 10), 0, 'Array.prototype.lastIndexOf.call({ length: 3 }, 10)'); +assert.sameValue(Array.prototype.lastIndexOf.call({ + length: 3 +}, 20), 1, 'Array.prototype.lastIndexOf.call({ length: 3 }, 20)'); +assert.sameValue(Array.prototype.lastIndexOf.call({ + length: 3 +}, 30), 2, 'Array.prototype.lastIndexOf.call({ length: 3 }, 30)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-17.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-17.js index 796abed7bd..dc14b777b5 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-17.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-17.js @@ -9,10 +9,10 @@ description: > accessor property without a get function on an Array ---*/ - var arr = []; - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); +var arr = []; +Object.defineProperty(arr, "0", { + set: function() {}, + configurable: true +}); assert.sameValue(arr.lastIndexOf(undefined), 0, 'arr.lastIndexOf(undefined)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-18.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-18.js index 65fc004c55..0a9e3a6936 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-18.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-18.js @@ -9,10 +9,12 @@ description: > accessor property without a get function on an Array-like object ---*/ - var obj = { length: 1 }; - Object.defineProperty(obj, "0", { - set: function () { }, - configurable: true - }); +var obj = { + length: 1 +}; +Object.defineProperty(obj, "0", { + set: function() {}, + configurable: true +}); assert.sameValue(Array.prototype.lastIndexOf.call(obj, undefined), 0, 'Array.prototype.lastIndexOf.call(obj, undefined)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-19.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-19.js index 3c9baf0af2..d5ca0b3ee1 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-19.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-19.js @@ -10,18 +10,20 @@ description: > inherited accessor property on an Array-like object ---*/ - var obj = { length: 1 }; +var obj = { + length: 1 +}; - Object.defineProperty(Object.prototype, "0", { - get: function () { - return 20; - }, - configurable: true - }); - Object.defineProperty(obj, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(Object.prototype, "0", { + get: function() { + return 20; + }, + configurable: true +}); +Object.defineProperty(obj, "0", { + set: function() {}, + configurable: true +}); assert(obj.hasOwnProperty(0), 'obj.hasOwnProperty(0) !== true'); assert.sameValue(Array.prototype.lastIndexOf.call(obj, undefined), 0, 'Array.prototype.lastIndexOf.call(obj, undefined)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-20.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-20.js index d0c826fd28..1f0b708390 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-20.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-20.js @@ -10,18 +10,18 @@ description: > inherited accessor property on an Array ---*/ - var arr = [, 1]; +var arr = [, 1]; - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 100; - }, - configurable: true - }); - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return 100; + }, + configurable: true +}); +Object.defineProperty(arr, "0", { + set: function() {}, + configurable: true +}); assert(arr.hasOwnProperty(0), 'arr.hasOwnProperty(0) !== true'); assert.sameValue(arr.lastIndexOf(undefined), 0, 'arr.lastIndexOf(undefined)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-21.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-21.js index 71304e7776..ee64326c12 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-21.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-21.js @@ -9,9 +9,9 @@ description: > accessor property without a get function on an Array ---*/ - Object.defineProperty(Array.prototype, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + set: function() {}, + configurable: true +}); assert.sameValue([, ].lastIndexOf(undefined), 0, '[, ].lastIndexOf(undefined)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-22.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-22.js index 735c9cc7aa..8dbf01f642 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-22.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-22.js @@ -9,9 +9,11 @@ description: > accessor property without a get function on an Array-like object ---*/ - Object.defineProperty(Object.prototype, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(Object.prototype, "0", { + set: function() {}, + configurable: true +}); -assert.sameValue(Array.prototype.lastIndexOf.call({ length: 1 }, undefined), 0, 'Array.prototype.lastIndexOf.call({ length: 1 }, undefined)'); +assert.sameValue(Array.prototype.lastIndexOf.call({ + length: 1 +}, undefined), 0, 'Array.prototype.lastIndexOf.call({ length: 1 }, undefined)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-25.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-25.js index eeb3f46535..d6806a98ed 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-25.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-25.js @@ -10,9 +10,9 @@ description: > less than number of parameters) ---*/ - var func = function (a, b) { - return 0 === Array.prototype.lastIndexOf.call(arguments, arguments[0]) && - -1 === Array.prototype.lastIndexOf.call(arguments, arguments[1]); - }; +var func = function(a, b) { + return 0 === Array.prototype.lastIndexOf.call(arguments, arguments[0]) && + -1 === Array.prototype.lastIndexOf.call(arguments, arguments[1]); +}; assert(func(true), 'func(true) !== true'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-26.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-26.js index b568be5483..b4066d7334 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-26.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-26.js @@ -10,10 +10,10 @@ description: > to number of parameters) ---*/ - var func = function (a, b) { - return 0 === Array.prototype.lastIndexOf.call(arguments, arguments[0]) && - 1 === Array.prototype.lastIndexOf.call(arguments, arguments[1]) && - -1 === Array.prototype.lastIndexOf.call(arguments, arguments[2]); - }; +var func = function(a, b) { + return 0 === Array.prototype.lastIndexOf.call(arguments, arguments[0]) && + 1 === Array.prototype.lastIndexOf.call(arguments, arguments[1]) && + -1 === Array.prototype.lastIndexOf.call(arguments, arguments[2]); +}; assert(func(0, true), 'func(0, true) !== true'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-27.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-27.js index 7936ac8fb1..1d9f678632 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-27.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-27.js @@ -10,7 +10,7 @@ description: > greater than number of parameters) ---*/ -var func = function (a, b) { +var func = function(a, b) { assert.sameValue(Array.prototype.lastIndexOf.call(arguments, arguments[0]), 2); assert.sameValue(Array.prototype.lastIndexOf.call(arguments, arguments[3]), 3); assert.sameValue(Array.prototype.lastIndexOf.call(arguments, arguments[4]), -1); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-28.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-28.js index aa3fa78183..d599c9fa45 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-28.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-28.js @@ -9,26 +9,26 @@ description: > subsequent iterations on an Array ---*/ - var preIterVisible = false; - var arr = []; +var preIterVisible = false; +var arr = []; - Object.defineProperty(arr, "2", { - get: function () { - preIterVisible = true; - return false; - }, - configurable: true - }); +Object.defineProperty(arr, "2", { + get: function() { + preIterVisible = true; + return false; + }, + configurable: true +}); - Object.defineProperty(arr, "1", { - get: function () { - if (preIterVisible) { - return true; - } else { - return false; - } - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + if (preIterVisible) { + return true; + } else { + return false; + } + }, + configurable: true +}); assert.sameValue(arr.lastIndexOf(true), 1, 'arr.lastIndexOf(true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-29.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-29.js index e73976d938..59ada2f1db 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-29.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-29.js @@ -9,26 +9,28 @@ description: > subsequent iterations on an Array-like object ---*/ - var preIterVisible = false; - var obj = { length: 3 }; +var preIterVisible = false; +var obj = { + length: 3 +}; - Object.defineProperty(obj, "2", { - get: function () { - preIterVisible = true; - return false; - }, - configurable: true - }); +Object.defineProperty(obj, "2", { + get: function() { + preIterVisible = true; + return false; + }, + configurable: true +}); - Object.defineProperty(obj, "1", { - get: function () { - if (preIterVisible) { - return true; - } else { - return false; - } - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + if (preIterVisible) { + return true; + } else { + return false; + } + }, + configurable: true +}); assert.sameValue(Array.prototype.lastIndexOf.call(obj, true), 1, 'Array.prototype.lastIndexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-3.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-3.js index b292c0f5cd..5b82efe114 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-3.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-3.js @@ -9,6 +9,6 @@ description: > property that overrides an inherited data property on an Array ---*/ - Array.prototype[0] = Object; +Array.prototype[0] = Object; assert.sameValue([Object.prototype].lastIndexOf(Object.prototype), 0, '[Object.prototype].lastIndexOf(Object.prototype)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-30.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-30.js index 251c5d4285..15b600383e 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-30.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-30.js @@ -9,24 +9,24 @@ description: > exception on an Array ---*/ - var accessed = false; - var arr = []; +var accessed = false; +var arr = []; - Object.defineProperty(arr, "2", { - get: function () { - throw new TypeError(); - }, - configurable: true - }); +Object.defineProperty(arr, "2", { + get: function() { + throw new TypeError(); + }, + configurable: true +}); - Object.defineProperty(arr, "1", { - get: function () { - accessed = true; - return true; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + accessed = true; + return true; + }, + configurable: true +}); assert.throws(TypeError, function() { - arr.lastIndexOf(true); + arr.lastIndexOf(true); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-31.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-31.js index 933d72d123..0d46b3d56c 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-31.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-31.js @@ -9,24 +9,26 @@ description: > exception on an Array-like object ---*/ - var accessed = false; - var obj = { length: 3 }; +var accessed = false; +var obj = { + length: 3 +}; - Object.defineProperty(obj, "2", { - get: function () { - throw new TypeError(); - }, - configurable: true - }); +Object.defineProperty(obj, "2", { + get: function() { + throw new TypeError(); + }, + configurable: true +}); - Object.defineProperty(obj, "1", { - get: function () { - accessed = true; - return true; - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + accessed = true; + return true; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.lastIndexOf.call(obj, true); + Array.prototype.lastIndexOf.call(obj, true); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-4.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-4.js index 8f6e11da43..2204423702 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-4.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-4.js @@ -10,6 +10,10 @@ description: > Array-like object ---*/ - Object.prototype[0] = false; +Object.prototype[0] = false; -assert.sameValue(Array.prototype.lastIndexOf.call({ 0: true, 1: 1, length: 2 }, true), 0, 'Array.prototype.lastIndexOf.call({ 0: true, 1: 1, length: 2 }, true)'); +assert.sameValue(Array.prototype.lastIndexOf.call({ + 0: true, + 1: 1, + length: 2 +}, true), 0, 'Array.prototype.lastIndexOf.call({ 0: true, 1: 1, length: 2 }, true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-5.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-5.js index 771fde968e..aa6921e41a 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-5.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-5.js @@ -9,11 +9,11 @@ description: > property that overrides an inherited accessor property on an Array ---*/ - Object.defineProperty(Array.prototype, "0", { - get: function () { - return false; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return false; + }, + configurable: true +}); assert.sameValue([Number].lastIndexOf(Number), 0, '[Number].lastIndexOf(Number)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-6.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-6.js index 8c2ec33795..70e3914190 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-6.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-6.js @@ -10,11 +10,15 @@ description: > Array-like object ---*/ - Object.defineProperty(Object.prototype, "0", { - get: function () { - return false; - }, - configurable: true - }); +Object.defineProperty(Object.prototype, "0", { + get: function() { + return false; + }, + configurable: true +}); -assert.sameValue(Array.prototype.lastIndexOf.call({ 0: true, 1: 1, length: 2 }, true), 0, 'Array.prototype.lastIndexOf.call({ 0: true, 1: 1, length: 2 }, true)'); +assert.sameValue(Array.prototype.lastIndexOf.call({ + 0: true, + 1: 1, + length: 2 +}, true), 0, 'Array.prototype.lastIndexOf.call({ 0: true, 1: 1, length: 2 }, true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-7.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-7.js index d38620b988..a3c2f49026 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-7.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-7.js @@ -9,9 +9,9 @@ description: > data property on an Array ---*/ - Array.prototype[0] = true; - Array.prototype[1] = false; - Array.prototype[2] = "true"; +Array.prototype[0] = true; +Array.prototype[1] = false; +Array.prototype[2] = "true"; assert.sameValue([, , , ].lastIndexOf(true), 0, '[, , , ].lastIndexOf(true)'); assert.sameValue([, , , ].lastIndexOf(false), 1, '[, , , ].lastIndexOf(false)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-8.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-8.js index fbb0ea0bd0..f06b7bfefc 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-8.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-8.js @@ -9,10 +9,16 @@ description: > data property on an Array-like object ---*/ - Object.prototype[0] = true; - Object.prototype[1] = false; - Object.prototype[2] = "true"; +Object.prototype[0] = true; +Object.prototype[1] = false; +Object.prototype[2] = "true"; -assert.sameValue(Array.prototype.lastIndexOf.call({ length: 3 }, true), 0, 'Array.prototype.lastIndexOf.call({ length: 3 }, true)'); -assert.sameValue(Array.prototype.lastIndexOf.call({ length: 3 }, false), 1, 'Array.prototype.lastIndexOf.call({ length: 3 }, false)'); -assert.sameValue(Array.prototype.lastIndexOf.call({ length: 3 }, "true"), 2, 'Array.prototype.lastIndexOf.call({ length: 3 }, "true")'); +assert.sameValue(Array.prototype.lastIndexOf.call({ + length: 3 +}, true), 0, 'Array.prototype.lastIndexOf.call({ length: 3 }, true)'); +assert.sameValue(Array.prototype.lastIndexOf.call({ + length: 3 +}, false), 1, 'Array.prototype.lastIndexOf.call({ length: 3 }, false)'); +assert.sameValue(Array.prototype.lastIndexOf.call({ + length: 3 +}, "true"), 2, 'Array.prototype.lastIndexOf.call({ length: 3 }, "true")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-9.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-9.js index a20c0fa5d4..d5ff8a47a3 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-9.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-9.js @@ -9,27 +9,27 @@ description: > accessor property on an Array ---*/ - var arr = [, , , ]; - Object.defineProperty(arr, "0", { - get: function () { - return 0; - }, - configurable: true - }); +var arr = [, , , ]; +Object.defineProperty(arr, "0", { + get: function() { + return 0; + }, + configurable: true +}); - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + return 1; + }, + configurable: true +}); - Object.defineProperty(arr, "2", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(arr, "2", { + get: function() { + return 2; + }, + configurable: true +}); assert.sameValue(arr.lastIndexOf(0), 0, 'arr.lastIndexOf(0)'); assert.sameValue(arr.lastIndexOf(1), 1, 'arr.lastIndexOf(1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-1.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-1.js index c88bf06b26..953212528e 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-1.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-1.js @@ -14,4 +14,6 @@ assert.sameValue(["0"].lastIndexOf(0), -1, '["0"].lastIndexOf(0)'); assert.sameValue([false].lastIndexOf(0), -1, '[false].lastIndexOf(0)'); assert.sameValue([undefined].lastIndexOf(0), -1, '[undefined].lastIndexOf(0)'); assert.sameValue([null].lastIndexOf(0), -1, '[null].lastIndexOf(0)'); -assert.sameValue([[]].lastIndexOf(0), -1, '[[]].lastIndexOf(0)'); +assert.sameValue([ + [] +].lastIndexOf(0), -1, '[[]].lastIndexOf(0)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-11.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-11.js index 97cbb1fd48..bbe7938890 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-11.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-11.js @@ -9,8 +9,8 @@ description: > element are Objects, and they refer to the same object ---*/ - var obj1 = {}; - var obj2 = {}; - var obj3 = obj2; +var obj1 = {}; +var obj2 = {}; +var obj3 = obj2; assert.sameValue([obj2, obj1].lastIndexOf(obj3), 0, '[obj2, obj1].lastIndexOf(obj3)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-iii-2.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-iii-2.js index 5c1d0c670e..ae16fd014d 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-iii-2.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-iii-2.js @@ -9,26 +9,26 @@ description: > element once search value is found ---*/ - var arr = [2, 1, , 1, 2]; - var elementFirstAccessed = false; - var elementThirdAccessed = false; +var arr = [2, 1, , 1, 2]; +var elementFirstAccessed = false; +var elementThirdAccessed = false; - Object.defineProperty(arr, "2", { - get: function () { - elementThirdAccessed = true; - return 2; - }, - configurable: true - }); - Object.defineProperty(arr, "0", { - get: function () { - elementFirstAccessed = true; - return 2; - }, - configurable: true - }); +Object.defineProperty(arr, "2", { + get: function() { + elementThirdAccessed = true; + return 2; + }, + configurable: true +}); +Object.defineProperty(arr, "0", { + get: function() { + elementFirstAccessed = true; + return 2; + }, + configurable: true +}); - arr.lastIndexOf(2); +arr.lastIndexOf(2); assert.sameValue(elementThirdAccessed, false, 'elementThirdAccessed'); assert.sameValue(elementFirstAccessed, false, 'elementFirstAccessed'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-9-1.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-9-1.js index 8f70daaf5c..2c4b6a094d 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-9-1.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-9-1.js @@ -7,13 +7,13 @@ es5id: 15.4.4.15-9-1 description: Array.prototype.lastIndexOf returns -1 for elements not present ---*/ - var a = new Array(); - a[100] = 1; - a[99999] = ""; - a[10] = new Object(); - a[5555] = 5.5; - a[123456] = "str"; - a[5] = 1E+309; +var a = new Array(); +a[100] = 1; +a[99999] = ""; +a[10] = new Object(); +a[5555] = 5.5; +a[123456] = "str"; +a[5] = 1E+309; assert.sameValue(a.lastIndexOf(1), 100, 'a.lastIndexOf(1)'); assert.sameValue(a.lastIndexOf(""), 99999, 'a.lastIndexOf("")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-9-2.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-9-2.js index 2c47880f48..e756e32f05 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-9-2.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-9-2.js @@ -9,11 +9,18 @@ description: > not access any other properties ---*/ - var accessed = false; - var f = {length: 0}; - Object.defineProperty(f,"0",{get: function () {accessed = true; return 1;}}); +var accessed = false; +var f = { + length: 0 +}; +Object.defineProperty(f, "0", { + get: function() { + accessed = true; + return 1; + } +}); - var i = Array.prototype.lastIndexOf.call(f,1); +var i = Array.prototype.lastIndexOf.call(f, 1); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-1.js index 84d3f60dea..15edce5b1e 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-1.js @@ -9,5 +9,5 @@ description: Array.prototype.map - applied to undefined assert.throws(TypeError, function() { - Array.prototype.map.call(undefined); // TypeError is thrown if value is undefined + Array.prototype.map.call(undefined); // TypeError is thrown if value is undefined }); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-10.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-10.js index abe5006666..52eb839eba 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-10.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-10.js @@ -7,12 +7,12 @@ es5id: 15.4.4.19-1-10 description: Array.prototype.map - applied to the Math object ---*/ - function callbackfn(val, idx, obj) { - return ('[object Math]' === Object.prototype.toString.call(obj)); - } +function callbackfn(val, idx, obj) { + return ('[object Math]' === Object.prototype.toString.call(obj)); +} - Math.length = 1; - Math[0] = 1; - var testResult = Array.prototype.map.call(Math, callbackfn); +Math.length = 1; +Math[0] = 1; +var testResult = Array.prototype.map.call(Math, callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-11.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-11.js index bf14fa9a5e..4858511196 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-11.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-11.js @@ -7,14 +7,14 @@ es5id: 15.4.4.19-1-11 description: Array.prototype.map - applied to Date object ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof Date; - } +function callbackfn(val, idx, obj) { + return obj instanceof Date; +} - var obj = new Date(); - obj.length = 1; - obj[0] = 1; +var obj = new Date(); +obj.length = 1; +obj[0] = 1; - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-12.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-12.js index ff7c0430cb..ed40782e89 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-12.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-12.js @@ -7,14 +7,14 @@ es5id: 15.4.4.19-1-12 description: Array.prototype.map - applied to RegExp object ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof RegExp; - } +function callbackfn(val, idx, obj) { + return obj instanceof RegExp; +} - var obj = new RegExp(); - obj.length = 1; - obj[0] = 1; +var obj = new RegExp(); +obj.length = 1; +obj[0] = 1; - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-13.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-13.js index 72f36faed5..a17d877bd7 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-13.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-13.js @@ -7,12 +7,12 @@ es5id: 15.4.4.19-1-13 description: Array.prototype.map - applied to the JSON object ---*/ - function callbackfn(val, idx, obj) { - return ('[object JSON]' === Object.prototype.toString.call(obj)); - } +function callbackfn(val, idx, obj) { + return ('[object JSON]' === Object.prototype.toString.call(obj)); +} - JSON.length = 1; - JSON[0] = 1; - var testResult = Array.prototype.map.call(JSON, callbackfn); +JSON.length = 1; +JSON[0] = 1; +var testResult = Array.prototype.map.call(JSON, callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-14.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-14.js index 0beb4afa90..2fc430d6d4 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-14.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-14.js @@ -7,14 +7,14 @@ es5id: 15.4.4.19-1-14 description: Array.prototype.map - applied to Error object ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof Error; - } +function callbackfn(val, idx, obj) { + return obj instanceof Error; +} - var obj = new Error(); - obj.length = 1; - obj[0] = 1; +var obj = new Error(); +obj.length = 1; +obj[0] = 1; - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-15.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-15.js index 2dd146e2aa..a8774bf2fc 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-15.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-15.js @@ -7,14 +7,14 @@ es5id: 15.4.4.19-1-15 description: Array.prototype.map - applied to the Arguments object ---*/ - function callbackfn(val, idx, obj) { - return ('[object Arguments]' === Object.prototype.toString.call(obj)); - } +function callbackfn(val, idx, obj) { + return ('[object Arguments]' === Object.prototype.toString.call(obj)); +} - var obj = (function () { - return arguments; - }("a", "b")); +var obj = (function() { + return arguments; +}("a", "b")); - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-2.js index 45316ee3e2..864d017a07 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-2.js @@ -9,5 +9,5 @@ description: Array.prototype.map - applied to null assert.throws(TypeError, function() { - Array.prototype.map.call(null); // TypeError is thrown if value is null + Array.prototype.map.call(null); // TypeError is thrown if value is null }); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-3.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-3.js index 94d84f8f9c..3566c0ee49 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-3.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-3.js @@ -7,13 +7,13 @@ es5id: 15.4.4.19-1-3 description: Array.prototype.map - applied to boolean primitive ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof Boolean; - } +function callbackfn(val, idx, obj) { + return obj instanceof Boolean; +} - Boolean.prototype[0] = true; - Boolean.prototype.length = 1; +Boolean.prototype[0] = true; +Boolean.prototype.length = 1; - var testResult = Array.prototype.map.call(false, callbackfn); +var testResult = Array.prototype.map.call(false, callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-4.js index 0fd3c3f000..82e9e614e5 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-4.js @@ -7,16 +7,16 @@ es5id: 15.4.4.19-1-4 description: Array.prototype.map - applied to Boolean object ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof Boolean; - } +function callbackfn(val, idx, obj) { + return obj instanceof Boolean; +} - var obj = new Boolean(true); - obj.length = 2; - obj[0] = 11; - obj[1] = 12; +var obj = new Boolean(true); +obj.length = 2; +obj[0] = 11; +obj[1] = 12; - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-5.js index 15ef1ec6d1..6a04e9177d 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-5.js @@ -7,13 +7,13 @@ es5id: 15.4.4.19-1-5 description: Array.prototype.map - applied to number primitive ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof Number; - } +function callbackfn(val, idx, obj) { + return obj instanceof Number; +} - Number.prototype[0] = 1; - Number.prototype.length = 1; +Number.prototype[0] = 1; +Number.prototype.length = 1; - var testResult = Array.prototype.map.call(2.5, callbackfn); +var testResult = Array.prototype.map.call(2.5, callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-6.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-6.js index e27b6cabbe..ac9c03bca2 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-6.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-6.js @@ -7,16 +7,16 @@ es5id: 15.4.4.19-1-6 description: Array.prototype.map - applied to Number object ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof Number; - } +function callbackfn(val, idx, obj) { + return obj instanceof Number; +} - var obj = new Number(-128); - obj.length = 2; - obj[0] = 11; - obj[1] = 12; +var obj = new Number(-128); +obj.length = 2; +obj[0] = 11; +obj[1] = 12; - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-7.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-7.js index ca3f320496..402368ebd8 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-7.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-7.js @@ -7,11 +7,11 @@ es5id: 15.4.4.19-1-7 description: Array.prototype.map - applied to string primitive ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof String; - } +function callbackfn(val, idx, obj) { + return obj instanceof String; +} - var testResult = Array.prototype.map.call("abc", callbackfn); +var testResult = Array.prototype.map.call("abc", callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-8.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-8.js index aef3b6dccc..93ca61e4fc 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-8.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-8.js @@ -7,12 +7,12 @@ es5id: 15.4.4.19-1-8 description: Array.prototype.map - applied to String object ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof String; - } +function callbackfn(val, idx, obj) { + return obj instanceof String; +} - var obj = new String("abc"); - var testResult = Array.prototype.map.call(obj, callbackfn); +var obj = new String("abc"); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-9.js index 73438cef48..82f5918aa3 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-9.js @@ -7,17 +7,17 @@ es5id: 15.4.4.19-1-9 description: Array.prototype.map - applied to Function object ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof Function; - } +function callbackfn(val, idx, obj) { + return obj instanceof Function; +} - var obj = function (a, b) { - return a + b; - }; - obj[0] = 11; - obj[1] = 9; +var obj = function(a, b) { + return a + b; +}; +obj[0] = 11; +obj[1] = 9; - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-1.js index 19e77252c4..9e89b6d856 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-1.js @@ -9,17 +9,17 @@ description: > is an own data property ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: 2 - }; +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: 2 +}; - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-10.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-10.js index 431968e00c..9a74b1e09a 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-10.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-10.js @@ -9,27 +9,27 @@ description: > inherited accessor property ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(proto, "length", { + get: function() { + return 2; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[0] = 12; - child[1] = 11; - child[2] = 9; +var child = new Con(); +child[0] = 12; +child[1] = 11; +child[2] = 9; - var testResult = Array.prototype.map.call(child, callbackfn); +var testResult = Array.prototype.map.call(child, callbackfn); assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-11.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-11.js index c0766d9bce..c026c69712 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-11.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-11.js @@ -9,19 +9,19 @@ description: > is an own accessor property without a get function ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var obj = { - 0: 11, - 1: 12 - }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); +var obj = { + 0: 11, + 1: 12 +}; +Object.defineProperty(obj, "length", { + set: function() {}, + configurable: true +}); - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-12.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-12.js index 2aebd50d9b..93d0ceada0 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-12.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-12.js @@ -10,23 +10,26 @@ description: > overrides an inherited accessor property ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - Object.defineProperty(Object.prototype, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(Object.prototype, "length", { + get: function() { + return 2; + }, + configurable: true +}); - var obj = { 0: 12, 1: 11 }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); +var obj = { + 0: 12, + 1: 11 +}; +Object.defineProperty(obj, "length", { + set: function() {}, + configurable: true +}); - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-13.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-13.js index 6c59cd21a9..756b3754fe 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-13.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-13.js @@ -9,23 +9,23 @@ description: > 'length' is inherited accessor property without a get function ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var proto = {}; - Object.defineProperty(proto, "length", { - set: function () { }, - configurable: true - }); +var proto = {}; +Object.defineProperty(proto, "length", { + set: function() {}, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[0] = 11; - child[1] = 12; +var child = new Con(); +child[0] = 11; +child[1] = 12; - var testResult = Array.prototype.map.call(child, callbackfn); +var testResult = Array.prototype.map.call(child, callbackfn); assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-14.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-14.js index 430de15250..6b3f226099 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-14.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-14.js @@ -9,12 +9,15 @@ description: > 'length' property doesn't exist ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-17.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-17.js index 04fd19b43e..28607e1b68 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-17.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-17.js @@ -9,14 +9,14 @@ description: > implements its own property get method ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var func = function (a, b) { - return Array.prototype.map.call(arguments, callbackfn); - }; +var func = function(a, b) { + return Array.prototype.map.call(arguments, callbackfn); +}; - var testResult = func(12, 11); +var testResult = func(12, 11); assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-18.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-18.js index 524012db22..16f307c0fc 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-18.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-18.js @@ -9,13 +9,13 @@ description: > its own property get method ---*/ - function callbackfn(val, idx, obj) { - return parseInt(val, 10) > 1; - } +function callbackfn(val, idx, obj) { + return parseInt(val, 10) > 1; +} - var str = new String("432"); +var str = new String("432"); - String.prototype[3] = "1"; - var testResult = Array.prototype.map.call(str, callbackfn); +String.prototype[3] = "1"; +var testResult = Array.prototype.map.call(str, callbackfn); assert.sameValue(testResult.length, 3, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-19.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-19.js index 60be78877f..c2dbc89e3a 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-19.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-19.js @@ -9,17 +9,17 @@ description: > its own property get method ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var fun = function (a, b) { - return a + b; - }; - fun[0] = 12; - fun[1] = 11; - fun[2] = 9; +var fun = function(a, b) { + return a + b; +}; +fun[0] = 12; +fun[1] = 11; +fun[2] = 9; - var testResult = Array.prototype.map.call(fun, callbackfn); +var testResult = Array.prototype.map.call(fun, callbackfn); assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-2.js index 028b0c6e05..46aa6c4fbb 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-2.js @@ -9,10 +9,10 @@ description: > Array ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var testResult = [12, 11].map(callbackfn); +var testResult = [12, 11].map(callbackfn); assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-3.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-3.js index c6170291e6..4c6c6b18df 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-3.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-3.js @@ -9,21 +9,23 @@ description: > own data property that overrides an inherited data property ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var proto = { length: 3 }; +var proto = { + length: 3 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 2; - child[0] = 12; - child[1] = 11; - child[2] = 9; +var child = new Con(); +child.length = 2; +child[0] = 12; +child[1] = 11; +child[2] = 9; - var testResult = Array.prototype.map.call(child, callbackfn); +var testResult = Array.prototype.map.call(child, callbackfn); assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-4.js index 3eff1cd3b4..eab5b1cb3b 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-4.js @@ -9,13 +9,13 @@ description: > overrides an inherited data property on an Array ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } - var arrProtoLen; +function callbackfn(val, idx, obj) { + return val > 10; +} +var arrProtoLen; - arrProtoLen = Array.prototype.length; - Array.prototype.length = 0; - var testResult = [12, 11].map(callbackfn); +arrProtoLen = Array.prototype.length; +Array.prototype.length = 0; +var testResult = [12, 11].map(callbackfn); assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-5.js index 144505d75f..a636e0655f 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-5.js @@ -9,31 +9,31 @@ description: > own data property that overrides an inherited accessor property ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 3; - }, - configurable: true - }); +Object.defineProperty(proto, "length", { + get: function() { + return 3; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - Object.defineProperty(child, "length", { - value: 2, - configurable: true - }); - child[0] = 12; - child[1] = 11; - child[2] = 9; +var child = new Con(); +Object.defineProperty(child, "length", { + value: 2, + configurable: true +}); +child[0] = 12; +child[1] = 11; +child[2] = 9; - var testResult = Array.prototype.map.call(child, callbackfn); +var testResult = Array.prototype.map.call(child, callbackfn); assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-6.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-6.js index a08231572e..1cd5e51a2c 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-6.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-6.js @@ -9,20 +9,22 @@ description: > inherited data property ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var proto = { length: 2 }; +var proto = { + length: 2 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[0] = 12; - child[1] = 11; - child[2] = 9; +var child = new Con(); +child[0] = 12; +child[1] = 11; +child[2] = 9; - var testResult = Array.prototype.map.call(child, callbackfn); +var testResult = Array.prototype.map.call(child, callbackfn); assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-7.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-7.js index da80f49cb7..6853ad8d30 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-7.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-7.js @@ -9,23 +9,23 @@ description: > own accessor property ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var obj = {}; +var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return 2; + }, + configurable: true +}); - obj[0] = 12; - obj[1] = 11; - obj[2] = 9; +obj[0] = 12; +obj[1] = 11; +obj[2] = 9; - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-8.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-8.js index 45029cd392..abbf6ab285 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-8.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-8.js @@ -9,28 +9,30 @@ description: > own accessor property that overrides an inherited data property ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var proto = { length: 3 }; +var proto = { + length: 3 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); +var child = new Con(); - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(child, "length", { + get: function() { + return 2; + }, + configurable: true +}); - child[0] = 12; - child[1] = 11; - child[2] = 9; +child[0] = 12; +child[1] = 11; +child[2] = 9; - var testResult = Array.prototype.map.call(child, callbackfn); +var testResult = Array.prototype.map.call(child, callbackfn); assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-9.js index f587d696f6..043d20e1b4 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-9.js @@ -10,35 +10,35 @@ description: > property ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 3; - }, - configurable: true - }); +Object.defineProperty(proto, "length", { + get: function() { + return 3; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); +var child = new Con(); - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(child, "length", { + get: function() { + return 2; + }, + configurable: true +}); - child[0] = 12; - child[1] = 11; - child[2] = 9; +child[0] = 12; +child[1] = 11; +child[2] = 9; - var testResult = Array.prototype.map.call(child, callbackfn); +var testResult = Array.prototype.map.call(child, callbackfn); assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-1.js index 4318f25adf..364277255e 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-1.js @@ -7,12 +7,14 @@ es5id: 15.4.4.19-3-1 description: Array.prototype.map - value of 'length' is undefined ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var obj = { length: undefined }; +var obj = { + length: undefined +}; - var newArr = Array.prototype.map.call(obj, callbackfn); +var newArr = Array.prototype.map.call(obj, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-10.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-10.js index 513b39734d..ec607589a8 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-10.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-10.js @@ -7,12 +7,15 @@ es5id: 15.4.4.19-3-10 description: Array.prototype.map - value of 'length' is a number (value is NaN) ---*/ - function callbackfn(val, idx, obj) { - return val < 10; - } +function callbackfn(val, idx, obj) { + return val < 10; +} - var obj = { 0: 9, length: NaN }; +var obj = { + 0: 9, + length: NaN +}; - var newArr = Array.prototype.map.call(obj, callbackfn); +var newArr = Array.prototype.map.call(obj, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-11.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-11.js index aaa1244064..78210aa745 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-11.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-11.js @@ -9,12 +9,17 @@ description: > number ---*/ - function callbackfn(val, idx, obj) { - return val < 10; - } +function callbackfn(val, idx, obj) { + return val < 10; +} - var obj = { 0: 11, 1: 9, 2: 12, length: "2" }; +var obj = { + 0: 11, + 1: 9, + 2: 12, + length: "2" +}; - var newArr = Array.prototype.map.call(obj, callbackfn); +var newArr = Array.prototype.map.call(obj, callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-12.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-12.js index ca5eb14e62..a355dc5b2b 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-12.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-12.js @@ -9,12 +9,17 @@ description: > number ---*/ - function callbackfn(val, idx, obj) { - return val < 10; - } +function callbackfn(val, idx, obj) { + return val < 10; +} - var obj = { 0: 11, 1: 9, 2: 12, length: "-4294967294" }; +var obj = { + 0: 11, + 1: 9, + 2: 12, + length: "-4294967294" +}; - var newArr = Array.prototype.map.call(obj, callbackfn); +var newArr = Array.prototype.map.call(obj, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-13.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-13.js index 5c0236679e..704ea0f16d 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-13.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-13.js @@ -9,12 +9,17 @@ description: > convert to number primitive (value is a decimal number) ---*/ - function callbackfn(val, idx, obj) { - return val < 10; - } +function callbackfn(val, idx, obj) { + return val < 10; +} - var obj = { 0: 11, 1: 9, 2: 12, length: "2.5" }; +var obj = { + 0: 11, + 1: 9, + 2: 12, + length: "2.5" +}; - var newArr = Array.prototype.map.call(obj, callbackfn); +var newArr = Array.prototype.map.call(obj, callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-14.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-14.js index 7d77ddf00d..1b57ec3679 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-14.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-14.js @@ -7,11 +7,14 @@ es5id: 15.4.4.19-3-14 description: Array.prototype.map - 'length' is a string containing Infinity ---*/ - function callbackfn(val, idx, obj) { - return val < 10; - } +function callbackfn(val, idx, obj) { + return val < 10; +} - var obj = { 0: 9, length: "Infinity" }; +var obj = { + 0: 9, + length: "Infinity" +}; assert.throws(RangeError, function() { - Array.prototype.map.call(obj, callbackfn); + Array.prototype.map.call(obj, callbackfn); }); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-15.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-15.js index 180be9ffbb..100952bcde 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-15.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-15.js @@ -9,12 +9,17 @@ description: > exponential number ---*/ - function callbackfn(val, idx, obj) { - return val < 10; - } +function callbackfn(val, idx, obj) { + return val < 10; +} - var obj = { 0: 11, 1: 9, 2: 12, length: "2E0" }; +var obj = { + 0: 11, + 1: 9, + 2: 12, + length: "2E0" +}; - var newArr = Array.prototype.map.call(obj, callbackfn); +var newArr = Array.prototype.map.call(obj, callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-16.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-16.js index 4190366aff..d227a73ec0 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-16.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-16.js @@ -7,12 +7,17 @@ es5id: 15.4.4.19-3-16 description: Array.prototype.map - 'length' is a string containing a hex number ---*/ - function callbackfn(val, idx, obj) { - return val < 10; - } +function callbackfn(val, idx, obj) { + return val < 10; +} - var obj = { 0: 11, 1: 9, 2: 12, length: "0x0002" }; +var obj = { + 0: 11, + 1: 9, + 2: 12, + length: "0x0002" +}; - var newArr = Array.prototype.map.call(obj, callbackfn); +var newArr = Array.prototype.map.call(obj, callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-17.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-17.js index bf76228350..5c7446c41e 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-17.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-17.js @@ -9,12 +9,17 @@ description: > number with leading zeros ---*/ - function callbackfn(val, idx, obj) { - return val < 10; - } +function callbackfn(val, idx, obj) { + return val < 10; +} - var obj = { 0: 11, 1: 9, 2: 12, length: "0002.00" }; +var obj = { + 0: 11, + 1: 9, + 2: 12, + length: "0002.00" +}; - var newArr = Array.prototype.map.call(obj, callbackfn); +var newArr = Array.prototype.map.call(obj, callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-18.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-18.js index 887e799925..bbd1b8b5a0 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-18.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-18.js @@ -9,12 +9,14 @@ description: > convert to a number ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var obj = { length: "asdf!_" }; +var obj = { + length: "asdf!_" +}; - var newArr = Array.prototype.map.call(obj, callbackfn); +var newArr = Array.prototype.map.call(obj, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-19.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-19.js index 4a181897f9..2f5e2b414f 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-19.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-19.js @@ -9,21 +9,21 @@ description: > own toString method ---*/ - function callbackfn(val, idx, obj) { - return val < 10; - } +function callbackfn(val, idx, obj) { + return val < 10; +} - var obj = { - 0: 11, - 1: 9, +var obj = { + 0: 11, + 1: 9, - length: { - toString: function () { - return '2'; - } - } - }; + length: { + toString: function() { + return '2'; + } + } +}; - var newArr = Array.prototype.map.call(obj, callbackfn); +var newArr = Array.prototype.map.call(obj, callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-2.js index dc6edd0219..0dae4ae485 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-2.js @@ -9,12 +9,15 @@ description: > (length overridden to true(type conversion)) ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var obj = { 0: 11, length: true }; +var obj = { + 0: 11, + length: true +}; - var newArr = Array.prototype.map.call(obj, callbackfn); +var newArr = Array.prototype.map.call(obj, callbackfn); assert.sameValue(newArr.length, 1, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-20.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-20.js index e980403850..bc431d8a72 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-20.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-20.js @@ -9,21 +9,21 @@ description: > own valueOf method ---*/ - function callbackfn(val, idx, obj) { - return val < 10; - } +function callbackfn(val, idx, obj) { + return val < 10; +} - var obj = { - 0: 11, - 1: 9, +var obj = { + 0: 11, + 1: 9, - length: { - valueOf: function () { - return 2; - } - } - }; + length: { + valueOf: function() { + return 2; + } + } +}; - var newArr = Array.prototype.map.call(obj, callbackfn); +var newArr = Array.prototype.map.call(obj, callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-21.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-21.js index d1df6df8ec..fb22c73551 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-21.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-21.js @@ -10,29 +10,29 @@ description: > returns a string ---*/ - function callbackfn(val, idx, obj) { - return val < 10; - } +function callbackfn(val, idx, obj) { + return val < 10; +} - var firstStepOccured = false; - var secondStepOccured = false; - var obj = { - 0: 11, - 1: 9, +var firstStepOccured = false; +var secondStepOccured = false; +var obj = { + 0: 11, + 1: 9, - length: { - valueOf: function () { - firstStepOccured = true; - return {}; - }, - toString: function () { - secondStepOccured = true; - return '2'; - } - } - }; + length: { + valueOf: function() { + firstStepOccured = true; + return {}; + }, + toString: function() { + secondStepOccured = true; + return '2'; + } + } +}; - var newArr = Array.prototype.map.call(obj, callbackfn); +var newArr = Array.prototype.map.call(obj, callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); assert(firstStepOccured, 'firstStepOccured !== true'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-22.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-22.js index 3365cf226a..a7825b1c13 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-22.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-22.js @@ -10,23 +10,23 @@ description: > primitive values ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var obj = { - 1: 11, - 2: 12, +var obj = { + 1: 11, + 2: 12, - length: { - valueOf: function () { - return {}; - }, - toString: function () { - return {}; - } - } - }; + length: { + valueOf: function() { + return {}; + }, + toString: function() { + return {}; + } + } +}; assert.throws(TypeError, function() { - Array.prototype.map.call(obj, callbackfn); + Array.prototype.map.call(obj, callbackfn); }); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-23.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-23.js index 69eb09631f..44269d0816 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-23.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-23.js @@ -9,37 +9,37 @@ description: > an object with an own toString and inherited valueOf methods ---*/ - function callbackfn(val, idx, obj) { - return val < 10; - } +function callbackfn(val, idx, obj) { + return val < 10; +} - var valueOfAccessed = false; - var toStringAccessed = false; +var valueOfAccessed = false; +var toStringAccessed = false; - var proto = { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - }; +var proto = { + valueOf: function() { + valueOfAccessed = true; + return 2; + } +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); +var child = new Con(); - child.toString = function () { - toStringAccessed = true; - return '1'; - }; +child.toString = function() { + toStringAccessed = true; + return '1'; +}; - var obj = { - 0: 11, - 1: 9, - length: child - }; +var obj = { + 0: 11, + 1: 9, + length: child +}; - var newArr = Array.prototype.map.call(obj, callbackfn); +var newArr = Array.prototype.map.call(obj, callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); assert(valueOfAccessed, 'valueOfAccessed !== true'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-24.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-24.js index 829ee06977..870a5631c4 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-24.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-24.js @@ -9,16 +9,16 @@ description: > ensure truncation occurs in the proper direction ---*/ - function callbackfn(val, idx, obj) { - return val < 10; - } +function callbackfn(val, idx, obj) { + return val < 10; +} - var obj = { - 0: 11, - 1: 9, - length: 2.685 - }; +var obj = { + 0: 11, + 1: 9, + length: 2.685 +}; - var newArr = Array.prototype.map.call(obj, callbackfn); +var newArr = Array.prototype.map.call(obj, callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-25.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-25.js index 07ed728fc4..3c7138f672 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-25.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-25.js @@ -7,16 +7,16 @@ es5id: 15.4.4.19-3-25 description: Array.prototype.map - value of 'length' is a negative non-integer ---*/ - function callbackfn(val, idx, obj) { - return val < 10; - } +function callbackfn(val, idx, obj) { + return val < 10; +} - var obj = { - 0: 11, - 1: 9, - length: -4294967294.5 - }; +var obj = { + 0: 11, + 1: 9, + length: -4294967294.5 +}; - var newArr = Array.prototype.map.call(obj, callbackfn); +var newArr = Array.prototype.map.call(obj, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-28.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-28.js index 4c0c984866..b4c3e3b311 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-28.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-28.js @@ -7,14 +7,14 @@ es5id: 15.4.4.19-3-28 description: Array.prototype.map - value of 'length' is boundary value (2^32) ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var obj = { - 0: 12, - length: 4294967296 - }; +var obj = { + 0: 12, + length: 4294967296 +}; assert.throws(RangeError, function() { - var newArr = Array.prototype.map.call(obj, callbackfn); + var newArr = Array.prototype.map.call(obj, callbackfn); }); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-29.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-29.js index 647d3c24da..613ab9c8e6 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-29.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-29.js @@ -9,15 +9,15 @@ description: > 1) ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var obj = { - 0: 11, - 1: 9, - length: 4294967297 - }; +var obj = { + 0: 11, + 1: 9, + length: 4294967297 +}; assert.throws(RangeError, function() { - var newArr = Array.prototype.map.call(obj, callbackfn); + var newArr = Array.prototype.map.call(obj, callbackfn); }); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-3.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-3.js index bc926871d2..096a0c3236 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-3.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-3.js @@ -7,12 +7,15 @@ es5id: 15.4.4.19-3-3 description: Array.prototype.map - value of 'length' is a number (value is 0) ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var obj = { 0: 11, length: 0 }; +var obj = { + 0: 11, + length: 0 +}; - var newArr = Array.prototype.map.call(obj, callbackfn); +var newArr = Array.prototype.map.call(obj, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-4.js index d0a34ea147..c3d6fbc9cb 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-4.js @@ -7,12 +7,15 @@ es5id: 15.4.4.19-3-4 description: Array.prototype.map - value of 'length' is a number (value is +0) ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var obj = { 0: 11, length: +0 }; +var obj = { + 0: 11, + length: +0 +}; - var newArr = Array.prototype.map.call(obj, callbackfn); +var newArr = Array.prototype.map.call(obj, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-5.js index d9409340f5..d467cfe172 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-5.js @@ -7,12 +7,15 @@ es5id: 15.4.4.19-3-5 description: Array.prototype.map - value of 'length' is a number (value is -0) ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var obj = { 0: 11, length: -0 }; +var obj = { + 0: 11, + length: -0 +}; - var newArr = Array.prototype.map.call(obj, callbackfn); +var newArr = Array.prototype.map.call(obj, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-6.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-6.js index 6efbf8d0b1..794464e22a 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-6.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-6.js @@ -9,12 +9,17 @@ description: > number ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var obj = { 0: 10, 1: 12, 2: 9, length: 2 }; +var obj = { + 0: 10, + 1: 12, + 2: 9, + length: 2 +}; - var newArr = Array.prototype.map.call(obj, callbackfn); +var newArr = Array.prototype.map.call(obj, callbackfn); assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-7.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-7.js index c4b0f1bd4c..a5215ce4fb 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-7.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-7.js @@ -9,12 +9,17 @@ description: > number ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var obj = { 0: 10, 1: 12, 2: 9, length: -4294967294 }; +var obj = { + 0: 10, + 1: 12, + 2: 9, + length: -4294967294 +}; - var newArr = Array.prototype.map.call(obj, callbackfn); +var newArr = Array.prototype.map.call(obj, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-8.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-8.js index 6265784775..3677932afd 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-8.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-8.js @@ -9,11 +9,14 @@ description: > Infinity) ---*/ - function callbackfn(val, idx, obj) { - return val < 10; - } +function callbackfn(val, idx, obj) { + return val < 10; +} - var obj = { 0: 9, length: Infinity }; +var obj = { + 0: 9, + length: Infinity +}; assert.throws(RangeError, function() { - Array.prototype.map.call(obj, callbackfn); + Array.prototype.map.call(obj, callbackfn); }); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-9.js index be3cdf24c6..a97e6065ee 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-9.js @@ -9,12 +9,15 @@ description: > -Infinity) ---*/ - function callbackfn(val, idx, obj) { - return val < 10; - } +function callbackfn(val, idx, obj) { + return val < 10; +} - var obj = { 0: 9, length: -Infinity }; +var obj = { + 0: 9, + length: -Infinity +}; - var newArr = Array.prototype.map.call(obj, callbackfn); +var newArr = Array.prototype.map.call(obj, callbackfn); assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-4-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-4-1.js index 417b73aba7..fc826857a1 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-4-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-4-1.js @@ -7,7 +7,7 @@ es5id: 15.4.4.19-4-1 description: Array.prototype.map throws TypeError if callbackfn is undefined ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.map(); + arr.map(); }); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-4-10.js b/test/built-ins/Array/prototype/map/15.4.4.19-4-10.js index 0b449aa216..74bc391271 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-4-10.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-4-10.js @@ -9,15 +9,18 @@ description: > thrown by step 2 ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - Object.defineProperty(obj, "length", { - get: function () { - throw new Test262Error(); - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + throw new Test262Error(); + }, + configurable: true +}); assert.throws(Test262Error, function() { - Array.prototype.map.call(obj, undefined); + Array.prototype.map.call(obj, undefined); }); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-4-11.js b/test/built-ins/Array/prototype/map/15.4.4.19-4-11.js index 2c9041b64c..5723ab3ed8 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-4-11.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-4-11.js @@ -9,19 +9,22 @@ description: > thrown by step 3 ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - throw new Test262Error(); - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + toString: function() { + throw new Test262Error(); + } + }; + }, + configurable: true +}); assert.throws(Test262Error, function() { - Array.prototype.map.call(obj, undefined); + Array.prototype.map.call(obj, undefined); }); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-4-12.js b/test/built-ins/Array/prototype/map/15.4.4.19-4-12.js index 68bc278558..45d301f5f4 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-4-12.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-4-12.js @@ -7,11 +7,11 @@ es5id: 15.4.4.19-4-12 description: Array.prototype.map - 'callbackfn' is a function ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var testResult = [11, 9].map(callbackfn); +var testResult = [11, 9].map(callbackfn); assert.sameValue(testResult.length, 2, 'testResult.length'); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-4-15.js b/test/built-ins/Array/prototype/map/15.4.4.19-4-15.js index 2d440b206d..3df2d5ab4e 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-4-15.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-4-15.js @@ -9,26 +9,28 @@ description: > passing undefined for callbackfn ---*/ - var obj = { 10: 10 }; - var lengthAccessed = false; - var loopAccessed = false; +var obj = { + 10: 10 +}; +var lengthAccessed = false; +var loopAccessed = false; - Object.defineProperty(obj, "length", { - get: function () { - lengthAccessed = true; - return 20; - }, - configurable: true - }); - Object.defineProperty(obj, "0", { - get: function () { - loopAccessed = true; - return 10; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + lengthAccessed = true; + return 20; + }, + configurable: true +}); +Object.defineProperty(obj, "0", { + get: function() { + loopAccessed = true; + return 10; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.map.call(obj); + Array.prototype.map.call(obj); }); assert(lengthAccessed, 'lengthAccessed !== true'); assert.sameValue(loopAccessed, false, 'loopAccessed'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-4-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-4-2.js index b239210714..1da77da817 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-4-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-4-2.js @@ -9,7 +9,7 @@ description: > unreferenced ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(ReferenceError, function() { - arr.map(foo); + arr.map(foo); }); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-4-3.js b/test/built-ins/Array/prototype/map/15.4.4.19-4-3.js index 2dd6ecef6a..d6e5f8d341 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-4-3.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-4-3.js @@ -7,7 +7,7 @@ es5id: 15.4.4.19-4-3 description: Array.prototype.map throws TypeError if callbackfn is null ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.map(null); + arr.map(null); }); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-4-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-4-4.js index fe5eb72aaa..fe8918bfca 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-4-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-4-4.js @@ -7,7 +7,7 @@ es5id: 15.4.4.19-4-4 description: Array.prototype.map throws TypeError if callbackfn is boolean ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.map(true); + arr.map(true); }); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-4-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-4-5.js index 0c7a6d5e36..b6c230364a 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-4-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-4-5.js @@ -7,7 +7,7 @@ es5id: 15.4.4.19-4-5 description: Array.prototype.map throws TypeError if callbackfn is number ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.map(5); + arr.map(5); }); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-4-6.js b/test/built-ins/Array/prototype/map/15.4.4.19-4-6.js index bebc2b0202..df6ccdb90d 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-4-6.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-4-6.js @@ -7,7 +7,7 @@ es5id: 15.4.4.19-4-6 description: Array.prototype.map throws TypeError if callbackfn is string ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.map("abc"); + arr.map("abc"); }); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-4-7.js b/test/built-ins/Array/prototype/map/15.4.4.19-4-7.js index a52fc2c2be..d795447cb1 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-4-7.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-4-7.js @@ -9,7 +9,7 @@ description: > without Call internal method ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.map(new Object()); + arr.map(new Object()); }); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-4-8.js b/test/built-ins/Array/prototype/map/15.4.4.19-4-8.js index d9126d50ab..f7914a9410 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-4-8.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-4-8.js @@ -9,18 +9,21 @@ description: > when an exception occurs ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - var accessed = false; +var accessed = false; - Object.defineProperty(obj, "length", { - get: function () { - accessed = true; - return 2; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + accessed = true; + return 2; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.map.call(obj, null); + Array.prototype.map.call(obj, null); }); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-4-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-4-9.js index 5a28ad0178..03ecedcc6a 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-4-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-4-9.js @@ -9,22 +9,25 @@ description: > when an exception occurs ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - var accessed = false; +var accessed = false; - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - accessed = true; - return "2"; - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + toString: function() { + accessed = true; + return "2"; + } + }; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.map.call(obj, null); + Array.prototype.map.call(obj, null); }); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-1-s.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-1-s.js index 9132028458..a2e997d8b4 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-1-s.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-1-s.js @@ -8,14 +8,14 @@ description: Array.prototype.map - thisArg not passed to strict callbackfn flags: [noStrict] ---*/ - var innerThisCorrect = false; +var innerThisCorrect = false; - function callbackfn(val, idx, obj) { - "use strict"; - innerThisCorrect = this===undefined; - return true; - } +function callbackfn(val, idx, obj) { + "use strict"; + innerThisCorrect = this === undefined; + return true; +} - [1].map(callbackfn); +[1].map(callbackfn); assert(innerThisCorrect, 'innerThisCorrect !== true'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-1.js index c9e19110cf..a2b7393a98 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-1.js @@ -8,17 +8,17 @@ description: Array.prototype.map - thisArg not passed flags: [noStrict] ---*/ - this._15_4_4_19_5_1 = true; +this._15_4_4_19_5_1 = true; (function() { - var _15_4_4_19_5_1 = false; + var _15_4_4_19_5_1 = false; - function callbackfn(val, idx, obj) { - return this._15_4_4_19_5_1; - } - var srcArr = [1]; - var resArr = srcArr.map(callbackfn); + function callbackfn(val, idx, obj) { + return this._15_4_4_19_5_1; + } + var srcArr = [1]; + var resArr = srcArr.map(callbackfn); -assert.sameValue(resArr[0], true, 'resArr[0]'); + assert.sameValue(resArr[0], true, 'resArr[0]'); })(); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-10.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-10.js index 04fca72a6a..a2c4d150b4 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-10.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-10.js @@ -7,12 +7,12 @@ es5id: 15.4.4.19-5-10 description: Array.prototype.map - Array object can be used as thisArg ---*/ - var objArray = new Array(2); +var objArray = new Array(2); - function callbackfn(val, idx, obj) { - return this === objArray; - } +function callbackfn(val, idx, obj) { + return this === objArray; +} - var testResult = [11].map(callbackfn, objArray); +var testResult = [11].map(callbackfn, objArray); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-11.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-11.js index 945db32b66..98cd84ad18 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-11.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-11.js @@ -7,12 +7,12 @@ es5id: 15.4.4.19-5-11 description: Array.prototype.map - String object can be used as thisArg ---*/ - var objString = new String(); +var objString = new String(); - function callbackfn(val, idx, obj) { - return this === objString; - } +function callbackfn(val, idx, obj) { + return this === objString; +} - var testResult = [11].map(callbackfn, objString); +var testResult = [11].map(callbackfn, objString); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-12.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-12.js index a6bbce103e..0fbcf8f7a9 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-12.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-12.js @@ -7,12 +7,12 @@ es5id: 15.4.4.19-5-12 description: Array.prototype.map - Boolean object can be used as thisArg ---*/ - var objBoolean = new Boolean(); +var objBoolean = new Boolean(); - function callbackfn(val, idx, obj) { - return this === objBoolean; - } +function callbackfn(val, idx, obj) { + return this === objBoolean; +} - var testResult = [11].map(callbackfn, objBoolean); +var testResult = [11].map(callbackfn, objBoolean); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-13.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-13.js index 23db7ce3a3..a02c29a9e0 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-13.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-13.js @@ -7,12 +7,12 @@ es5id: 15.4.4.19-5-13 description: Array.prototype.map - Number object can be used as thisArg ---*/ - var objNumber = new Number(); +var objNumber = new Number(); - function callbackfn(val, idx, obj) { - return this === objNumber; - } +function callbackfn(val, idx, obj) { + return this === objNumber; +} - var testResult = [11].map(callbackfn, objNumber); +var testResult = [11].map(callbackfn, objNumber); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-14.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-14.js index a845aa77a0..01a23927ac 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-14.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-14.js @@ -7,10 +7,10 @@ es5id: 15.4.4.19-5-14 description: Array.prototype.map - the Math object can be used as thisArg ---*/ - function callbackfn(val, idx, obj) { - return this === Math; - } +function callbackfn(val, idx, obj) { + return this === Math; +} - var testResult = [11].map(callbackfn, Math); +var testResult = [11].map(callbackfn, Math); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-15.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-15.js index 84e7c7b78a..9dd98f5822 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-15.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-15.js @@ -7,12 +7,12 @@ es5id: 15.4.4.19-5-15 description: Array.prototype.map - Date object can be used as thisArg ---*/ - var objDate = new Date(); +var objDate = new Date(); - function callbackfn(val, idx, obj) { - return this === objDate; - } +function callbackfn(val, idx, obj) { + return this === objDate; +} - var testResult = [11].map(callbackfn, objDate); +var testResult = [11].map(callbackfn, objDate); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-16.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-16.js index b7a7384274..f34254d011 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-16.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-16.js @@ -7,12 +7,12 @@ es5id: 15.4.4.19-5-16 description: Array.prototype.map - RegExp object can be used as thisArg ---*/ - var objRegExp = new RegExp(); +var objRegExp = new RegExp(); - function callbackfn(val, idx, obj) { - return this === objRegExp; - } +function callbackfn(val, idx, obj) { + return this === objRegExp; +} - var testResult = [11].map(callbackfn, objRegExp); +var testResult = [11].map(callbackfn, objRegExp); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-17.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-17.js index acc8b9d408..42d67bbeff 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-17.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-17.js @@ -7,10 +7,10 @@ es5id: 15.4.4.19-5-17 description: Array.prototype.map - the JSON object can be used as thisArg ---*/ - function callbackfn(val, idx, obj) { - return this === JSON; - } +function callbackfn(val, idx, obj) { + return this === JSON; +} - var testResult = [11].map(callbackfn, JSON); +var testResult = [11].map(callbackfn, JSON); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-18.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-18.js index 9b65b9c5b9..e3032b4f47 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-18.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-18.js @@ -7,12 +7,12 @@ es5id: 15.4.4.19-5-18 description: Array.prototype.map - Error object can be used as thisArg ---*/ - var objError = new RangeError(); +var objError = new RangeError(); - function callbackfn(val, idx, obj) { - return this === objError; - } +function callbackfn(val, idx, obj) { + return this === objError; +} - var testResult = [11].map(callbackfn, objError); +var testResult = [11].map(callbackfn, objError); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-19.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-19.js index 2da89ea4f2..c2740c110b 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-19.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-19.js @@ -7,16 +7,16 @@ es5id: 15.4.4.19-5-19 description: Array.prototype.map - the Arguments object can be used as thisArg ---*/ - var arg; +var arg; - function callbackfn(val, idx, obj) { - return this === arg; - } +function callbackfn(val, idx, obj) { + return this === arg; +} - arg = (function () { - return arguments; - }(1, 2, 3)); +arg = (function() { + return arguments; +}(1, 2, 3)); - var testResult = [11].map(callbackfn, arg); +var testResult = [11].map(callbackfn, arg); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-2.js index 6bbeebe523..fdb667af1b 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-2.js @@ -7,15 +7,16 @@ es5id: 15.4.4.19-5-2 description: Array.prototype.map - thisArg is Object ---*/ - var res = false; - var o = new Object(); - o.res = true; - function callbackfn(val, idx, obj) - { - return this.res; - } +var res = false; +var o = new Object(); +o.res = true; - var srcArr = [1]; - var resArr = srcArr.map(callbackfn,o); +function callbackfn(val, idx, obj) +{ + return this.res; +} + +var srcArr = [1]; +var resArr = srcArr.map(callbackfn, o); assert.sameValue(resArr[0], true, 'resArr[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-21.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-21.js index f101b1660e..0f105c52ce 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-21.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-21.js @@ -8,10 +8,11 @@ description: Array.prototype.map - the global object can be used as thisArg ---*/ var global = this; - function callbackfn(val, idx, obj) { - return this === global; - } - var testResult = [11].map(callbackfn, this); +function callbackfn(val, idx, obj) { + return this === global; +} + +var testResult = [11].map(callbackfn, this); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-22.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-22.js index 9ef42b64e2..1386aa7493 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-22.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-22.js @@ -7,10 +7,10 @@ es5id: 15.4.4.19-5-22 description: Array.prototype.map - boolean primitive can be used as thisArg ---*/ - function callbackfn(val, idx, obj) { - return this.valueOf() === false; - } +function callbackfn(val, idx, obj) { + return this.valueOf() === false; +} - var testResult = [11].map(callbackfn, false); +var testResult = [11].map(callbackfn, false); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-23.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-23.js index 29f99094ab..8e7ee98356 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-23.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-23.js @@ -7,10 +7,10 @@ es5id: 15.4.4.19-5-23 description: Array.prototype.map - number primitive can be used as thisArg ---*/ - function callbackfn(val, idx, obj) { - return this.valueOf() === 101; - } +function callbackfn(val, idx, obj) { + return this.valueOf() === 101; +} - var testResult = [11].map(callbackfn, 101); +var testResult = [11].map(callbackfn, 101); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-24.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-24.js index 292dca579a..cb29707e65 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-24.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-24.js @@ -7,10 +7,10 @@ es5id: 15.4.4.19-5-24 description: Array.prototype.map - string primitive can be used as thisArg ---*/ - function callbackfn(val, idx, obj) { - return this.valueOf() === "abc"; - } +function callbackfn(val, idx, obj) { + return this.valueOf() === "abc"; +} - var testResult = [11].map(callbackfn, "abc"); +var testResult = [11].map(callbackfn, "abc"); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-3.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-3.js index 08e3e062b4..97dd1e7280 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-3.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-3.js @@ -7,15 +7,16 @@ es5id: 15.4.4.19-5-3 description: Array.prototype.map - thisArg is Array ---*/ - var res = false; - var a = new Array(); - a.res = true; - function callbackfn(val, idx, obj) - { - return this.res; - } +var res = false; +var a = new Array(); +a.res = true; - var srcArr = [1]; - var resArr = srcArr.map(callbackfn,a); +function callbackfn(val, idx, obj) +{ + return this.res; +} + +var srcArr = [1]; +var resArr = srcArr.map(callbackfn, a); assert.sameValue(resArr[0], true, 'resArr[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-4.js index 36c4c36ff3..85ee3deec9 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-4.js @@ -9,17 +9,18 @@ description: > template(prototype) ---*/ - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } +var res = false; - function foo(){} - foo.prototype.res = true; - var f = new foo(); +function callbackfn(val, idx, obj) +{ + return this.res; +} - var srcArr = [1]; - var resArr = srcArr.map(callbackfn,f); +function foo() {} +foo.prototype.res = true; +var f = new foo(); + +var srcArr = [1]; +var resArr = srcArr.map(callbackfn, f); assert.sameValue(resArr[0], true, 'resArr[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-5.js index 2e11685499..9568cc3d49 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-5.js @@ -7,17 +7,18 @@ es5id: 15.4.4.19-5-5 description: Array.prototype.map - thisArg is object from object template ---*/ - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } +var res = false; - function foo(){} - var f = new foo(); - f.res = true; +function callbackfn(val, idx, obj) +{ + return this.res; +} - var srcArr = [1]; - var resArr = srcArr.map(callbackfn,f); +function foo() {} +var f = new foo(); +f.res = true; + +var srcArr = [1]; +var resArr = srcArr.map(callbackfn, f); assert.sameValue(resArr[0], true, 'resArr[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-6.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-6.js index 8950f71db6..20366e19c6 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-6.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-6.js @@ -7,16 +7,17 @@ es5id: 15.4.4.19-5-6 description: Array.prototype.map - thisArg is function ---*/ - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } +var res = false; - function foo(){} - foo.res = true; +function callbackfn(val, idx, obj) +{ + return this.res; +} - var srcArr = [1]; - var resArr = srcArr.map(callbackfn,foo); +function foo() {} +foo.res = true; + +var srcArr = [1]; +var resArr = srcArr.map(callbackfn, foo); assert.sameValue(resArr[0], true, 'resArr[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-7.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-7.js index 7bd84eb591..7f11fa6764 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-7.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-7.js @@ -7,10 +7,10 @@ es5id: 15.4.4.19-5-7 description: Array.prototype.map - built-in functions can be used as thisArg ---*/ - function callbackfn(val, idx, obj) { - return this === eval; - } +function callbackfn(val, idx, obj) { + return this === eval; +} - var testResult = [11].map(callbackfn, eval); +var testResult = [11].map(callbackfn, eval); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-9.js index 247bfb3c39..31f536819c 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-9.js @@ -7,12 +7,12 @@ es5id: 15.4.4.19-5-9 description: Array.prototype.map - Function object can be used as thisArg ---*/ - var objFunction = function () { }; +var objFunction = function() {}; - function callbackfn(val, idx, obj) { - return this === objFunction; - } +function callbackfn(val, idx, obj) { + return this === objFunction; +} - var testResult = [11].map(callbackfn, objFunction); +var testResult = [11].map(callbackfn, objFunction); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-6-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-6-1.js index 2c86c43b8c..b72e54a44a 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-6-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-6-1.js @@ -9,6 +9,6 @@ description: > argument is the ourput array ---*/ - var newArr = [11].map(function () { }); +var newArr = [11].map(function() {}); assert(Array.isArray(newArr), 'Array.isArray(newArr) !== true'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-6-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-6-2.js index 1acfec147f..593496d851 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-6-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-6-2.js @@ -7,6 +7,6 @@ es5id: 15.4.4.19-6-2 description: Array.prototype.map - the returned array is instanceof Array ---*/ - var newArr = [11].map(function () { }); +var newArr = [11].map(function() {}); assert(newArr instanceof Array, 'newArr instanceof Array !== true'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-1.js index eeb0830e84..07255dc87f 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-1.js @@ -9,14 +9,14 @@ description: > after it is called ---*/ - function callbackfn(val, idx, obj) - { - srcArr[2] = 3; - srcArr[5] = 6; - return 1; - } +function callbackfn(val, idx, obj) +{ + srcArr[2] = 3; + srcArr[5] = 6; + return 1; +} - var srcArr = [1,2,,4,5]; - var resArr = srcArr.map(callbackfn); +var srcArr = [1, 2, , 4, 5]; +var resArr = srcArr.map(callbackfn); assert.sameValue(resArr.length, 5, 'resArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-2.js index f1bbd8be5d..17ff67f93e 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-2.js @@ -9,17 +9,17 @@ description: > it is called ---*/ - function callbackfn(val, idx, obj) - { - srcArr[4] = -1; - if(val > 0) - return 1; - else - return 0; - } +function callbackfn(val, idx, obj) +{ + srcArr[4] = -1; + if (val > 0) + return 1; + else + return 0; +} - var srcArr = [1,2,3,4,5]; - var resArr = srcArr.map(callbackfn); +var srcArr = [1, 2, 3, 4, 5]; +var resArr = srcArr.map(callbackfn); assert.sameValue(resArr.length, 5, 'resArr.length'); assert.sameValue(resArr[4], 0, 'resArr[4]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-3.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-3.js index 3b6e5a675e..10ef81567f 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-3.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-3.js @@ -9,18 +9,18 @@ description: > the call ---*/ - function callbackfn(val, idx, obj) - { - delete srcArr[4]; - if(val > 0) - return 1; - else - return 0; +function callbackfn(val, idx, obj) +{ + delete srcArr[4]; + if (val > 0) + return 1; + else + return 0; - } +} - var srcArr = [1,2,3,4,5]; - var resArr = srcArr.map(callbackfn); +var srcArr = [1, 2, 3, 4, 5]; +var resArr = srcArr.map(callbackfn); assert.sameValue(resArr.length, 5, 'resArr.length'); assert.sameValue(resArr[4], undefined, 'resArr[4]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-4.js index 5962cdd901..e488c81494 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-4.js @@ -9,16 +9,17 @@ description: > Array.length is decreased ---*/ - var callCnt = 0; - function callbackfn(val, idx, obj) - { - srcArr.length = 2; - callCnt++; - return 1; - } +var callCnt = 0; - var srcArr = [1,2,3,4,5]; - var resArr = srcArr.map(callbackfn); +function callbackfn(val, idx, obj) +{ + srcArr.length = 2; + callCnt++; + return 1; +} + +var srcArr = [1, 2, 3, 4, 5]; +var resArr = srcArr.map(callbackfn); assert.sameValue(resArr.length, 5, 'resArr.length'); assert.sameValue(callCnt, 2, 'callCnt'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-5.js index 85747416a1..969ef76b08 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-5.js @@ -9,18 +9,19 @@ description: > sparse array ---*/ - var callCnt = 0; - function callbackfn(val, idx, obj) - { - srcArr[1000] = 3; - callCnt++; - return val; - } +var callCnt = 0; - var srcArr = new Array(10); - srcArr[1] = 1; - srcArr[2] = 2; - var resArr = srcArr.map(callbackfn); +function callbackfn(val, idx, obj) +{ + srcArr[1000] = 3; + callCnt++; + return val; +} + +var srcArr = new Array(10); +srcArr[1] = 1; +srcArr[2] = 2; +var resArr = srcArr.map(callbackfn); assert.sameValue(resArr.length, 10, 'resArr.length'); assert.sameValue(callCnt, 2, 'callCnt'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-6.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-6.js index 131558eb44..1a3d4c1755 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-6.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-6.js @@ -9,20 +9,20 @@ description: > when same index is also present in prototype ---*/ - function callbackfn(val, idx, obj) - { - delete srcArr[4]; - if(val > 0) - return 1; - else - return 0; +function callbackfn(val, idx, obj) +{ + delete srcArr[4]; + if (val > 0) + return 1; + else + return 0; - } +} - Array.prototype[4] = 5; - var srcArr = [1,2,3,4,5]; - var resArr = srcArr.map(callbackfn); - delete Array.prototype[4]; +Array.prototype[4] = 5; +var srcArr = [1, 2, 3, 4, 5]; +var resArr = srcArr.map(callbackfn); +delete Array.prototype[4]; assert.sameValue(resArr.length, 5, 'resArr.length'); assert.sameValue(resArr[4], 1, 'resArr[4]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-7.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-7.js index 02da272f15..537e153f5c 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-7.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-7.js @@ -7,18 +7,18 @@ es5id: 15.4.4.19-8-7 description: Array.prototype.map successful to delete the object in callbackfn ---*/ - var obj = {}; - obj.srcArr = [1, 2, 3, 4, 5]; +var obj = {}; +obj.srcArr = [1, 2, 3, 4, 5]; - function callbackfn(val, idx, obj) { - delete obj.srcArr; - if (val > 0) - return 1; - else - return 0; - } +function callbackfn(val, idx, obj) { + delete obj.srcArr; + if (val > 0) + return 1; + else + return 0; +} - var resArr = obj.srcArr.map(callbackfn); +var resArr = obj.srcArr.map(callbackfn); assert.sameValue(resArr.toString(), "1,1,1,1,1", 'resArr.toString()'); assert.sameValue(obj.hasOwnProperty("arr"), false, 'obj.hasOwnProperty("arr")'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-8.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-8.js index 6b3d7146d6..0a9f95ed4b 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-8.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-8.js @@ -9,15 +9,20 @@ description: > on an Array-like object ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +var accessed = false; - var obj = { 0: 11, 1: 12, length: 0 }; +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var testResult = Array.prototype.map.call(obj, callbackfn); +var obj = { + 0: 11, + 1: 12, + length: 0 +}; + +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult.length, 0, 'testResult.length'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-9.js index 397d7a9ff5..5f47a3a63a 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-9.js @@ -9,23 +9,24 @@ description: > of iterations on an Array ---*/ - var called = 0; - function callbackfn(val, idx, obj) { - called += 1; - return val > 10; - } +var called = 0; - var arr = [9, , 12]; +function callbackfn(val, idx, obj) { + called += 1; + return val > 10; +} - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 8; - }, - configurable: true - }); +var arr = [9, , 12]; - var testResult = arr.map(callbackfn); +Object.defineProperty(arr, "1", { + get: function() { + arr.length = 2; + return 8; + }, + configurable: true +}); + +var testResult = arr.map(callbackfn); assert.sameValue(testResult.length, 3, 'testResult.length'); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-1.js index 1c9aa86a7e..ff4a57e8ae 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-1.js @@ -9,16 +9,17 @@ description: > assigned values ---*/ - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - return 1; - } +var callCnt = 0; - var srcArr = new Array(10); - srcArr[1] = undefined; //explicitly assigning a value - var resArr = srcArr.map(callbackfn); +function callbackfn(val, idx, obj) +{ + callCnt++; + return 1; +} + +var srcArr = new Array(10); +srcArr[1] = undefined; //explicitly assigning a value +var resArr = srcArr.map(callbackfn); assert.sameValue(resArr.length, 10, 'resArr.length'); assert.sameValue(callCnt, 1, 'callCnt'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-10.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-10.js index 040c0b852c..18ef426fb6 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-10.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-10.js @@ -9,21 +9,24 @@ description: > prototype index property not to be visited on an Array-like Object ---*/ - function callbackfn(val, idx, obj) { - return idx === 1 && typeof val === "undefined"; - } - var obj = { 2: 2, length: 20 }; +function callbackfn(val, idx, obj) { + return idx === 1 && typeof val === "undefined"; +} +var obj = { + 2: 2, + length: 20 +}; - Object.defineProperty(obj, "0", { - get: function () { - delete Object.prototype[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + delete Object.prototype[1]; + return 0; + }, + configurable: true +}); - Object.prototype[1] = 1; - var testResult = Array.prototype.map.call(obj, callbackfn); +Object.prototype[1] = 1; +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult.length, 20, 'testResult.length'); assert.sameValue(typeof testResult[1], "undefined", 'typeof testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-11.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-11.js index 58fccded06..d194b572bf 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-11.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-11.js @@ -9,21 +9,21 @@ description: > prototype index property not to be visited on an Array ---*/ - function callbackfn(val, idx, obj) { - return idx === 1 && typeof val === "undefined"; - } - var arr = [0, , 2]; +function callbackfn(val, idx, obj) { + return idx === 1 && typeof val === "undefined"; +} +var arr = [0, , 2]; - Object.defineProperty(arr, "0", { - get: function () { - delete Array.prototype[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete Array.prototype[1]; + return 0; + }, + configurable: true +}); - Array.prototype[1] = 1; - var testResult = arr.map(callbackfn); +Array.prototype[1] = 1; +var testResult = arr.map(callbackfn); assert.sameValue(testResult.length, 3, 'testResult.length'); assert.sameValue(typeof testResult[1], "undefined", 'typeof testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-12.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-12.js index 0f5e4fc68d..8d6fd84c8c 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-12.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-12.js @@ -10,24 +10,29 @@ description: > Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 3) { - return false; - } else { - return true; - } - } - var obj = { 0: 0, 1: 1, 2: 2, length: 10 }; +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 3) { + return false; + } else { + return true; + } +} +var obj = { + 0: 0, + 1: 1, + 2: 2, + length: 10 +}; - Object.defineProperty(obj, "0", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + delete obj[1]; + return 0; + }, + configurable: true +}); - Object.prototype[1] = 3; - var testResult = Array.prototype.map.call(obj, callbackfn); +Object.prototype[1] = 3; +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult[1], false, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-13.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-13.js index f510e09e24..7cea73c735 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-13.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-13.js @@ -9,24 +9,24 @@ description: > property causes prototype index property to be visited on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 3) { - return false; - } else { - return true; - } - } - var arr = [0, 1, 2]; +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 3) { + return false; + } else { + return true; + } +} +var arr = [0, 1, 2]; - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); - Array.prototype[1] = 3; - var testResult = arr.map(callbackfn); +Array.prototype[1] = 3; +var testResult = arr.map(callbackfn); assert.sameValue(testResult[1], false, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-14.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-14.js index ddef903df1..45131bd9a5 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-14.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-14.js @@ -9,20 +9,20 @@ description: > property not to be visited ---*/ - function callbackfn(val, idx, obj) { - return idx === 3 && typeof val === "undefined"; - } +function callbackfn(val, idx, obj) { + return idx === 3 && typeof val === "undefined"; +} - var arr = [0, 1, 2, "last"]; +var arr = [0, 1, 2, "last"]; - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 3; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + arr.length = 3; + return 0; + }, + configurable: true +}); - var testResult = arr.map(callbackfn); +var testResult = arr.map(callbackfn); assert.sameValue(typeof testResult[3], "undefined", 'typeof testResult[3]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-15.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-15.js index 1ed9f5ad34..2cf1762a52 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-15.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-15.js @@ -9,31 +9,31 @@ description: > property causes prototype index property to be visited ---*/ - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "prototype") { - return false; - } else { - return true; - } - } - var arr = [0, 1, 2]; +function callbackfn(val, idx, obj) { + if (idx === 2 && val === "prototype") { + return false; + } else { + return true; + } +} +var arr = [0, 1, 2]; - Object.defineProperty(Array.prototype, "2", { - get: function () { - return "prototype"; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "2", { + get: function() { + return "prototype"; + }, + configurable: true +}); - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + arr.length = 2; + return 1; + }, + configurable: true +}); - var testResult = arr.map(callbackfn); +var testResult = arr.map(callbackfn); assert.sameValue(testResult.length, 3, 'testResult.length'); assert.sameValue(testResult[2], false, 'testResult[2]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-16.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-16.js index b12e1aab05..5e5290fdda 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-16.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-16.js @@ -10,32 +10,32 @@ description: > flags: [noStrict] ---*/ - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "unconfigurable") { - return false; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 2 && val === "unconfigurable") { + return false; + } else { + return true; + } +} - var arr = [0, 1, 2]; +var arr = [0, 1, 2]; - Object.defineProperty(arr, "2", { - get: function () { - return "unconfigurable"; - }, - configurable: false - }); +Object.defineProperty(arr, "2", { + get: function() { + return "unconfigurable"; + }, + configurable: false +}); - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + arr.length = 2; + return 1; + }, + configurable: true +}); - var testResult = arr.map(callbackfn); +var testResult = arr.map(callbackfn); assert.sameValue(testResult.length, 3, 'testResult.length'); assert.sameValue(testResult[2], false, 'testResult[2]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-2.js index bc70185364..74108f0927 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-2.js @@ -7,24 +7,24 @@ es5id: 15.4.4.19-8-b-2 description: Array.prototype.map - added properties in step 2 are visible here ---*/ - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "length") { - return false; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 2 && val === "length") { + return false; + } else { + return true; + } +} - var obj = {}; +var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - obj[2] = "length"; - return 3; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + obj[2] = "length"; + return 3; + }, + configurable: true +}); - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult[2], false, 'testResult[2]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-3.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-3.js index 1377383e15..957b9048a1 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-3.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-3.js @@ -7,23 +7,26 @@ es5id: 15.4.4.19-8-b-3 description: Array.prototype.map - deleted properties in step 2 are visible here ---*/ - function callbackfn(val, idx, obj) { - if (idx === 2) { - return false; - } else { - return true; - } - } - var obj = { 2: 6.99, 8: 19 }; +function callbackfn(val, idx, obj) { + if (idx === 2) { + return false; + } else { + return true; + } +} +var obj = { + 2: 6.99, + 8: 19 +}; - Object.defineProperty(obj, "length", { - get: function () { - delete obj[2]; - return 10; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + delete obj[2]; + return 10; + }, + configurable: true +}); - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(typeof testResult[2], "undefined", 'typeof testResult[2]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-4.js index 8e166666d5..bf1e739fbb 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-4.js @@ -9,30 +9,32 @@ description: > current position are visited on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - return false; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + return false; + } else { + return true; + } +} - var obj = { length: 2 }; +var obj = { + length: 2 +}; - Object.defineProperty(obj, "0", { - get: function () { - Object.defineProperty(obj, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + Object.defineProperty(obj, "1", { + get: function() { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); assert.sameValue(testResult[1], false, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-5.js index a380501440..c0ca4d2591 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-5.js @@ -9,30 +9,30 @@ description: > current position are visited on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - return false; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + return false; + } else { + return true; + } +} - var arr = [0, , 2]; +var arr = [0, , 2]; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(arr, "1", { + get: function() { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); - var testResult = arr.map(callbackfn); +var testResult = arr.map(callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); assert.sameValue(testResult[1], false, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-6.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-6.js index 2f12f0c1e1..6f983455ee 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-6.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-6.js @@ -9,29 +9,31 @@ description: > current position are visited on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 6.99) { - return false; - } else { - return true; - } - } - var obj = { length: 2 }; +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 6.99) { + return false; + } else { + return true; + } +} +var obj = { + length: 2 +}; - Object.defineProperty(obj, "0", { - get: function () { - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + Object.defineProperty(Object.prototype, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); assert.sameValue(testResult[1], false, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-7.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-7.js index fe1b0998cb..5e40ddb273 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-7.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-7.js @@ -9,29 +9,29 @@ description: > current position are visited on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 6.99) { - return false; - } else { - return true; - } - } - var arr = [0, , 2]; +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 6.99) { + return false; + } else { + return true; + } +} +var arr = [0, , 2]; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(Array.prototype, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); - var testResult = arr.map(callbackfn); +var testResult = arr.map(callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); assert.sameValue(testResult[1], false, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-8.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-8.js index 1dd61b31e2..58f3ac9c18 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-8.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-8.js @@ -9,31 +9,33 @@ description: > not to be visited on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1) { - return false; - } else { - return true; - } - } - var obj = { length: 2 }; +function callbackfn(val, idx, obj) { + if (idx === 1) { + return false; + } else { + return true; + } +} +var obj = { + length: 2 +}; - Object.defineProperty(obj, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + return 6.99; + }, + configurable: true +}); - Object.defineProperty(obj, "0", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + delete obj[1]; + return 0; + }, + configurable: true +}); - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); assert.sameValue(typeof testResult[1], "undefined", 'typeof testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-9.js index 1d0cc76407..a1dd861f20 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-9.js @@ -9,31 +9,31 @@ description: > not to be visited on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1) { - return false; - } else { - return true; - } - } - var arr = [1, 2]; +function callbackfn(val, idx, obj) { + if (idx === 1) { + return false; + } else { + return true; + } +} +var arr = [1, 2]; - Object.defineProperty(arr, "1", { - get: function () { - return "6.99"; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + return "6.99"; + }, + configurable: true +}); - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); - var testResult = arr.map(callbackfn); +var testResult = arr.map(callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); assert.sameValue(typeof testResult[1], "undefined", 'typeof testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-1.js index 8543d0ead6..16b3fe3261 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-1.js @@ -9,17 +9,20 @@ description: > on an Array-like object ---*/ - var kValue = {}; +var kValue = {}; - function callbackfn(val, idx, obj) { - if (idx === 5) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 5) { + return val === kValue; + } + return false; +} - var obj = { 5: kValue, length: 100 }; +var obj = { + 5: kValue, + length: 100 +}; - var newArr = Array.prototype.map.call(obj, callbackfn); +var newArr = Array.prototype.map.call(obj, callbackfn); assert.sameValue(newArr[5], true, 'newArr[5]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-10.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-10.js index ccf8d3fbd2..f9809a1a58 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-10.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-10.js @@ -9,24 +9,24 @@ description: > property on an Array ---*/ - var kValue = "abc"; +var kValue = "abc"; - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; +} - var arr = []; +var arr = []; - Object.defineProperty(arr, "0", { - get: function () { - return kValue; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + return kValue; + }, + configurable: true +}); - var testResult = arr.map(callbackfn); +var testResult = arr.map(callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-11.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-11.js index 5e8f0eba5a..db7bfa03d3 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-11.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-11.js @@ -10,29 +10,32 @@ description: > Array-like object ---*/ - var kValue = "abc"; +var kValue = "abc"; - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; +} - var proto = { 0: 5, length: 2 }; +var proto = { + 0: 5, + length: 2 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); +var child = new Con(); - Object.defineProperty(child, "0", { - get: function () { - return kValue; - }, - configurable: true - }); +Object.defineProperty(child, "0", { + get: function() { + return kValue; + }, + configurable: true +}); - var testResult = Array.prototype.map.call(child, callbackfn); +var testResult = Array.prototype.map.call(child, callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-12.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-12.js index b233477370..9f61f72be7 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-12.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-12.js @@ -9,26 +9,26 @@ description: > property that overrides an inherited data property on an Array ---*/ - var kValue = "abc"; +var kValue = "abc"; - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; +} - var arr = []; +var arr = []; - Array.prototype[0] = 11; +Array.prototype[0] = 11; - Object.defineProperty(arr, "0", { - get: function () { - return kValue; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + return kValue; + }, + configurable: true +}); - var testResult = arr.map(callbackfn); +var testResult = arr.map(callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-13.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-13.js index 47c8e86c5d..3ca3d54de9 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-13.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-13.js @@ -10,36 +10,38 @@ description: > Array-like object ---*/ - var kValue = "abc"; +var kValue = "abc"; - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; +} - var proto = { length: 2 }; +var proto = { + length: 2 +}; - Object.defineProperty(proto, "0", { - get: function () { - return 5; - }, - configurable: true - }); +Object.defineProperty(proto, "0", { + get: function() { + return 5; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); +var child = new Con(); - Object.defineProperty(child, "0", { - get: function () { - return kValue; - }, - configurable: true - }); +Object.defineProperty(child, "0", { + get: function() { + return kValue; + }, + configurable: true +}); - var testResult = Array.prototype.map.call(child, callbackfn); +var testResult = Array.prototype.map.call(child, callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-14.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-14.js index 57580015db..148bf9dbcb 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-14.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-14.js @@ -9,31 +9,31 @@ description: > property that overrides an inherited accessor property on an Array ---*/ - var kValue = "abc"; +var kValue = "abc"; - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; +} - var arr = []; +var arr = []; - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 11; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return 11; + }, + configurable: true +}); - Object.defineProperty(arr, "0", { - get: function () { - return kValue; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + return kValue; + }, + configurable: true +}); - var testResult = arr.map(callbackfn); +var testResult = arr.map(callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-15.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-15.js index ada617c65b..590dbe8bd0 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-15.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-15.js @@ -9,29 +9,31 @@ description: > accessor property on an Array-like object ---*/ - var kValue = "abc"; +var kValue = "abc"; - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; +} - var proto = { length: 2 }; +var proto = { + length: 2 +}; - Object.defineProperty(proto, "0", { - get: function () { - return kValue; - }, - configurable: true - }); +Object.defineProperty(proto, "0", { + get: function() { + return kValue; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); +var child = new Con(); - var testResult = Array.prototype.map.call(child, callbackfn); +var testResult = Array.prototype.map.call(child, callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-16.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-16.js index 78714aeabb..8be14c2d29 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-16.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-16.js @@ -9,22 +9,22 @@ description: > accessor property on an Array ---*/ - var kValue = "abc"; +var kValue = "abc"; - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; +} - Object.defineProperty(Array.prototype, "0", { - get: function () { - return kValue; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return kValue; + }, + configurable: true +}); - var testResult = [, ].map(callbackfn); +var testResult = [, ].map(callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-17.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-17.js index 2e3f9f9872..9c0a96b09a 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-17.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-17.js @@ -9,20 +9,22 @@ description: > property without a get function on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1) { - return typeof val === "undefined"; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + return typeof val === "undefined"; + } + return false; +} - var obj = { length: 2 }; +var obj = { + length: 2 +}; - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); +Object.defineProperty(obj, "1", { + set: function() {}, + configurable: true +}); - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-18.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-18.js index fda5968c70..142b2878da 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-18.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-18.js @@ -9,20 +9,20 @@ description: > property without a get function on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1) { - return typeof val === "undefined"; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + return typeof val === "undefined"; + } + return false; +} - var arr = []; +var arr = []; - Object.defineProperty(arr, "1", { - set: function () { }, - configurable: true - }); +Object.defineProperty(arr, "1", { + set: function() {}, + configurable: true +}); - var testResult = arr.map(callbackfn); +var testResult = arr.map(callbackfn); assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-19.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-19.js index 7589e4c132..f20dbc0985 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-19.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-19.js @@ -10,27 +10,27 @@ description: > accessor property on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return typeof val === "undefined"; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return typeof val === "undefined"; + } + return false; +} - var arr = []; +var arr = []; - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(arr, "0", { + set: function() {}, + configurable: true +}); - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 100; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return 100; + }, + configurable: true +}); - var testResult = arr.map(callbackfn); +var testResult = arr.map(callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-2.js index e9fb0f5588..b3c0686e22 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-2.js @@ -9,17 +9,17 @@ description: > on an Array ---*/ - var kValue = {}; +var kValue = {}; - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; +} - var arr = [kValue]; +var arr = [kValue]; - var newArr = arr.map(callbackfn); +var newArr = arr.map(callbackfn); assert.sameValue(newArr[0], true, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-20.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-20.js index d73b92a01e..79faa22950 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-20.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-20.js @@ -10,33 +10,33 @@ description: > accessor property on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return typeof val === "undefined"; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return typeof val === "undefined"; + } + return false; +} - var proto = {}; +var proto = {}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 2; +var child = new Con(); +child.length = 2; - Object.defineProperty(child, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(child, "0", { + set: function() {}, + configurable: true +}); - Object.defineProperty(proto, "0", { - get: function () { - return 100; - }, - configurable: true - }); +Object.defineProperty(proto, "0", { + get: function() { + return 100; + }, + configurable: true +}); - var testResult = Array.prototype.map.call(child, callbackfn); +var testResult = Array.prototype.map.call(child, callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-21.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-21.js index 09387d3289..d7e36fc415 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-21.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-21.js @@ -9,24 +9,26 @@ description: > accessor property without a get function on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return typeof val === "undefined"; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return typeof val === "undefined"; + } + return false; +} - var proto = { length: 2 }; - Object.defineProperty(proto, "0", { - set: function () { }, - configurable: true - }); +var proto = { + length: 2 +}; +Object.defineProperty(proto, "0", { + set: function() {}, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); +var child = new Con(); - var testResult = Array.prototype.map.call(child, callbackfn); +var testResult = Array.prototype.map.call(child, callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-22.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-22.js index c45f502b2d..1a4ba76c0e 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-22.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-22.js @@ -9,18 +9,18 @@ description: > accessor property without a get function on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return typeof val === "undefined"; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return typeof val === "undefined"; + } + return false; +} - Object.defineProperty(Array.prototype, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + set: function() {}, + configurable: true +}); - var testResult = [,].map(callbackfn); +var testResult = [, ].map(callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-25.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-25.js index 41cff6af1b..74fd1615f9 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-25.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-25.js @@ -10,18 +10,18 @@ description: > less than number of parameters) ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 9; - } else { - return false; - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 9; + } else { + return false; + } +} - var func = function (a, b) { - return Array.prototype.map.call(arguments, callbackfn); - }; +var func = function(a, b) { + return Array.prototype.map.call(arguments, callbackfn); +}; - var testResult = func(9); +var testResult = func(9); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-26.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-26.js index bf4e46b1de..66bb232339 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-26.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-26.js @@ -10,21 +10,21 @@ description: > number of parameters) ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 9; - } else if (idx === 1) { - return val === 11; - } else { - return false; - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 9; + } else if (idx === 1) { + return val === 11; + } else { + return false; + } +} - var func = function (a, b) { - return Array.prototype.map.call(arguments, callbackfn); - }; +var func = function(a, b) { + return Array.prototype.map.call(arguments, callbackfn); +}; - var testResult = func(9, 11); +var testResult = func(9, 11); assert.sameValue(testResult[0], true, 'testResult[0]'); assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-27.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-27.js index 3140c2b3bc..c47bd08c3d 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-27.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-27.js @@ -10,24 +10,24 @@ description: > greater than number of parameters) ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 9; - } else if (idx === 1) { - return val === 11; - } else if (idx === 2) { - return val === 12; - } else { - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 9; + } else if (idx === 1) { + return val === 11; + } else if (idx === 2) { + return val === 12; + } else { + return false; + } - } +} - var func = function (a, b) { - return Array.prototype.map.call(arguments, callbackfn); - }; +var func = function(a, b) { + return Array.prototype.map.call(arguments, callbackfn); +}; - var testResult = func(9, 11, 12); +var testResult = func(9, 11, 12); assert.sameValue(testResult[0], true, 'testResult[0]'); assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-28.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-28.js index ba96bfa5b9..142bcdd8d0 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-28.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-28.js @@ -9,39 +9,39 @@ description: > iterations is observed on an Array ---*/ - var preIterVisible = false; - var arr = []; +var preIterVisible = false; +var arr = []; - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 11; - } else if (idx === 1) { - return val === 9; - } else { - return false; - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 11; + } else if (idx === 1) { + return val === 9; + } else { + return false; + } +} - Object.defineProperty(arr, "0", { - get: function () { - preIterVisible = true; - return 11; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + preIterVisible = true; + return 11; + }, + configurable: true +}); - Object.defineProperty(arr, "1", { - get: function () { - if (preIterVisible) { - return 9; - } else { - return 11; - } - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + if (preIterVisible) { + return 9; + } else { + return 11; + } + }, + configurable: true +}); - var testResult = arr.map(callbackfn); +var testResult = arr.map(callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-29.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-29.js index 4e034ba2cc..9d97893b81 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-29.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-29.js @@ -9,39 +9,41 @@ description: > iterations is observed on an Array-like object ---*/ - var preIterVisible = false; - var obj = { length: 2 }; +var preIterVisible = false; +var obj = { + length: 2 +}; - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 11; - } else if (idx === 1) { - return val === 9; - } else { - return false; - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 11; + } else if (idx === 1) { + return val === 9; + } else { + return false; + } +} - Object.defineProperty(obj, "0", { - get: function () { - preIterVisible = true; - return 11; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + preIterVisible = true; + return 11; + }, + configurable: true +}); - Object.defineProperty(obj, "1", { - get: function () { - if (preIterVisible) { - return 9; - } else { - return 11; - } - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + if (preIterVisible) { + return 9; + } else { + return 11; + } + }, + configurable: true +}); - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-3.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-3.js index f3d9e7dd90..dac643e4e5 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-3.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-3.js @@ -9,23 +9,26 @@ description: > that overrides an inherited data property on an Array-like object ---*/ - var kValue = "abc"; +var kValue = "abc"; - function callbackfn(val, idx, obj) { - if (idx === 5) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 5) { + return val === kValue; + } + return false; +} - var proto = { 5: 12, length: 10 }; +var proto = { + 5: 12, + length: 10 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[5] = kValue; +var child = new Con(); +child[5] = kValue; - var testResult = Array.prototype.map.call(child, callbackfn); +var testResult = Array.prototype.map.call(child, callbackfn); assert.sameValue(testResult[5], true, 'testResult[5]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-30.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-30.js index d9cec7c6b8..cae9865e2e 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-30.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-30.js @@ -9,30 +9,35 @@ description: > terminate iteration on an Array-like object ---*/ - var obj = { 0: 11, 5: 10, 10: 8, length: 20 }; - var accessed = false; +var obj = { + 0: 11, + 5: 10, + 10: 8, + length: 20 +}; +var accessed = false; - function callbackfn(val, idx, obj) { - if (idx > 1) { - accessed = true; - } - } +function callbackfn(val, idx, obj) { + if (idx > 1) { + accessed = true; + } +} - Object.defineProperty(obj, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true +}); - Object.defineProperty(obj, "2", { - get: function () { - accessed = true; - return 100; - }, - configurable: true - }); +Object.defineProperty(obj, "2", { + get: function() { + accessed = true; + return 100; + }, + configurable: true +}); assert.throws(RangeError, function() { - Array.prototype.map.call(obj, callbackfn); + Array.prototype.map.call(obj, callbackfn); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-31.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-31.js index 6923f6d8f7..094568212e 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-31.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-31.js @@ -9,33 +9,33 @@ description: > terminate iteration on an Array ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - if (idx > 1) { - accessed = true; - } - } +function callbackfn(val, idx, obj) { + if (idx > 1) { + accessed = true; + } +} - var arr = []; - arr[5] = 10; - arr[10] = 100; +var arr = []; +arr[5] = 10; +arr[10] = 100; - Object.defineProperty(arr, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true +}); - Object.defineProperty(arr, "2", { - get: function () { - accessed = true; - return 100; - }, - configurable: true - }); +Object.defineProperty(arr, "2", { + get: function() { + accessed = true; + return 100; + }, + configurable: true +}); assert.throws(RangeError, function() { - arr.map(callbackfn); + arr.map(callbackfn); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-4.js index 192dd3f4d5..cf77e37961 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-4.js @@ -9,17 +9,17 @@ description: > that overrides an inherited data property on an Array ---*/ - var kValue = "abc"; +var kValue = "abc"; - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; +} - Array.prototype[0] = 11; +Array.prototype[0] = 11; - var testResult = [kValue].map(callbackfn); +var testResult = [kValue].map(callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-5.js index 70b85169b0..cf2c63c9b8 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-5.js @@ -10,34 +10,34 @@ description: > object ---*/ - var kValue = "abc"; +var kValue = "abc"; - function callbackfn(val, idx, obj) { - if (idx === 5) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 5) { + return val === kValue; + } + return false; +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "5", { - get: function () { - return 11; - }, - configurable: true - }); +Object.defineProperty(proto, "5", { + get: function() { + return 11; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 10; - Object.defineProperty(child, "5", { - value: kValue, - configurable: true - }); +var child = new Con(); +child.length = 10; +Object.defineProperty(child, "5", { + value: kValue, + configurable: true +}); - var testResult = Array.prototype.map.call(child, callbackfn); +var testResult = Array.prototype.map.call(child, callbackfn); assert.sameValue(testResult[5], true, 'testResult[5]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-6.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-6.js index c7970fc48f..4c9ae77760 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-6.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-6.js @@ -9,22 +9,22 @@ description: > that overrides an inherited accessor property on an Array ---*/ - var kValue = "abc"; +var kValue = "abc"; - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; +} - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 9; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return 9; + }, + configurable: true +}); - var testResult = [kValue].map(callbackfn); +var testResult = [kValue].map(callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-7.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-7.js index 9a2b37c7b4..908e1e6b1c 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-7.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-7.js @@ -9,22 +9,25 @@ description: > property on an Array-like object ---*/ - var kValue = "abc"; +var kValue = "abc"; - function callbackfn(val, idx, obj) { - if (idx === 5) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 5) { + return val === kValue; + } + return false; +} - var proto = { 5: kValue, length: 10 }; +var proto = { + 5: kValue, + length: 10 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); +var child = new Con(); - var newArr = Array.prototype.map.call(child, callbackfn); +var newArr = Array.prototype.map.call(child, callbackfn); assert.sameValue(newArr[5], true, 'newArr[5]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-8.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-8.js index 45597f7ea2..03d312b30e 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-8.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-8.js @@ -9,15 +9,15 @@ description: > property on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val === 13; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + return val === 13; + } + return false; +} - Array.prototype[1] = 13; +Array.prototype[1] = 13; - var newArr = [, , , ].map(callbackfn); +var newArr = [, , , ].map(callbackfn); assert.sameValue(newArr[1], true, 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-9.js index ac0a9750c3..2d58d345f7 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-9.js @@ -9,24 +9,26 @@ description: > property on an Array-like object ---*/ - var kValue = "abc"; +var kValue = "abc"; - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; +} - var obj = { length: 2 }; +var obj = { + length: 2 +}; - Object.defineProperty(obj, "0", { - get: function () { - return kValue; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + return kValue; + }, + configurable: true +}); - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-1.js index d5ad9c8f93..94a0fad1d3 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-1.js @@ -7,18 +7,19 @@ es5id: 15.4.4.19-8-c-ii-1 description: Array.prototype.map - callbackfn called with correct parameters ---*/ - var bPar = true; - var bCalled = false; - function callbackfn(val, idx, obj) - { - bCalled = true; - if(obj[idx] !== val) - bPar = false; - } +var bPar = true; +var bCalled = false; - var srcArr = [0,1,true,null,new Object(),"five"]; - srcArr[999999] = -6.6; - var resArr = srcArr.map(callbackfn); +function callbackfn(val, idx, obj) +{ + bCalled = true; + if (obj[idx] !== val) + bPar = false; +} + +var srcArr = [0, 1, true, null, new Object(), "five"]; +srcArr[999999] = -6.6; +var resArr = srcArr.map(callbackfn); assert.sameValue(bCalled, true, 'bCalled'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-10.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-10.js index 2602ab100d..546a841428 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-10.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-10.js @@ -7,10 +7,10 @@ es5id: 15.4.4.19-8-c-ii-10 description: Array.prototype.map - callbackfn is called with 1 formal parameter ---*/ - function callbackfn(val) { - return val > 10; - } +function callbackfn(val) { + return val > 10; +} - var testResult = [11].map(callbackfn); +var testResult = [11].map(callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-11.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-11.js index 4bfbc76db2..503c65ad35 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-11.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-11.js @@ -7,10 +7,10 @@ es5id: 15.4.4.19-8-c-ii-11 description: Array.prototype.map - callbackfn is called with 2 formal parameters ---*/ - function callbackfn(val, idx) { - return (val > 10 && arguments[2][idx] === val); - } +function callbackfn(val, idx) { + return (val > 10 && arguments[2][idx] === val); +} - var testResult = [11].map(callbackfn); +var testResult = [11].map(callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-12.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-12.js index 8919089d12..d97ab07072 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-12.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-12.js @@ -7,10 +7,10 @@ es5id: 15.4.4.19-8-c-ii-12 description: Array.prototype.map - callbackfn is called with 3 formal parameters ---*/ - function callbackfn(val, idx, obj) { - return (val > 10 && obj[idx] === val); - } +function callbackfn(val, idx, obj) { + return (val > 10 && obj[idx] === val); +} - var testResult = [11].map(callbackfn); +var testResult = [11].map(callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-13.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-13.js index 35523402a3..cf89b22597 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-13.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-13.js @@ -9,10 +9,10 @@ description: > parameter value ---*/ - function callbackfn() { - return arguments[2][arguments[1]] === arguments[0]; - } +function callbackfn() { + return arguments[2][arguments[1]] === arguments[0]; +} - var testResult = [11].map(callbackfn); +var testResult = [11].map(callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-16.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-16.js index be5f0d3c73..bc4d4dce5d 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-16.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-16.js @@ -9,12 +9,15 @@ description: > a boolean primitive) ---*/ - function callbackfn(val, idx, obj) { - return this.valueOf() === false; - } +function callbackfn(val, idx, obj) { + return this.valueOf() === false; +} - var obj = { 0: 11, length: 2 }; +var obj = { + 0: 11, + length: 2 +}; - var testResult = Array.prototype.map.call(obj, callbackfn, false); +var testResult = Array.prototype.map.call(obj, callbackfn, false); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-17.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-17.js index dd16accb11..e095ed03e5 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-17.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-17.js @@ -9,12 +9,15 @@ description: > a number) ---*/ - function callbackfn(val, idx, obj) { - return this.valueOf() === 5; - } +function callbackfn(val, idx, obj) { + return this.valueOf() === 5; +} - var obj = { 0: 11, length: 2 }; +var obj = { + 0: 11, + length: 2 +}; - var testResult = Array.prototype.map.call(obj, callbackfn, 5); +var testResult = Array.prototype.map.call(obj, callbackfn, 5); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-18.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-18.js index 2fbb0a5b1e..90501719bb 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-18.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-18.js @@ -9,12 +9,15 @@ description: > a string primitive) ---*/ - function callbackfn(val, idx, obj) { - return this.valueOf() === "hello!"; - } +function callbackfn(val, idx, obj) { + return this.valueOf() === "hello!"; +} - var obj = { 0: 11, length: 2 }; +var obj = { + 0: 11, + length: 2 +}; - var testResult = Array.prototype.map.call(obj, callbackfn, "hello!"); +var testResult = Array.prototype.map.call(obj, callbackfn, "hello!"); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-19.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-19.js index 58f038dbcd..a638a31262 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-19.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-19.js @@ -7,20 +7,24 @@ es5id: 15.4.4.19-8-c-ii-19 description: Array.prototype.map - non-indexed properties are not called. ---*/ - var called = 0; - var result = false; +var called = 0; +var result = false; - function callbackfn(val, idx, obj) { - called++; - if (val === 11) { - result = true; - } - return true; - } +function callbackfn(val, idx, obj) { + called++; + if (val === 11) { + result = true; + } + return true; +} - var obj = { 0: 9, non_index_property: 11, length: 20 }; +var obj = { + 0: 9, + non_index_property: 11, + length: 20 +}; - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(result, false, 'result'); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-2.js index b405b41c5e..34a8c1a411 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-2.js @@ -7,17 +7,18 @@ es5id: 15.4.4.19-8-c-ii-2 description: Array.prototype.map - callbackfn takes 3 arguments ---*/ - var parCnt = 3; - var bCalled = false - function callbackfn(val, idx, obj) - { - bCalled = true; - if(arguments.length !== 3) - parCnt = arguments.length; //verify if callbackfn was called with 3 parameters - } +var parCnt = 3; +var bCalled = false - var srcArr = [0,1,2,3,4,5,6,7,8,9]; - var resArr = srcArr.map(callbackfn); +function callbackfn(val, idx, obj) +{ + bCalled = true; + if (arguments.length !== 3) + parCnt = arguments.length; //verify if callbackfn was called with 3 parameters +} + +var srcArr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; +var resArr = srcArr.map(callbackfn); assert.sameValue(bCalled, true, 'bCalled'); assert.sameValue(parCnt, 3, 'parCnt'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-20.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-20.js index ddb5857626..96f50c481c 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-20.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-20.js @@ -9,14 +9,20 @@ description: > (thisArg is correct) ---*/ - function callbackfn(val, idx, obj) { - return this.threshold === 10; - } +function callbackfn(val, idx, obj) { + return this.threshold === 10; +} - var thisArg = { threshold: 10 }; +var thisArg = { + threshold: 10 +}; - var obj = { 0: 11, 1: 9, length: 2 }; +var obj = { + 0: 11, + 1: 9, + length: 2 +}; - var testResult = Array.prototype.map.call(obj, callbackfn, thisArg); +var testResult = Array.prototype.map.call(obj, callbackfn, thisArg); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-21.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-21.js index b4f908ac83..50cd9a2cdd 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-21.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-21.js @@ -9,21 +9,25 @@ description: > (kValue is correct) ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 11; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 11; + } - if (idx === 1) { - return val === 12; - } + if (idx === 1) { + return val === 12; + } - return false; - } + return false; +} - var obj = { 0: 11, 1: 12, length: 2 }; +var obj = { + 0: 11, + 1: 12, + length: 2 +}; - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-22.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-22.js index 7da27f9ee1..a5a30861ad 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-22.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-22.js @@ -9,21 +9,25 @@ description: > (the index k is correct) ---*/ - function callbackfn(val, idx, obj) { - if (val === 11) { - return idx === 0; - } +function callbackfn(val, idx, obj) { + if (val === 11) { + return idx === 0; + } - if (val === 12) { - return idx === 1; - } + if (val === 12) { + return idx === 1; + } - return false; - } + return false; +} - var obj = { 0: 11, 1: 12, length: 2 }; +var obj = { + 0: 11, + 1: 12, + length: 2 +}; - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-23.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-23.js index 78575602e7..fd14317056 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-23.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-23.js @@ -9,12 +9,15 @@ description: > (this object O is correct) ---*/ - var obj = { 0: 11, length: 2 }; +var obj = { + 0: 11, + length: 2 +}; - function callbackfn(val, idx, o) { - return obj === o; - } +function callbackfn(val, idx, o) { + return obj === o; +} - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-4.js index b47ecdde1b..5fe857f933 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-4.js @@ -7,20 +7,21 @@ es5id: 15.4.4.19-8-c-ii-4 description: Array.prototype.map - k values are passed in acending numeric order ---*/ - var arr = [0, 1, 2, 3, 4, 5]; - var lastIdx = 0; - var called = 0; - var result = true; - function callbackfn(val, idx, o) { - called++; - if (lastIdx !== idx) { - result = false; - } else { - lastIdx++; - } - } +var arr = [0, 1, 2, 3, 4, 5]; +var lastIdx = 0; +var called = 0; +var result = true; - arr.map(callbackfn); +function callbackfn(val, idx, o) { + called++; + if (lastIdx !== idx) { + result = false; + } else { + lastIdx++; + } +} + +arr.map(callbackfn); assert(result, 'result !== true'); assert.sameValue(arr.length, called, 'arr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-5.js index fa7136b471..d0d8859c67 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-5.js @@ -9,24 +9,24 @@ description: > and not prior to starting the loop. ---*/ - var kIndex = []; +var kIndex = []; - //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. - function callbackfn(val, idx, obj) { - //Each position should be visited one time, which means k is accessed one time during iterations. - if (typeof kIndex[idx] === "undefined") { - //when current position is visited, its previous index should has been visited. - if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") { - return true; - } - kIndex[idx] = 1; - return false; - } else { - return true; - } - } +//By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. +function callbackfn(val, idx, obj) { + //Each position should be visited one time, which means k is accessed one time during iterations. + if (typeof kIndex[idx] === "undefined") { + //when current position is visited, its previous index should has been visited. + if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") { + return true; + } + kIndex[idx] = 1; + return false; + } else { + return true; + } +} - var testResult = [11, 12, 13, 14].map(callbackfn); +var testResult = [11, 12, 13, 14].map(callbackfn); assert.sameValue(testResult.length, 4, 'testResult.length'); assert.sameValue(testResult[0], false, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-6.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-6.js index 880856724b..7ac9796c3e 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-6.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-6.js @@ -7,16 +7,19 @@ es5id: 15.4.4.19-8-c-ii-6 description: Array.prototype.map - arguments to callbackfn are self consistent. ---*/ - var obj = { 0: 11, length: 1 }; - var thisArg = {}; +var obj = { + 0: 11, + length: 1 +}; +var thisArg = {}; - function callbackfn() { - return this === thisArg && - arguments[0] === 11 && - arguments[1] === 0 && - arguments[2] === obj; - } +function callbackfn() { + return this === thisArg && + arguments[0] === 11 && + arguments[1] === 0 && + arguments[2] === obj; +} - var testResult = Array.prototype.map.call(obj, callbackfn, thisArg); +var testResult = Array.prototype.map.call(obj, callbackfn, thisArg); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-7.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-7.js index 346adb6c95..0ae5970fef 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-7.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-7.js @@ -9,19 +9,24 @@ description: > terminate iteration ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - if (idx > 0) { - accessed = true; - } - if (idx === 0) { - throw new Error("Exception occurred in callbackfn"); - } - } +function callbackfn(val, idx, obj) { + if (idx > 0) { + accessed = true; + } + if (idx === 0) { + throw new Error("Exception occurred in callbackfn"); + } +} - var obj = { 0: 11, 4: 10, 10: 8, length: 20 }; +var obj = { + 0: 11, + 4: 10, + 10: 8, + length: 20 +}; assert.throws(Error, function() { - Array.prototype.map.call(obj, callbackfn); + Array.prototype.map.call(obj, callbackfn); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-8.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-8.js index 467f3589af..e4e4d231da 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-8.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-8.js @@ -9,15 +9,19 @@ description: > iterations is observed ---*/ - var obj = { 0: 9, 1: 12, length: 2 }; +var obj = { + 0: 9, + 1: 12, + length: 2 +}; - function callbackfn(val, idx, o) { - if (idx === 0) { - obj[idx + 1] = 8; - } - return val > 10; - } +function callbackfn(val, idx, o) { + if (idx === 0) { + obj[idx + 1] = 8; + } + return val > 10; +} - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult[1], false, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-9.js index 88f74819ad..3554ac85b5 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-9.js @@ -7,10 +7,10 @@ es5id: 15.4.4.19-8-c-ii-9 description: Array.prototype.map - callbackfn with 0 formal parameter ---*/ - function callbackfn() { - return true; - } +function callbackfn() { + return true; +} - var testResult = [11].map(callbackfn); +var testResult = [11].map(callbackfn); assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-1.js index b3fa6ffcc2..5f759befbe 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-1.js @@ -9,14 +9,14 @@ description: > returned array element ---*/ - function callbackfn(val, idx, obj){ - if(val % 2) - return (2 * val + 1); - else - return (val / 2); - } - var srcArr = [0,1,2,3,4]; - var resArr = srcArr.map(callbackfn); +function callbackfn(val, idx, obj) { + if (val % 2) + return (2 * val + 1); + else + return (val / 2); +} +var srcArr = [0, 1, 2, 3, 4]; +var resArr = srcArr.map(callbackfn); assert(resArr.length > 0, 'resArr.length > 0'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-2.js index 999460193c..6f5cbb81bb 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-2.js @@ -9,12 +9,16 @@ description: > 'mappedValue' ---*/ - function callbackfn(val, idx, obj) { - return val; - } +function callbackfn(val, idx, obj) { + return val; +} - var obj = { 0: 11, 1: 9, length: 2 }; - var newArr = Array.prototype.map.call(obj, callbackfn); +var obj = { + 0: 11, + 1: 9, + length: 2 +}; +var newArr = Array.prototype.map.call(obj, callbackfn); assert.sameValue(newArr[0], obj[0], 'newArr[0]'); assert.sameValue(newArr[1], obj[1], 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-3.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-3.js index fed4c1424e..7525d1b0c0 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-3.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-3.js @@ -9,14 +9,18 @@ description: > overwritten ---*/ - function callbackfn(val, idx, obj) { - return 11; - } +function callbackfn(val, idx, obj) { + return 11; +} - var obj = { 0: 11, 1: 9, length: 2 }; - var newArr = Array.prototype.map.call(obj, callbackfn); +var obj = { + 0: 11, + 1: 9, + length: 2 +}; +var newArr = Array.prototype.map.call(obj, callbackfn); - var tempVal = newArr[1]; - newArr[1] += 1; +var tempVal = newArr[1]; +newArr[1] += 1; assert.notSameValue(newArr[1], tempVal, 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-4.js index f15aad4f1c..4b918884d4 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-4.js @@ -9,21 +9,24 @@ description: > enumerated ---*/ - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var obj = { 0: 11, length: 2 }; - var newArr = Array.prototype.map.call(obj, callbackfn); +var obj = { + 0: 11, + length: 2 +}; +var newArr = Array.prototype.map.call(obj, callbackfn); - var prop; - var enumerable = false; - for (prop in newArr) { - if (newArr.hasOwnProperty(prop)) { - if (prop === "0") { - enumerable = true; - } - } - } +var prop; +var enumerable = false; +for (prop in newArr) { + if (newArr.hasOwnProperty(prop)) { + if (prop === "0") { + enumerable = true; + } + } +} assert(enumerable, 'enumerable !== true'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-5.js index 4bb7b42ff0..44eaea59e1 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-5.js @@ -9,15 +9,19 @@ description: > changed or deleted ---*/ - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var obj = { 0: 11, 1: 9, length: 2 }; - var newArr = Array.prototype.map.call(obj, callbackfn); +var obj = { + 0: 11, + 1: 9, + length: 2 +}; +var newArr = Array.prototype.map.call(obj, callbackfn); - var tempVal = newArr[1]; - delete newArr[1]; +var tempVal = newArr[1]; +delete newArr[1]; assert.notSameValue(tempVal, undefined, 'tempVal'); assert.sameValue(newArr[1], undefined, 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-1.js index daabdf4cba..a9cb1f51e8 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-1.js @@ -9,12 +9,12 @@ description: > on ---*/ - function callbackfn(val, idx, obj) - { - return true; - } - var srcArr = [1,2,3,4,5]; - srcArr.map(callbackfn); +function callbackfn(val, idx, obj) +{ + return true; +} +var srcArr = [1, 2, 3, 4, 5]; +srcArr.map(callbackfn); assert.sameValue(srcArr[0], 1, 'srcArr[0]'); assert.sameValue(srcArr[1], 2, 'srcArr[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-10.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-10.js index 1b1854f44f..5407e1ee9e 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-10.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-10.js @@ -9,22 +9,22 @@ description: > (subclassed Array, length overridden with obj with valueOf) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var Foo = function () { }; - Foo.prototype = [1, 2, 3]; - var obj = new Foo(); - obj.length = { - valueOf: function () { - return 0; - } - }; +var Foo = function() {}; +Foo.prototype = [1, 2, 3]; +var obj = new Foo(); +obj.length = { + valueOf: function() { + return 0; + } +}; - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-11.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-11.js index f8c6a295f8..aa0fd88912 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-11.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-11.js @@ -10,26 +10,26 @@ description: > (toString)) ---*/ - function Foo() { } - Foo.prototype = [1, 2, 3]; +function Foo() {} +Foo.prototype = [1, 2, 3]; - var f = new Foo(); +var f = new Foo(); - var o = { - toString: function () { - return '0'; - } - }; - f.length = o; +var o = { + toString: function() { + return '0'; + } +}; +f.length = o; - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. - function cb() { } - var a = Array.prototype.map.call(f, cb); +function cb() {} +var a = Array.prototype.map.call(f, cb); assert(Array.isArray(a), 'Array.isArray(a) !== true'); assert.sameValue(a.length, 0, 'a.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-12.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-12.js index 41b4e362b5..9ae64cd57a 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-12.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-12.js @@ -9,28 +9,28 @@ description: > (subclassed Array, length overridden with []) ---*/ - function Foo() { } - Foo.prototype = [1, 2, 3]; - var f = new Foo(); +function Foo() {} +Foo.prototype = [1, 2, 3]; +var f = new Foo(); - f.length = []; +f.length = []; - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. +// +// The toString( ) method on Array converts the array elements to strings, +// then returns the result of concatenating these strings, with commas in +// between. An array with no elements converts to the empty string, which +// converts to the number 0. If an array has a single element that is a +// number n, the array converts to a string representation of n, which is +// then converted back to n itself. If an array contains more than one element, +// or if its one element is not a number, the array converts to NaN. - function cb() { } - var a = Array.prototype.map.call(f, cb); +function cb() {} +var a = Array.prototype.map.call(f, cb); assert(Array.isArray(a), 'Array.isArray(a) !== true'); assert.sameValue(a.length, 0, 'a.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-13.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-13.js index d4c208ccdf..f84a937eec 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-13.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-13.js @@ -9,16 +9,16 @@ description: > functions, O is unmodified ---*/ - var called = 0; +var called = 0; - function callbackfn(val, idx, obj) { - called++; - return val > 2; - } +function callbackfn(val, idx, obj) { + called++; + return val > 2; +} - var arr = [1, 2, 3, 4]; +var arr = [1, 2, 3, 4]; - arr.map(callbackfn); +arr.map(callbackfn); assert.sameValue(arr[0], 1, 'arr[0]'); assert.sameValue(arr[1], 2, 'arr[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-2.js index c876d7f0aa..cc3657e87c 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-2.js @@ -9,12 +9,12 @@ description: > and values the result of callbackfn ---*/ - function callbackfn(val, idx, obj) - { - return val + 10; - } - var srcArr = [1,2,3,4,5]; - var resArr = srcArr.map(callbackfn); +function callbackfn(val, idx, obj) +{ + return val + 10; +} +var srcArr = [1, 2, 3, 4, 5]; +var resArr = srcArr.map(callbackfn); assert.sameValue(resArr[0], 11, 'resArr[0]'); assert.sameValue(resArr[1], 12, 'resArr[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-3.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-3.js index f89f39c9c3..815868a482 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-3.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-3.js @@ -7,13 +7,14 @@ es5id: 15.4.4.19-9-3 description: Array.prototype.map - subclassed array when length is reduced ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 1; +foo.prototype = new Array(1, 2, 3); - function cb(){} - var a = f.map(cb); +function foo() {} +var f = new foo(); +f.length = 1; + +function cb() {} +var a = f.map(cb); assert(Array.isArray(a), 'Array.isArray(a) !== true'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-4.js index f27f93bf09..3c01de3d0a 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-4.js @@ -7,15 +7,16 @@ es5id: 15.4.4.19-9-4 description: Array.prototype.map doesn't visit expandos ---*/ - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - } - var srcArr = [1,2,3,4,5]; - srcArr["i"] = 10; - srcArr[true] = 11; +var callCnt = 0; - var resArr = srcArr.map(callbackfn); +function callbackfn(val, idx, obj) +{ + callCnt++; +} +var srcArr = [1, 2, 3, 4, 5]; +srcArr["i"] = 10; +srcArr[true] = 11; + +var resArr = srcArr.map(callbackfn); assert.sameValue(callCnt, 5, 'callCnt'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-5.js index 84ca53f152..6c04bb72e4 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-5.js @@ -9,12 +9,16 @@ description: > (empty array) ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var obj = { 0: 9, 1: 8, length: 0 }; +var obj = { + 0: 9, + 1: 8, + length: 0 +}; - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-6.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-6.js index e2adc884c2..a44859e171 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-6.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-6.js @@ -9,15 +9,15 @@ description: > (subclassed Array, length overridden to null (type conversion)) ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var Foo = function () { }; - Foo.prototype = [1, 2, 3]; - var obj = new Foo(); - obj.length = null; +var Foo = function() {}; +Foo.prototype = [1, 2, 3]; +var obj = new Foo(); +obj.length = null; - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-7.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-7.js index b6ebf35ee2..3370cc36ca 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-7.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-7.js @@ -9,18 +9,18 @@ description: > (subclassed Array, length overridden to false (type conversion)) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var Foo = function () { }; - Foo.prototype = [1, 2, 3]; - var obj = new Foo(); - obj.length = false; +var Foo = function() {}; +Foo.prototype = [1, 2, 3]; +var obj = new Foo(); +obj.length = false; - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-8.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-8.js index fe1e1f5e4d..9e08d61d39 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-8.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-8.js @@ -9,18 +9,18 @@ description: > (subclassed Array, length overridden to 0 (type conversion)) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var Foo = function () { }; - Foo.prototype = [1, 2, 3]; - var obj = new Foo(); - obj.length = 0; +var Foo = function() {}; +Foo.prototype = [1, 2, 3]; +var obj = new Foo(); +obj.length = 0; - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-9.js index 31d18a8079..73425afa10 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-9.js @@ -9,18 +9,18 @@ description: > (subclassed Array, length overridden to '0' (type conversion)) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var Foo = function () { }; - Foo.prototype = [1, 2, 3]; - var obj = new Foo(); - obj.length = '0'; +var Foo = function() {}; +Foo.prototype = [1, 2, 3]; +var obj = new Foo(); +obj.length = '0'; - var testResult = Array.prototype.map.call(obj, callbackfn); +var testResult = Array.prototype.map.call(obj, callbackfn); assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/create-ctor-non-object.js b/test/built-ins/Array/prototype/map/create-ctor-non-object.js index b020704a2a..505b661cee 100644 --- a/test/built-ins/Array/prototype/map/create-ctor-non-object.js +++ b/test/built-ins/Array/prototype/map/create-ctor-non-object.js @@ -20,7 +20,9 @@ info: | var a = []; var callCount = 0; -var cb = function() { callCount += 0; }; +var cb = function() { + callCount += 0; +}; a.constructor = null; assert.throws(TypeError, function() { diff --git a/test/built-ins/Array/prototype/map/create-ctor-poisoned.js b/test/built-ins/Array/prototype/map/create-ctor-poisoned.js index f99c51bdd1..39318bb94e 100644 --- a/test/built-ins/Array/prototype/map/create-ctor-poisoned.js +++ b/test/built-ins/Array/prototype/map/create-ctor-poisoned.js @@ -17,7 +17,9 @@ info: | var a = []; var callCount = 0; -var cb = function() { callCount += 1; }; +var cb = function() { + callCount += 1; +}; Object.defineProperty(a, 'constructor', { get: function() { diff --git a/test/built-ins/Array/prototype/map/create-non-array-invalid-len.js b/test/built-ins/Array/prototype/map/create-non-array-invalid-len.js index 484b77e6f9..125e50a387 100644 --- a/test/built-ins/Array/prototype/map/create-non-array-invalid-len.js +++ b/test/built-ins/Array/prototype/map/create-non-array-invalid-len.js @@ -22,7 +22,9 @@ info: | ---*/ var callCount = 0; -var obj = { length: Math.pow(2, 32) }; +var obj = { + length: Math.pow(2, 32) +}; var cb = function() { callCount += 1; }; diff --git a/test/built-ins/Array/prototype/map/create-non-array.js b/test/built-ins/Array/prototype/map/create-non-array.js index 05f315eba5..077d421df9 100644 --- a/test/built-ins/Array/prototype/map/create-non-array.js +++ b/test/built-ins/Array/prototype/map/create-non-array.js @@ -16,7 +16,9 @@ info: | 4. If isArray is false, return ? ArrayCreate(length). ---*/ -var obj = { length: 0 }; +var obj = { + length: 0 +}; var callCount = 0; var result; Object.defineProperty(obj, 'constructor', { diff --git a/test/built-ins/Array/prototype/map/create-revoked-proxy.js b/test/built-ins/Array/prototype/map/create-revoked-proxy.js index a725bc8778..77967d256e 100644 --- a/test/built-ins/Array/prototype/map/create-revoked-proxy.js +++ b/test/built-ins/Array/prototype/map/create-revoked-proxy.js @@ -26,7 +26,9 @@ features: [Proxy] var o = Proxy.revocable([], {}); var ctorCount = 0; var cbCount = 0; -var cb = function() { cbCount += 1; }; +var cb = function() { + cbCount += 1; +}; Object.defineProperty(o.proxy, 'constructor', { get: function() { diff --git a/test/built-ins/Array/prototype/map/create-species-abrupt.js b/test/built-ins/Array/prototype/map/create-species-abrupt.js index dec04db2eb..5c6656f281 100644 --- a/test/built-ins/Array/prototype/map/create-species-abrupt.js +++ b/test/built-ins/Array/prototype/map/create-species-abrupt.js @@ -26,7 +26,9 @@ var Ctor = function() { throw new Test262Error(); }; var callCount = 0; -var cb = function() { callCount += 1; }; +var cb = function() { + callCount += 1; +}; var a = []; a.constructor = {}; a.constructor[Symbol.species] = Ctor; diff --git a/test/built-ins/Array/prototype/map/create-species-non-ctor.js b/test/built-ins/Array/prototype/map/create-species-non-ctor.js index 50657fef70..661894f6ff 100644 --- a/test/built-ins/Array/prototype/map/create-species-non-ctor.js +++ b/test/built-ins/Array/prototype/map/create-species-non-ctor.js @@ -25,7 +25,9 @@ features: [Symbol.species] var a = []; var callCount = 0; -var cb = function() { callCount += 1; }; +var cb = function() { + callCount += 1; +}; a.constructor = {}; a.constructor[Symbol.species] = parseInt; diff --git a/test/built-ins/Array/prototype/map/create-species-poisoned.js b/test/built-ins/Array/prototype/map/create-species-poisoned.js index 11fb340d32..a232b6aa0d 100644 --- a/test/built-ins/Array/prototype/map/create-species-poisoned.js +++ b/test/built-ins/Array/prototype/map/create-species-poisoned.js @@ -21,7 +21,9 @@ features: [Symbol.species] var a = []; var callCount = 0; -var cb = function() { callCount += 1; }; +var cb = function() { + callCount += 1; +}; a.constructor = {}; Object.defineProperty(a.constructor, Symbol.species, { diff --git a/test/built-ins/Array/prototype/map/create-species-undef-invalid-len.js b/test/built-ins/Array/prototype/map/create-species-undef-invalid-len.js index bcd89aadf3..bcd781bca6 100644 --- a/test/built-ins/Array/prototype/map/create-species-undef-invalid-len.js +++ b/test/built-ins/Array/prototype/map/create-species-undef-invalid-len.js @@ -32,7 +32,9 @@ var array = []; var maxLength = Math.pow(2, 32); var cbCount = 0; var setCount = 0; -var cb = function() { cbCount += 1; }; +var cb = function() { + cbCount += 1; +}; var proxy = new Proxy(array, { get: function(_, name) { if (name === 'length') { diff --git a/test/built-ins/Array/prototype/pop/S15.4.4.6_A1.1_T1.js b/test/built-ins/Array/prototype/pop/S15.4.4.6_A1.1_T1.js index 7b729afbaf..f0c867df5e 100644 --- a/test/built-ins/Array/prototype/pop/S15.4.4.6_A1.1_T1.js +++ b/test/built-ins/Array/prototype/pop/S15.4.4.6_A1.1_T1.js @@ -23,7 +23,7 @@ if (x.length !== 0) { } //CHECK#3 -var x = Array(1,2,3); +var x = Array(1, 2, 3); x.length = 0; var pop = x.pop(); if (pop !== undefined) { diff --git a/test/built-ins/Array/prototype/pop/S15.4.4.6_A1.2_T1.js b/test/built-ins/Array/prototype/pop/S15.4.4.6_A1.2_T1.js index b12c14952c..0e0cf824a1 100644 --- a/test/built-ins/Array/prototype/pop/S15.4.4.6_A1.2_T1.js +++ b/test/built-ins/Array/prototype/pop/S15.4.4.6_A1.2_T1.js @@ -11,7 +11,7 @@ description: Checking this use new Array() and [] ---*/ //CHECK#1 -var x = new Array(0,1,2,3); +var x = new Array(0, 1, 2, 3); var pop = x.pop(); if (pop !== 3) { $ERROR('#1: x = new Array(0,1,2,3); x.pop() === 3. Actual: ' + (pop)); diff --git a/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T1.js b/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T1.js index 32ce3b74c3..0ab566a45d 100644 --- a/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T1.js +++ b/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T1.js @@ -18,15 +18,15 @@ obj.pop = Array.prototype.pop; if (obj.length !== undefined) { $ERROR('#0: var obj = {}; obj.length === undefined. Actual: ' + (obj.length)); } else { - //CHECK#1 - var pop = obj.pop(); -if (pop !== undefined) { - $ERROR('#1: var obj = {}; obj.pop = Array.prototype.pop; obj.pop() === undefined. Actual: ' + (pop)); - } - //CHECK#2 - if (obj.length !== 0) { - $ERROR('#2: var obj = {}; obj.pop = Array.prototype.pop; obj.pop(); obj.length === 0. Actual: ' + (obj.length)); - } + //CHECK#1 + var pop = obj.pop(); + if (pop !== undefined) { + $ERROR('#1: var obj = {}; obj.pop = Array.prototype.pop; obj.pop() === undefined. Actual: ' + (pop)); + } + //CHECK#2 + if (obj.length !== 0) { + $ERROR('#2: var obj = {}; obj.pop = Array.prototype.pop; obj.pop(); obj.length === 0. Actual: ' + (obj.length)); + } } //CHECK#3 diff --git a/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T2.js b/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T2.js index ace9cd5559..3573d2a234 100644 --- a/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T2.js +++ b/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T2.js @@ -62,7 +62,7 @@ if (pop !== undefined) { if (obj.length !== 0) { $ERROR('#8: var obj = {}; obj.length = -0; obj.pop = Array.prototype.pop; obj.pop(); obj.length === 0. Actual: ' + (obj.length)); } else { - if (1/obj.length !== Number.POSITIVE_INFINITY) { + if (1 / obj.length !== Number.POSITIVE_INFINITY) { $ERROR('#8: var obj = {}; obj.length = -0; obj.pop = Array.prototype.pop; obj.pop(); obj.length === +0. Actual: ' + (obj.length)); } } diff --git a/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T4.js b/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T4.js index 43d1f76e1f..d4dcd8184b 100644 --- a/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T4.js +++ b/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T4.js @@ -17,7 +17,11 @@ obj.pop = Array.prototype.pop; //CHECK#1 obj[0] = -1; -obj.length = {valueOf: function() {return 1}}; +obj.length = { + valueOf: function() { + return 1 + } +}; var pop = obj.pop(); if (pop !== -1) { $ERROR('#1: obj[0] = -1; obj.length = {valueOf: function() {return 1}} obj.pop() === -1. Actual: ' + (pop)); @@ -25,7 +29,14 @@ if (pop !== -1) { //CHECK#2 obj[0] = -1; -obj.length = {valueOf: function() {return 1}, toString: function() {return 0}}; +obj.length = { + valueOf: function() { + return 1 + }, + toString: function() { + return 0 + } +}; var pop = obj.pop(); if (pop !== -1) { $ERROR('#0: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {return 0}} obj.pop() === -1. Actual: ' + (pop)); @@ -33,7 +44,14 @@ if (pop !== -1) { //CHECK#3 obj[0] = -1; -obj.length = {valueOf: function() {return 1}, toString: function() {return {}}}; +obj.length = { + valueOf: function() { + return 1 + }, + toString: function() { + return {} + } +}; var pop = obj.pop(); if (pop !== -1) { $ERROR('#3: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {return {}}} obj.pop() === -1. Actual: ' + (pop)); @@ -42,9 +60,16 @@ if (pop !== -1) { //CHECK#4 try { obj[0] = -1; - obj.length = {valueOf: function() {return 1}, toString: function() {throw "error"}}; + obj.length = { + valueOf: function() { + return 1 + }, + toString: function() { + throw "error" + } + }; var pop = obj.pop(); -if (pop !== -1) { + if (pop !== -1) { $ERROR('#4.1: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {throw "error"}}; obj.pop() === ",". Actual: ' + (pop)); } } @@ -58,7 +83,11 @@ catch (e) { //CHECK#5 obj[0] = -1; -obj.length = {toString: function() {return 0}}; +obj.length = { + toString: function() { + return 0 + } +}; var pop = obj.pop(); if (pop !== undefined) { $ERROR('#5: obj[0] = -1; obj.length = {toString: function() {return 0}} obj.pop() === undefined. Actual: ' + (pop)); @@ -66,7 +95,14 @@ if (pop !== undefined) { //CHECK#6 obj[0] = -1; -obj.length = {valueOf: function() {return {}}, toString: function() {return 0}} +obj.length = { + valueOf: function() { + return {} + }, + toString: function() { + return 0 + } +} var pop = obj.pop(); if (pop !== undefined) { $ERROR('#6: obj[0] = -1; obj.length = {valueOf: function() {return {}}, toString: function() {return 0}} obj.pop() === undefined. Actual: ' + (pop)); @@ -75,7 +111,14 @@ if (pop !== undefined) { //CHECK#7 try { obj[0] = -1; - obj.length = {valueOf: function() {throw "error"}, toString: function() {return 0}}; + obj.length = { + valueOf: function() { + throw "error" + }, + toString: function() { + return 0 + } + }; var pop = obj.pop(); $ERROR('#7.1: obj[0] = -1; obj.length = {valueOf: function() {throw "error"}, toString: function() {return 0}}; obj.pop() throw "error". Actual: ' + (pop)); } @@ -88,7 +131,14 @@ catch (e) { //CHECK#8 try { obj[0] = -1; - obj.length = {valueOf: function() {return {}}, toString: function() {return {}}}; + obj.length = { + valueOf: function() { + return {} + }, + toString: function() { + return {} + } + }; var pop = obj.pop(); $ERROR('#8.1: obj[0] = -1; obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.pop() throw TypeError. Actual: ' + (pop)); } diff --git a/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T1.js b/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T1.js index 2be2539f5a..424b9943c7 100644 --- a/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T1.js +++ b/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T1.js @@ -27,10 +27,10 @@ if (obj.length !== 4294967295) { //CHECK#3 if (obj[0] !== "x") { - $ERROR('#3: var obj = {}; obj.pop = Array.prototype.pop; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; obj.pop(); obj[0] === "x". Actual: ' + (obj[0])); + $ERROR('#3: var obj = {}; obj.pop = Array.prototype.pop; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; obj.pop(); obj[0] === "x". Actual: ' + (obj[0])); } //CHECK#4 if (obj[4294967295] !== undefined) { - $ERROR('#4: var obj = {}; obj.pop = Array.prototype.pop; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; obj.pop(); obj[4294967295] === undefined. Actual: ' + (obj[4294967295])); + $ERROR('#4: var obj = {}; obj.pop = Array.prototype.pop; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; obj.pop(); obj[4294967295] === undefined. Actual: ' + (obj[4294967295])); } diff --git a/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T2.js b/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T2.js index fdbbc28cfd..b309bc48ad 100644 --- a/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T2.js +++ b/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T2.js @@ -27,10 +27,10 @@ if (obj.length !== 4294967296) { //CHECK#3 if (obj[0] !== "x") { - $ERROR('#3: var obj = {}; obj.pop = Array.prototype.pop; obj[0] = "x"; obj[4294967296] = "y"; obj.length = 4294967297; obj.pop(); obj[0] === "x". Actual: ' + (obj[0])); + $ERROR('#3: var obj = {}; obj.pop = Array.prototype.pop; obj[0] = "x"; obj[4294967296] = "y"; obj.length = 4294967297; obj.pop(); obj[0] === "x". Actual: ' + (obj[0])); } //CHECK#4 if (obj[4294967296] !== undefined) { - $ERROR('#4: var obj = {}; obj.pop = Array.prototype.pop; obj[0] = "x"; obj[4294967296] = "y"; obj.length = 4294967297; obj.pop(); obj[4294967296] === undefined. Actual: ' + (obj[4294967296])); + $ERROR('#4: var obj = {}; obj.pop = Array.prototype.pop; obj[0] = "x"; obj[4294967296] = "y"; obj.length = 4294967297; obj.pop(); obj[4294967296] === undefined. Actual: ' + (obj[4294967296])); } diff --git a/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T3.js b/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T3.js index 4b9c4020bc..56919c5557 100644 --- a/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T3.js +++ b/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T3.js @@ -26,5 +26,5 @@ if (obj.length !== 0) { //CHECK#3 if (obj[4294967294] !== "x") { - $ERROR('#3: var obj = {}; obj.pop = Array.prototype.pop; obj[4294967294] = "x"; obj.length = -1; obj.pop(); obj[4294967294] === "x". Actual: ' + (obj[4294967294])); + $ERROR('#3: var obj = {}; obj.pop = Array.prototype.pop; obj[4294967294] = "x"; obj.length = -1; obj.pop(); obj[4294967294] === "x". Actual: ' + (obj[4294967294])); } diff --git a/test/built-ins/Array/prototype/pop/S15.4.4.6_A4_T1.js b/test/built-ins/Array/prototype/pop/S15.4.4.6_A4_T1.js index 45d5af8865..b5ebe7a12a 100644 --- a/test/built-ins/Array/prototype/pop/S15.4.4.6_A4_T1.js +++ b/test/built-ins/Array/prototype/pop/S15.4.4.6_A4_T1.js @@ -28,7 +28,9 @@ if (x[1] !== 1) { Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.pop = Array.prototype.pop; -x = {0:0}; +x = { + 0: 0 +}; //CHECK#3 var pop = x.pop(); diff --git a/test/built-ins/Array/prototype/pop/S15.4.4.6_A4_T2.js b/test/built-ins/Array/prototype/pop/S15.4.4.6_A4_T2.js index 7ef34c737e..3592d72532 100644 --- a/test/built-ins/Array/prototype/pop/S15.4.4.6_A4_T2.js +++ b/test/built-ins/Array/prototype/pop/S15.4.4.6_A4_T2.js @@ -11,7 +11,7 @@ description: > ---*/ Array.prototype[1] = -1; -var x = [0,1]; +var x = [0, 1]; x.length = 2; //CHECK#1 @@ -28,7 +28,10 @@ if (x[1] !== -1) { Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.pop = Array.prototype.pop; -x = {0:0,1:1}; +x = { + 0: 0, + 1: 1 +}; //CHECK#3 var pop = x.pop(); diff --git a/test/built-ins/Array/prototype/pop/clamps-to-integer-limit.js b/test/built-ins/Array/prototype/pop/clamps-to-integer-limit.js index 92adbd6ab6..0c5899a55e 100644 --- a/test/built-ins/Array/prototype/pop/clamps-to-integer-limit.js +++ b/test/built-ins/Array/prototype/pop/clamps-to-integer-limit.js @@ -18,18 +18,18 @@ info: | var arrayLike = {}; -arrayLike.length = 2**53 - 1; +arrayLike.length = 2 ** 53 - 1; Array.prototype.pop.call(arrayLike); -assert.sameValue(arrayLike.length, 2**53 - 2, "Length is 2**53 - 1"); +assert.sameValue(arrayLike.length, 2 ** 53 - 2, "Length is 2**53 - 1"); -arrayLike.length = 2**53; +arrayLike.length = 2 ** 53; Array.prototype.pop.call(arrayLike); -assert.sameValue(arrayLike.length, 2**53 - 2, "Length is 2**53"); +assert.sameValue(arrayLike.length, 2 ** 53 - 2, "Length is 2**53"); -arrayLike.length = 2**53 + 2; +arrayLike.length = 2 ** 53 + 2; Array.prototype.pop.call(arrayLike); -assert.sameValue(arrayLike.length, 2**53 - 2, "Length is 2**53 + 2"); +assert.sameValue(arrayLike.length, 2 ** 53 - 2, "Length is 2**53 + 2"); arrayLike.length = Infinity; Array.prototype.pop.call(arrayLike); -assert.sameValue(arrayLike.length, 2**53 - 2, "Length is Infinity"); +assert.sameValue(arrayLike.length, 2 ** 53 - 2, "Length is Infinity"); diff --git a/test/built-ins/Array/prototype/pop/length-near-integer-limit.js b/test/built-ins/Array/prototype/pop/length-near-integer-limit.js index 7763b8f3c0..a480b9c6c8 100644 --- a/test/built-ins/Array/prototype/pop/length-near-integer-limit.js +++ b/test/built-ins/Array/prototype/pop/length-near-integer-limit.js @@ -22,22 +22,22 @@ var arrayLike = { "9007199254740989": "9007199254740989", "9007199254740990": "9007199254740990", "9007199254740991": "9007199254740991", - length: 2**53 - 1 + length: 2 ** 53 - 1 }; var value = Array.prototype.pop.call(arrayLike); assert.sameValue(value, "9007199254740990", - "arrayLike['9007199254740990'] is returned from pop()"); + "arrayLike['9007199254740990'] is returned from pop()"); -assert.sameValue(arrayLike.length, 2**53 - 2, - "New arrayLike.length is 2**53 - 2"); +assert.sameValue(arrayLike.length, 2 ** 53 - 2, + "New arrayLike.length is 2**53 - 2"); assert.sameValue(arrayLike["9007199254740989"], "9007199254740989", - "arrayLike['9007199254740989'] is unchanged"); + "arrayLike['9007199254740989'] is unchanged"); assert.sameValue("9007199254740990" in arrayLike, false, - "arrayLike['9007199254740990'] is removed"); + "arrayLike['9007199254740990'] is removed"); assert.sameValue(arrayLike["9007199254740991"], "9007199254740991", - "arrayLike['9007199254740991'] is unchanged"); + "arrayLike['9007199254740991'] is unchanged"); diff --git a/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T1.js b/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T1.js index 181e68ca05..8d2e84db96 100644 --- a/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T1.js +++ b/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T1.js @@ -19,19 +19,19 @@ obj.push = Array.prototype.push; if (obj.length !== undefined) { $ERROR('#0: var obj = {}; obj.length === undefined. Actual: ' + (obj.length)); } else { - //CHECK#1 - var push = obj.push(-1); -if (push !== 1) { - $ERROR('#1: var obj = {}; obj.push = Array.prototype.push; obj.push(-1) === 1. Actual: ' + (push)); - } - //CHECK#2 - if (obj.length !== 1) { - $ERROR('#2: var obj = {}; obj.push = Array.prototype.push; obj.push(-1); obj.length === 1. Actual: ' + (obj.length)); - } - //CHECK#3 - if (obj["0"] !== -1) { - $ERROR('#3: var obj = {}; obj.push = Array.prototype.push; obj.push(-1); obj["0"] === -1. Actual: ' + (obj["0"])); - } + //CHECK#1 + var push = obj.push(-1); + if (push !== 1) { + $ERROR('#1: var obj = {}; obj.push = Array.prototype.push; obj.push(-1) === 1. Actual: ' + (push)); + } + //CHECK#2 + if (obj.length !== 1) { + $ERROR('#2: var obj = {}; obj.push = Array.prototype.push; obj.push(-1); obj.length === 1. Actual: ' + (obj.length)); + } + //CHECK#3 + if (obj["0"] !== -1) { + $ERROR('#3: var obj = {}; obj.push = Array.prototype.push; obj.push(-1); obj["0"] === -1. Actual: ' + (obj["0"])); + } } //CHECK#4 diff --git a/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T2.js b/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T2.js index 04ab24c3c4..6c5c1c4adc 100644 --- a/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T2.js +++ b/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T2.js @@ -35,7 +35,9 @@ if (obj["0"] !== -1) { //CHECK#4 obj.length = Number.POSITIVE_INFINITY; -assert.throws(TypeError, function() { obj.push(-4); }); +assert.throws(TypeError, function() { + obj.push(-4); +}); //CHECK#5 if (obj.length !== Number.POSITIVE_INFINITY) { diff --git a/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T3.js b/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T3.js index f92536cc6a..32aa882169 100644 --- a/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T3.js +++ b/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T3.js @@ -16,21 +16,39 @@ var obj = {}; obj.push = Array.prototype.push; //CHECK#1 -obj.length = {valueOf: function() {return 3}}; +obj.length = { + valueOf: function() { + return 3 + } +}; var push = obj.push(); if (push !== 3) { $ERROR('#1: obj.length = {valueOf: function() {return 3}} obj.push() === 3. Actual: ' + (push)); } //CHECK#2 -obj.length = {valueOf: function() {return 3}, toString: function() {return 1}}; +obj.length = { + valueOf: function() { + return 3 + }, + toString: function() { + return 1 + } +}; var push = obj.push(); if (push !== 3) { $ERROR('#0: obj.length = {valueOf: function() {return 3}, toString: function() {return 1}} obj.push() === 3. Actual: ' + (push)); } //CHECK#3 -obj.length = {valueOf: function() {return 3}, toString: function() {return {}}}; +obj.length = { + valueOf: function() { + return 3 + }, + toString: function() { + return {} + } +}; var push = obj.push(); if (push !== 3) { $ERROR('#1: obj.length = {valueOf: function() {return 3}, toString: function() {return {}}} obj.push() === 3. Actual: ' + (push)); @@ -39,9 +57,16 @@ if (push !== 3) { //CHECK#4 try { - obj.length = {valueOf: function() {return 3}, toString: function() {throw "error"}}; + obj.length = { + valueOf: function() { + return 3 + }, + toString: function() { + throw "error" + } + }; var push = obj.push(); -if (push !== 3) { + if (push !== 3) { $ERROR('#4.1: obj.length = {valueOf: function() {return 3}, toString: function() {throw "error"}}; obj.push() === ",". Actual: ' + (push)); } } @@ -54,14 +79,25 @@ catch (e) { } //CHECK#5 -obj.length = {toString: function() {return 1}}; +obj.length = { + toString: function() { + return 1 + } +}; var push = obj.push(); if (push !== 1) { $ERROR('#5: obj.length = {toString: function() {return 1}} obj.push() === 1. Actual: ' + (push)); } //CHECK#6 -obj.length = {valueOf: function() {return {}}, toString: function() {return 1}} +obj.length = { + valueOf: function() { + return {} + }, + toString: function() { + return 1 + } +} var push = obj.push(); if (push !== 1) { $ERROR('#6: obj.length = {valueOf: function() {return {}}, toString: function() {return 1}} obj.push() === 1. Actual: ' + (push)); @@ -70,7 +106,14 @@ if (push !== 1) { //CHECK#7 try { - obj.length = {valueOf: function() {throw "error"}, toString: function() {return 1}}; + obj.length = { + valueOf: function() { + throw "error" + }, + toString: function() { + return 1 + } + }; var push = obj.push(); $ERROR('#7.1: obj.length = {valueOf: function() {throw "error"}, toString: function() {return 1}}; obj.push() throw "error". Actual: ' + (push)); } @@ -83,7 +126,14 @@ catch (e) { //CHECK#8 try { - obj.length = {valueOf: function() {return {}}, toString: function() {return {}}}; + obj.length = { + valueOf: function() { + return {} + }, + toString: function() { + return {} + } + }; var push = obj.push(); $ERROR('#8.1: obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.push() throw TypeError. Actual: ' + (push)); } diff --git a/test/built-ins/Array/prototype/push/S15.4.4.7_A3.js b/test/built-ins/Array/prototype/push/S15.4.4.7_A3.js index dd596aefd5..d9b26a6e34 100644 --- a/test/built-ins/Array/prototype/push/S15.4.4.7_A3.js +++ b/test/built-ins/Array/prototype/push/S15.4.4.7_A3.js @@ -21,7 +21,7 @@ if (push !== 4294967295) { try { x.push("x"); $ERROR('#2.1: x = []; x.length = 4294967295; x.push("x") throw RangeError. Actual: ' + (push)); -} catch(e) { +} catch (e) { if ((e instanceof RangeError) !== true) { $ERROR('#2.2: x = []; x.length = 4294967295; x.push("x") throw RangeError. Actual: ' + (e)); } @@ -29,10 +29,10 @@ try { //CHECK#3 if (x[4294967295] !== "x") { - $ERROR('#3: x = []; x.length = 4294967295; try {x.push("x")}catch(e){}; x[4294967295] === "x". Actual: ' + (x[4294967295])); + $ERROR('#3: x = []; x.length = 4294967295; try {x.push("x")}catch(e){}; x[4294967295] === "x". Actual: ' + (x[4294967295])); } //CHECK#4 if (x.length !== 4294967295) { - $ERROR('#4: x = []; x.length = 4294967295; try {x.push("x")}catch(e){}; x.length === 4294967295. Actual: ' + (x.length)); + $ERROR('#4: x = []; x.length = 4294967295; try {x.push("x")}catch(e){}; x.length === 4294967295. Actual: ' + (x.length)); } diff --git a/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T1.js b/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T1.js index bc762776c5..90ed3ae4cf 100644 --- a/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T1.js +++ b/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T1.js @@ -25,32 +25,32 @@ if (obj.length !== 4294967299) { //CHECK#3 if (obj[0] !== undefined) { - $ERROR('#3: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push("x", "y", "z"); obj[0] === undefined. Actual: ' + (obj[0])); + $ERROR('#3: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push("x", "y", "z"); obj[0] === undefined. Actual: ' + (obj[0])); } //CHECK#4 if (obj[1] !== undefined) { - $ERROR('#4: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push("x", "y", "z"); obj[1] === undefined. Actual: ' + (obj[1])); + $ERROR('#4: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push("x", "y", "z"); obj[1] === undefined. Actual: ' + (obj[1])); } //CHECK#5 if (obj[2] !== undefined) { - $ERROR('#5: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push("x", "y", "z"); obj[2] === undefined. Actual: ' + (obj[2])); + $ERROR('#5: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push("x", "y", "z"); obj[2] === undefined. Actual: ' + (obj[2])); } //CHECK#6 if (obj[4294967296] !== "x") { - $ERROR('#6: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push("x", "y", "z"); obj[4294967296] === "x". Actual: ' + (obj[4294967296])); + $ERROR('#6: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push("x", "y", "z"); obj[4294967296] === "x". Actual: ' + (obj[4294967296])); } //CHECK#7 if (obj[4294967297] !== "y") { - $ERROR('#7: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push("x", "y", "z"); obj[4294967297] === "y". Actual: ' + (obj[4294967297])); + $ERROR('#7: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push("x", "y", "z"); obj[4294967297] === "y". Actual: ' + (obj[4294967297])); } //CHECK#8 if (obj[4294967298] !== "z") { - $ERROR('#8: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push("x", "y", "z"); obj[4294967298] === "z". Actual: ' + (obj[4294967298])); + $ERROR('#8: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push("x", "y", "z"); obj[4294967298] === "z". Actual: ' + (obj[4294967298])); } var obj = {}; diff --git a/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T2.js b/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T2.js index 22a2c5b432..0ed4b027c4 100644 --- a/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T2.js +++ b/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T2.js @@ -25,15 +25,15 @@ if (obj.length !== 4294967298) { //CHECK#3 if (obj[4294967295] !== "x") { - $ERROR('#3: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967295; obj.push("x", "y", "z"); obj[4294967295] === "x". Actual: ' + (obj[4294967295])); + $ERROR('#3: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967295; obj.push("x", "y", "z"); obj[4294967295] === "x". Actual: ' + (obj[4294967295])); } //CHECK#4 if (obj[4294967296] !== "y") { - $ERROR('#4: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967295; obj.push("x", "y", "z"); obj[4294967296] === "y". Actual: ' + (obj[4294967296])); + $ERROR('#4: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967295; obj.push("x", "y", "z"); obj[4294967296] === "y". Actual: ' + (obj[4294967296])); } //CHECK#5 if (obj[4294967297] !== "z") { - $ERROR('#5: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967295; obj.push("x", "y", "z"); obj[4294967297] === "z". Actual: ' + (obj[4294967297])); + $ERROR('#5: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967295; obj.push("x", "y", "z"); obj[4294967297] === "z". Actual: ' + (obj[4294967297])); } diff --git a/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T3.js b/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T3.js index 464dcacca4..afaf0b143d 100644 --- a/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T3.js +++ b/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T3.js @@ -25,30 +25,30 @@ if (obj.length !== 3) { //CHECK#3 if (obj[4294967295] !== undefined) { - $ERROR('#3: var obj = {}; obj.push = Array.prototype.push; obj.length = -1; obj.push("x", "y", "z"); obj[4294967295] === undefined. Actual: ' + (obj[4294967295])); + $ERROR('#3: var obj = {}; obj.push = Array.prototype.push; obj.length = -1; obj.push("x", "y", "z"); obj[4294967295] === undefined. Actual: ' + (obj[4294967295])); } //CHECK#4 if (obj[4294967296] !== undefined) { - $ERROR('#4: var obj = {}; obj.push = Array.prototype.push; obj.length = -1; obj.push("x", "y", "z"); obj[4294967296] === undefined. Actual: ' + (obj[4294967296])); + $ERROR('#4: var obj = {}; obj.push = Array.prototype.push; obj.length = -1; obj.push("x", "y", "z"); obj[4294967296] === undefined. Actual: ' + (obj[4294967296])); } //CHECK#5 if (obj[4294967297] !== undefined) { - $ERROR('#5: var obj = {}; obj.push = Array.prototype.push; obj.length = -1; obj.push("x", "y", "z"); obj[4294967297] === undefined. Actual: ' + (obj[4294967297])); + $ERROR('#5: var obj = {}; obj.push = Array.prototype.push; obj.length = -1; obj.push("x", "y", "z"); obj[4294967297] === undefined. Actual: ' + (obj[4294967297])); } //CHECK#6 if (obj[0] !== "x") { - $ERROR('#3: var obj = {}; obj.push = Array.prototype.push; obj.length = -1; obj.push("x", "y", "z"); obj[0] === "x". Actual: ' + (obj[0])); + $ERROR('#3: var obj = {}; obj.push = Array.prototype.push; obj.length = -1; obj.push("x", "y", "z"); obj[0] === "x". Actual: ' + (obj[0])); } //CHECK#7 if (obj[1] !== "y") { - $ERROR('#4: var obj = {}; obj.push = Array.prototype.push; obj.length = -1; obj.push("x", "y", "z"); obj[1] === "y". Actual: ' + (obj[1])); + $ERROR('#4: var obj = {}; obj.push = Array.prototype.push; obj.length = -1; obj.push("x", "y", "z"); obj[1] === "y". Actual: ' + (obj[1])); } //CHECK#8 if (obj[2] !== "z") { - $ERROR('#5: var obj = {}; obj.push = Array.prototype.push; obj.length = -1; obj.push("x", "y", "z"); obj[2] === "z". Actual: ' + (obj[2])); + $ERROR('#5: var obj = {}; obj.push = Array.prototype.push; obj.length = -1; obj.push("x", "y", "z"); obj[2] === "z". Actual: ' + (obj[2])); } diff --git a/test/built-ins/Array/prototype/push/S15.4.4.7_A5_T1.js b/test/built-ins/Array/prototype/push/S15.4.4.7_A5_T1.js index 6cbf65e074..70f1b41ac3 100644 --- a/test/built-ins/Array/prototype/push/S15.4.4.7_A5_T1.js +++ b/test/built-ins/Array/prototype/push/S15.4.4.7_A5_T1.js @@ -13,7 +13,9 @@ description: > Object.prototype[1] = -1; Object.prototype.length = 1; Object.prototype.push = Array.prototype.push; -var x = {0:0}; +var x = { + 0: 0 +}; //CHECK#1 var push = x.push(1); diff --git a/test/built-ins/Array/prototype/push/clamps-to-integer-limit.js b/test/built-ins/Array/prototype/push/clamps-to-integer-limit.js index d4100dd0c0..9cfc323fc3 100644 --- a/test/built-ins/Array/prototype/push/clamps-to-integer-limit.js +++ b/test/built-ins/Array/prototype/push/clamps-to-integer-limit.js @@ -18,18 +18,18 @@ info: | var arrayLike = {}; -arrayLike.length = 2**53 - 1; +arrayLike.length = 2 ** 53 - 1; Array.prototype.push.call(arrayLike); -assert.sameValue(arrayLike.length, 2**53 - 1, "Length is 2**53 - 1"); +assert.sameValue(arrayLike.length, 2 ** 53 - 1, "Length is 2**53 - 1"); -arrayLike.length = 2**53; +arrayLike.length = 2 ** 53; Array.prototype.push.call(arrayLike); -assert.sameValue(arrayLike.length, 2**53 - 1, "Length is 2**53"); +assert.sameValue(arrayLike.length, 2 ** 53 - 1, "Length is 2**53"); -arrayLike.length = 2**53 + 2; +arrayLike.length = 2 ** 53 + 2; Array.prototype.push.call(arrayLike); -assert.sameValue(arrayLike.length, 2**53 - 1, "Length is 2**53 + 2"); +assert.sameValue(arrayLike.length, 2 ** 53 - 1, "Length is 2**53 + 2"); arrayLike.length = Infinity; Array.prototype.push.call(arrayLike); -assert.sameValue(arrayLike.length, 2**53 - 1, "Length is Infinity"); +assert.sameValue(arrayLike.length, 2 ** 53 - 1, "Length is Infinity"); diff --git a/test/built-ins/Array/prototype/push/length-near-integer-limit.js b/test/built-ins/Array/prototype/push/length-near-integer-limit.js index b727b51157..4c94e29873 100644 --- a/test/built-ins/Array/prototype/push/length-near-integer-limit.js +++ b/test/built-ins/Array/prototype/push/length-near-integer-limit.js @@ -21,19 +21,19 @@ var arrayLike = { "9007199254740989": "9007199254740989", /* "9007199254740990": empty */ "9007199254740991": "9007199254740991", - length: 2**53 - 2 + length: 2 ** 53 - 2 }; Array.prototype.push.call(arrayLike, "new-value"); -assert.sameValue(arrayLike.length, 2**53 - 1, - "New arrayLike.length is 2**53 - 1"); +assert.sameValue(arrayLike.length, 2 ** 53 - 1, + "New arrayLike.length is 2**53 - 1"); assert.sameValue(arrayLike["9007199254740989"], "9007199254740989", - "arrayLike['9007199254740989'] is unchanged"); + "arrayLike['9007199254740989'] is unchanged"); assert.sameValue(arrayLike["9007199254740990"], "new-value", - "arrayLike['9007199254740990'] has new value"); + "arrayLike['9007199254740990'] has new value"); assert.sameValue(arrayLike["9007199254740991"], "9007199254740991", - "arrayLike['9007199254740991'] is unchanged"); + "arrayLike['9007199254740991'] is unchanged"); diff --git a/test/built-ins/Array/prototype/push/throws-if-integer-limit-exceeded.js b/test/built-ins/Array/prototype/push/throws-if-integer-limit-exceeded.js index 1542fd0256..ae71cd417a 100644 --- a/test/built-ins/Array/prototype/push/throws-if-integer-limit-exceeded.js +++ b/test/built-ins/Array/prototype/push/throws-if-integer-limit-exceeded.js @@ -17,17 +17,17 @@ info: | var arrayLike = {}; -arrayLike.length = 2**53 - 1; +arrayLike.length = 2 ** 53 - 1; assert.throws(TypeError, function() { Array.prototype.push.call(arrayLike, null); }, "Length is 2**53 - 1"); -arrayLike.length = 2**53; +arrayLike.length = 2 ** 53; assert.throws(TypeError, function() { Array.prototype.push.call(arrayLike, null); }, "Length is 2**53"); -arrayLike.length = 2**53 + 2; +arrayLike.length = 2 ** 53 + 2; assert.throws(TypeError, function() { Array.prototype.push.call(arrayLike, null); }, "Length is 2**53 + 2"); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-1.js index fdb550a91a..264cd7934a 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-1.js @@ -9,5 +9,5 @@ description: Array.prototype.reduce applied to undefined assert.throws(TypeError, function() { - Array.prototype.reduce.call(undefined); + Array.prototype.reduce.call(undefined); }); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-10.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-10.js index d24e9841c1..04bb5ee2a3 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-10.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-10.js @@ -7,11 +7,11 @@ es5id: 15.4.4.21-1-10 description: Array.prototype.reduce applied to the Math object ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return ('[object Math]' === Object.prototype.toString.call(obj)); - } +function callbackfn(prevVal, curVal, idx, obj) { + return ('[object Math]' === Object.prototype.toString.call(obj)); +} - Math.length = 1; - Math[0] = 1; +Math.length = 1; +Math[0] = 1; assert(Array.prototype.reduce.call(Math, callbackfn, 1), 'Array.prototype.reduce.call(Math, callbackfn, 1) !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-11.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-11.js index 4f4a9d6fd8..67534e3399 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-11.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-11.js @@ -7,12 +7,12 @@ es5id: 15.4.4.21-1-11 description: Array.prototype.reduce applied to Date object ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return obj instanceof Date; - } +function callbackfn(prevVal, curVal, idx, obj) { + return obj instanceof Date; +} - var obj = new Date(); - obj.length = 1; - obj[0] = 1; +var obj = new Date(); +obj.length = 1; +obj[0] = 1; assert(Array.prototype.reduce.call(obj, callbackfn, 1), 'Array.prototype.reduce.call(obj, callbackfn, 1) !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-12.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-12.js index 7e9604d556..ade27ade62 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-12.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-12.js @@ -7,12 +7,12 @@ es5id: 15.4.4.21-1-12 description: Array.prototype.reduce applied to RegExp object ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return obj instanceof RegExp; - } +function callbackfn(prevVal, curVal, idx, obj) { + return obj instanceof RegExp; +} - var obj = new RegExp(); - obj.length = 1; - obj[0] = 1; +var obj = new RegExp(); +obj.length = 1; +obj[0] = 1; assert(Array.prototype.reduce.call(obj, callbackfn, 1), 'Array.prototype.reduce.call(obj, callbackfn, 1) !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-13.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-13.js index 8863308394..3bdd3e1723 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-13.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-13.js @@ -7,11 +7,11 @@ es5id: 15.4.4.21-1-13 description: Array.prototype.reduce applied to the JSON object ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return ('[object JSON]' === Object.prototype.toString.call(obj)); - } +function callbackfn(prevVal, curVal, idx, obj) { + return ('[object JSON]' === Object.prototype.toString.call(obj)); +} - JSON.length = 1; - JSON[0] = 1; +JSON.length = 1; +JSON[0] = 1; assert(Array.prototype.reduce.call(JSON, callbackfn, 1), 'Array.prototype.reduce.call(JSON, callbackfn, 1) !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-14.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-14.js index ae958b3d21..424e1e69f2 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-14.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-14.js @@ -7,12 +7,12 @@ es5id: 15.4.4.21-1-14 description: Array.prototype.reduce applied to Error object ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return obj instanceof Error; - } +function callbackfn(prevVal, curVal, idx, obj) { + return obj instanceof Error; +} - var obj = new Error(); - obj.length = 1; - obj[0] = 1; +var obj = new Error(); +obj.length = 1; +obj[0] = 1; assert(Array.prototype.reduce.call(obj, callbackfn, 1), 'Array.prototype.reduce.call(obj, callbackfn, 1) !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-15.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-15.js index efa389f9db..a5387f2780 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-15.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-15.js @@ -7,12 +7,12 @@ es5id: 15.4.4.21-1-15 description: Array.prototype.reduce applied to the Arguments object ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return ('[object Arguments]' === Object.prototype.toString.call(obj)); - } +function callbackfn(prevVal, curVal, idx, obj) { + return ('[object Arguments]' === Object.prototype.toString.call(obj)); +} - var obj = (function () { - return arguments; - }("a", "b")); +var obj = (function() { + return arguments; +}("a", "b")); assert(Array.prototype.reduce.call(obj, callbackfn, 1), 'Array.prototype.reduce.call(obj, callbackfn, 1) !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-2.js index 709021d9a7..b070b9ea19 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-2.js @@ -9,5 +9,5 @@ description: Array.prototype.reduce applied to null assert.throws(TypeError, function() { - Array.prototype.reduce.call(null); + Array.prototype.reduce.call(null); }); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-3.js index ae7e782149..833762b496 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-3.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-3.js @@ -7,11 +7,11 @@ es5id: 15.4.4.21-1-3 description: Array.prototype.reduce applied to boolean primitive ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return obj instanceof Boolean; - } +function callbackfn(prevVal, curVal, idx, obj) { + return obj instanceof Boolean; +} - Boolean.prototype[0] = true; - Boolean.prototype.length = 1; +Boolean.prototype[0] = true; +Boolean.prototype.length = 1; assert(Array.prototype.reduce.call(false, callbackfn, 1), 'Array.prototype.reduce.call(false, callbackfn, 1) !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-4.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-4.js index 33519f325a..c08a750771 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-4.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-4.js @@ -7,13 +7,13 @@ es5id: 15.4.4.21-1-4 description: Array.prototype.reduce applied to Boolean object ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return obj instanceof Boolean; - } +function callbackfn(prevVal, curVal, idx, obj) { + return obj instanceof Boolean; +} - var obj = new Boolean(true); - obj.length = 2; - obj[0] = 11; - obj[1] = 12; +var obj = new Boolean(true); +obj.length = 2; +obj[0] = 11; +obj[1] = 12; assert(Array.prototype.reduce.call(obj, callbackfn, 1), 'Array.prototype.reduce.call(obj, callbackfn, 1) !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-5.js index 20ca2f99f5..8314bea9bd 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-5.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-5.js @@ -7,11 +7,11 @@ es5id: 15.4.4.21-1-5 description: Array.prototype.reduce applied to number primitive ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return obj instanceof Number; - } +function callbackfn(prevVal, curVal, idx, obj) { + return obj instanceof Number; +} - Number.prototype[0] = 1; - Number.prototype.length = 1; +Number.prototype[0] = 1; +Number.prototype.length = 1; assert(Array.prototype.reduce.call(2.5, callbackfn, 1), 'Array.prototype.reduce.call(2.5, callbackfn, 1) !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-6.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-6.js index 55eba5ba35..4ab488dc4c 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-6.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-6.js @@ -7,13 +7,13 @@ es5id: 15.4.4.21-1-6 description: Array.prototype.reduce applied to Number object ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return obj instanceof Number; - } +function callbackfn(prevVal, curVal, idx, obj) { + return obj instanceof Number; +} - var obj = new Number(-128); - obj.length = 2; - obj[0] = 11; - obj[1] = 12; +var obj = new Number(-128); +obj.length = 2; +obj[0] = 11; +obj[1] = 12; assert(Array.prototype.reduce.call(obj, callbackfn, 1), 'Array.prototype.reduce.call(obj, callbackfn, 1) !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-7.js index ca99114882..6869f90c09 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-7.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-7.js @@ -7,8 +7,8 @@ es5id: 15.4.4.21-1-7 description: Array.prototype.reduce applied to string primitive ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return obj instanceof String; - } +function callbackfn(prevVal, curVal, idx, obj) { + return obj instanceof String; +} assert(Array.prototype.reduce.call("abc", callbackfn, 1), 'Array.prototype.reduce.call("abc", callbackfn, 1) !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-8.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-8.js index 169467bb27..96635cee29 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-8.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-8.js @@ -7,10 +7,10 @@ es5id: 15.4.4.21-1-8 description: Array.prototype.reduce applied to String object ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return obj instanceof String; - } +function callbackfn(prevVal, curVal, idx, obj) { + return obj instanceof String; +} - var obj = new String("abc"); +var obj = new String("abc"); assert(Array.prototype.reduce.call(obj, callbackfn, 1), 'Array.prototype.reduce.call(obj, callbackfn, 1) !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-9.js index dd00fe9bba..b2bd796bb7 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-9.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-9.js @@ -7,14 +7,14 @@ es5id: 15.4.4.21-1-9 description: Array.prototype.reduce applied to Function object ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return obj instanceof Function; - } +function callbackfn(prevVal, curVal, idx, obj) { + return obj instanceof Function; +} - var obj = function (a, b) { - return a + b; - }; - obj[0] = 11; - obj[1] = 9; +var obj = function(a, b) { + return a + b; +}; +obj[0] = 11; +obj[1] = 9; assert(Array.prototype.reduce.call(obj, callbackfn, 1), 'Array.prototype.reduce.call(obj, callbackfn, 1) !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-1.js index ae5680106e..777c4d3f8a 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-1.js @@ -9,12 +9,12 @@ description: > called on ---*/ - function callbackfn(prevVal, curVal, idx, obj) - { - return 1; - } - var srcArr = [1,2,3,4,5]; - srcArr.reduce(callbackfn); +function callbackfn(prevVal, curVal, idx, obj) +{ + return 1; +} +var srcArr = [1, 2, 3, 4, 5]; +srcArr.reduce(callbackfn); assert.sameValue(srcArr[0], 1, 'srcArr[0]'); assert.sameValue(srcArr[1], 2, 'srcArr[1]'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-2.js index 57b27d7943..a01a48c92c 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-2.js @@ -9,10 +9,10 @@ description: > indices ---*/ - function callbackfn(prevVal, curVal, idx, obj) - { - return prevVal + curVal; - } - var srcArr = ['1','2','3','4','5']; +function callbackfn(prevVal, curVal, idx, obj) +{ + return prevVal + curVal; +} +var srcArr = ['1', '2', '3', '4', '5']; assert.sameValue(srcArr.reduce(callbackfn), '12345', 'srcArr.reduce(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-3.js index ee1cd1801c..5174a6300f 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-3.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-3.js @@ -7,10 +7,11 @@ es5id: 15.4.4.21-10-3 description: Array.prototype.reduce - subclassed array of length 1 ---*/ - foo.prototype = [1]; - function foo() {} - var f = new foo(); +foo.prototype = [1]; - function cb(){} +function foo() {} +var f = new foo(); + +function cb() {} assert.sameValue(f.reduce(cb), 1, 'f.reduce(cb)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-4.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-4.js index 5dcd159f6e..e84e53a710 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-4.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-4.js @@ -7,10 +7,13 @@ es5id: 15.4.4.21-10-4 description: Array.prototype.reduce - subclassed array with length more than 1 ---*/ - foo.prototype = new Array(1, 2, 3, 4); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3, 4); - function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} +function foo() {} +var f = new foo(); + +function cb(prevVal, curVal, idx, obj) { + return prevVal + curVal; +} assert.sameValue(f.reduce(cb), 10, 'f.reduce(cb)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-5.js index f7778c537f..82c843ecd4 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-5.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-5.js @@ -9,10 +9,10 @@ description: > indices(initialvalue present) ---*/ - function callbackfn(prevVal, curVal, idx, obj) - { - return prevVal + curVal; - } - var srcArr = ['1','2','3','4','5']; +function callbackfn(prevVal, curVal, idx, obj) +{ + return prevVal + curVal; +} +var srcArr = ['1', '2', '3', '4', '5']; -assert.sameValue(srcArr.reduce(callbackfn,'0'), '012345', 'srcArr.reduce(callbackfn,"0")'); +assert.sameValue(srcArr.reduce(callbackfn, '0'), '012345', 'srcArr.reduce(callbackfn,"0")'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-6.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-6.js index 5babbe757b..35e50b1262 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-6.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-6.js @@ -9,10 +9,13 @@ description: > provided ---*/ - foo.prototype = [1,2,3,4]; - function foo() {} - var f = new foo(); +foo.prototype = [1, 2, 3, 4]; - function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} +function foo() {} +var f = new foo(); -assert.sameValue(f.reduce(cb,-1), 9, 'f.reduce(cb,-1)'); +function cb(prevVal, curVal, idx, obj) { + return prevVal + curVal; +} + +assert.sameValue(f.reduce(cb, -1), 9, 'f.reduce(cb,-1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-7.js index e0cd77f635..1725c367ea 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-7.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-7.js @@ -9,10 +9,13 @@ description: > initialvalue provided ---*/ - foo.prototype = [1]; - function foo() {} - var f = new foo(); +foo.prototype = [1]; - function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} +function foo() {} +var f = new foo(); -assert.sameValue(f.reduce(cb,-1), 0, 'f.reduce(cb,-1)'); +function cb(prevVal, curVal, idx, obj) { + return prevVal + curVal; +} + +assert.sameValue(f.reduce(cb, -1), 0, 'f.reduce(cb,-1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-8.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-8.js index abb4066ee7..3f1ffdcb47 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-8.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-8.js @@ -7,15 +7,16 @@ es5id: 15.4.4.21-10-8 description: Array.prototype.reduce doesn't visit expandos ---*/ - var callCnt = 0; - function callbackfn(prevVal, curVal, idx, obj) - { - callCnt++; - return curVal; - } - var srcArr = ['1','2','3','4','5']; - srcArr["i"] = 10; - srcArr[true] = 11; - srcArr.reduce(callbackfn); +var callCnt = 0; + +function callbackfn(prevVal, curVal, idx, obj) +{ + callCnt++; + return curVal; +} +var srcArr = ['1', '2', '3', '4', '5']; +srcArr["i"] = 10; +srcArr[true] = 11; +srcArr.reduce(callbackfn); assert.sameValue(callCnt, 4, 'callCnt'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-1.js index 700961b96e..4e5e8bb973 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-1.js @@ -9,15 +9,15 @@ description: > Array-like object ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 2); +} - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: 2 - }; +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: 2 +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-10.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-10.js index 41de90c5c3..18e09d6d32 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-10.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-10.js @@ -9,25 +9,25 @@ description: > an inherited accessor property ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 2); +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(proto, "length", { + get: function() { + return 2; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[0] = 12; - child[1] = 11; - child[2] = 9; +var child = new Con(); +child[0] = 12; +child[1] = 11; +child[2] = 9; assert.sameValue(Array.prototype.reduce.call(child, callbackfn, 1), true, 'Array.prototype.reduce.call(child, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-11.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-11.js index 25cf0e462f..9dd5748b68 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-11.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-11.js @@ -9,19 +9,20 @@ description: > an own accessor property without a get function ---*/ - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } +var accessed = false; - var obj = { - 0: 11, - 1: 12 - }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; +} + +var obj = { + 0: 11, + 1: 12 +}; +Object.defineProperty(obj, "length", { + set: function() {}, + configurable: true +}); assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-12.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-12.js index 375fa552d6..da2f2a6ac3 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-12.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-12.js @@ -10,23 +10,27 @@ description: > Array ---*/ - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } +var accessed = false; - Object.defineProperty(Object.prototype, "length", { - get: function () { - return 2; - }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; +} - var obj = { 0: 12, 1: 11 }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); +Object.defineProperty(Object.prototype, "length", { + get: function() { + return 2; + }, + configurable: true +}); + +var obj = { + 0: 12, + 1: 11 +}; +Object.defineProperty(obj, "length", { + set: function() {}, + configurable: true +}); assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-13.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-13.js index 2be6073159..7f12502927 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-13.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-13.js @@ -9,24 +9,24 @@ description: > is inherited accessor property without a get function ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; +} - var proto = {}; - Object.defineProperty(proto, "length", { - set: function () { }, - configurable: true - }); +var proto = {}; +Object.defineProperty(proto, "length", { + set: function() {}, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[0] = 11; - child[1] = 12; +var child = new Con(); +child[0] = 11; +child[1] = 12; assert.sameValue(Array.prototype.reduce.call(child, callbackfn, 1), 1, 'Array.prototype.reduce.call(child, callbackfn, 1)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-14.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-14.js index 3ed0c858f5..f21ee41e71 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-14.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-14.js @@ -9,13 +9,16 @@ description: > 'length' property doesn't exist ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; +} - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-17.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-17.js index 2d06363198..c53ac5820d 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-17.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-17.js @@ -9,13 +9,13 @@ description: > implements its own property get method ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 2); +} - var func = function (a, b) { - arguments[2] = 9; - return Array.prototype.reduce.call(arguments, callbackfn, 1); - }; +var func = function(a, b) { + arguments[2] = 9; + return Array.prototype.reduce.call(arguments, callbackfn, 1); +}; assert.sameValue(func(12, 11), true, 'func(12, 11)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-18.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-18.js index 6e50eadc58..43c4f960d1 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-18.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-18.js @@ -9,10 +9,10 @@ description: > its own property get method ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 3); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 3); +} - var str = new String("012"); +var str = new String("012"); assert.sameValue(Array.prototype.reduce.call(str, callbackfn, 1), true, 'Array.prototype.reduce.call(str, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-19.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-19.js index 5b9a2c1c8d..02eaafd2be 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-19.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-19.js @@ -9,15 +9,15 @@ description: > implements its own property get method ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 2); +} - var fun = function (a, b) { - return a + b; - }; - fun[0] = 12; - fun[1] = 11; - fun[2] = 9; +var fun = function(a, b) { + return a + b; +}; +fun[0] = 12; +fun[1] = 11; +fun[2] = 9; assert.sameValue(Array.prototype.reduce.call(fun, callbackfn, 1), true, 'Array.prototype.reduce.call(fun, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-2.js index 0770dea2b9..6b63af80a9 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-2.js @@ -7,8 +7,8 @@ es5id: 15.4.4.21-2-2 description: Array.prototype.reduce - 'length' is own data property on an Array ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 2); +} assert.sameValue([12, 11].reduce(callbackfn, 1), true, '[12, 11].reduce(callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-3.js index 7abfa8846f..ae2642759d 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-3.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-3.js @@ -9,19 +9,21 @@ description: > overrides an inherited data property on an Array-like object ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 2); +} - var proto = { length: 3 }; +var proto = { + length: 3 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 2; - child[0] = 12; - child[1] = 11; - child[2] = 9; +var child = new Con(); +child.length = 2; +child[0] = 12; +child[1] = 11; +child[2] = 9; assert.sameValue(Array.prototype.reduce.call(child, callbackfn, 1), true, 'Array.prototype.reduce.call(child, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-4.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-4.js index f1acd1884a..a2666931e9 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-4.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-4.js @@ -9,13 +9,13 @@ description: > overrides an inherited data property on an Array ---*/ - var storeProtoLength; +var storeProtoLength; - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 2); +} - storeProtoLength = Array.prototype.length; - Array.prototype.length = 0; +storeProtoLength = Array.prototype.length; +Array.prototype.length = 0; assert.sameValue([12, 11].reduce(callbackfn, 1), true, '[12, 11].reduce(callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-5.js index 2b000ba6a3..5e826cf741 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-5.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-5.js @@ -9,29 +9,29 @@ description: > an own data property that overrides an inherited accessor property ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 2); +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 3; - }, - configurable: true - }); +Object.defineProperty(proto, "length", { + get: function() { + return 3; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - Object.defineProperty(child, "length", { - value: 2, - configurable: true - }); - child[0] = 12; - child[1] = 11; - child[2] = 9; +var child = new Con(); +Object.defineProperty(child, "length", { + value: 2, + configurable: true +}); +child[0] = 12; +child[1] = 11; +child[2] = 9; assert.sameValue(Array.prototype.reduce.call(child, callbackfn, 1), true, 'Array.prototype.reduce.call(child, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-6.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-6.js index 9385b22433..9088ded910 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-6.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-6.js @@ -9,18 +9,20 @@ description: > an inherited data property ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 2); +} - var proto = { length: 2 }; +var proto = { + length: 2 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[0] = 12; - child[1] = 11; - child[2] = 9; +var child = new Con(); +child[0] = 12; +child[1] = 11; +child[2] = 9; assert.sameValue(Array.prototype.reduce.call(child, callbackfn, 1), true, 'Array.prototype.reduce.call(child, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-7.js index 1adfa3c8b0..2aea682c72 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-7.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-7.js @@ -9,21 +9,21 @@ description: > an own accessor property ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 2); +} - var obj = {}; +var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return 2; + }, + configurable: true +}); - obj[0] = 12; - obj[1] = 11; - obj[2] = 9; +obj[0] = 12; +obj[1] = 11; +obj[2] = 9; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-8.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-8.js index 2e76fa7392..6d95375356 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-8.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-8.js @@ -9,26 +9,28 @@ description: > an own accessor property that overrides an inherited data property ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 2); +} - var proto = { length: 3 }; +var proto = { + length: 3 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); +var child = new Con(); - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(child, "length", { + get: function() { + return 2; + }, + configurable: true +}); - child[0] = 12; - child[1] = 11; - child[2] = 9; +child[0] = 12; +child[1] = 11; +child[2] = 9; assert.sameValue(Array.prototype.reduce.call(child, callbackfn, 1), true, 'Array.prototype.reduce.call(child, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-9.js index 08ef5140b9..34b6ca18d1 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-9.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-9.js @@ -10,33 +10,33 @@ description: > property ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 2); +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 3; - }, - configurable: true - }); +Object.defineProperty(proto, "length", { + get: function() { + return 3; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); +var child = new Con(); - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(child, "length", { + get: function() { + return 2; + }, + configurable: true +}); - child[0] = 12; - child[1] = 11; - child[2] = 9; +child[0] = 12; +child[1] = 11; +child[2] = 9; assert.sameValue(Array.prototype.reduce.call(child, callbackfn, 1), true, 'Array.prototype.reduce.call(child, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-1.js index a7b0582268..1cd10992a6 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-1.js @@ -7,14 +7,18 @@ es5id: 15.4.4.21-3-1 description: Array.prototype.reduce - value of 'length' is undefined ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return 2; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return 2; +} - var obj = { 0: 0, 1: 1, length: undefined }; +var obj = { + 0: 0, + 1: 1, + length: undefined +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-10.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-10.js index a2c41a3035..982fd8965e 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-10.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-10.js @@ -9,14 +9,17 @@ description: > (value is NaN) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return 2; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return 2; +} - var obj = { 0: 9, length: NaN }; +var obj = { + 0: 9, + length: NaN +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-11.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-11.js index a5bbcd485d..01185212a1 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-11.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-11.js @@ -9,10 +9,14 @@ description: > positive number ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); +} - var obj = { 1: 11, 2: 9, length: "2" }; +var obj = { + 1: 11, + 2: 9, + length: "2" +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-12.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-12.js index ca3bbd9810..c1610fdf10 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-12.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-12.js @@ -9,10 +9,14 @@ description: > negative number ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); +} - var obj = { 1: 11, 2: 9, length: "-4294967294" }; +var obj = { + 1: 11, + 2: 9, + length: "-4294967294" +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-13.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-13.js index 4ab83fe8e0..77c594df48 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-13.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-13.js @@ -9,10 +9,14 @@ description: > number ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); +} - var obj = { 1: 11, 2: 9, length: "2.5" }; +var obj = { + 1: 11, + 2: 9, + length: "2.5" +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-14.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-14.js index 8feeae4a83..26bf70c04f 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-14.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-14.js @@ -7,14 +7,17 @@ es5id: 15.4.4.21-3-14 description: Array.prototype.reduce - 'length' is a string containing -Infinity ---*/ - var accessed2 = false; +var accessed2 = false; - function callbackfn2(prevVal, curVal, idx, obj) { - accessed2 = true; - return 2; - } +function callbackfn2(prevVal, curVal, idx, obj) { + accessed2 = true; + return 2; +} - var obj2 = { 0: 9, length: "-Infinity" }; +var obj2 = { + 0: 9, + length: "-Infinity" +}; assert.sameValue(Array.prototype.reduce.call(obj2, callbackfn2, 1), 1, 'Array.prototype.reduce.call(obj2, callbackfn2, 1)'); assert.sameValue(accessed2, false, 'accessed2'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-15.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-15.js index e17fd3d9e7..a467d5ba46 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-15.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-15.js @@ -9,10 +9,14 @@ description: > exponential number ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); +} - var obj = { 1: 11, 2: 9, length: "2E0" }; +var obj = { + 1: 11, + 2: 9, + length: "2E0" +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-16.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-16.js index ac8545db7b..c1e8c7a11d 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-16.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-16.js @@ -9,10 +9,14 @@ description: > number ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); +} - var obj = { 1: 11, 2: 9, length: "0x0002" }; +var obj = { + 1: 11, + 2: 9, + length: "0x0002" +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-17.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-17.js index 8671845291..683e3d900f 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-17.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-17.js @@ -9,10 +9,14 @@ description: > with leading zeros ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); +} - var obj = { 1: 11, 2: 9, length: "0002.00" }; +var obj = { + 1: 11, + 2: 9, + length: "0002.00" +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-18.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-18.js index d5705664f1..4b797136b2 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-18.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-18.js @@ -9,13 +9,17 @@ description: > convert to a number ---*/ - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return 2; - } +var accessed = false; - var obj = { 0: 9, length: "asdf!_" }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return 2; +} + +var obj = { + 0: 9, + length: "asdf!_" +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-19.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-19.js index 3cc7aac5ee..7d168f5e06 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-19.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-19.js @@ -9,18 +9,18 @@ description: > an own toString method ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); +} - var obj = { - 1: 11, - 2: 9, - length: { - toString: function () { - return '2'; - } - } - }; +var obj = { + 1: 11, + 2: 9, + length: { + toString: function() { + return '2'; + } + } +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-2.js index f4fc199e44..32492611fd 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-2.js @@ -9,10 +9,14 @@ description: > true) ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 0); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 0); +} - var obj = { 0: 11, 1: 9, length: true }; +var obj = { + 0: 11, + 1: 9, + length: true +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-20.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-20.js index b15ff9a1d0..32f5200bcd 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-20.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-20.js @@ -9,18 +9,18 @@ description: > an own valueOf method ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); +} - var obj = { - 1: 11, - 2: 9, - length: { - valueOf: function () { - return 2; - } - } - }; +var obj = { + 1: 11, + 2: 9, + length: { + valueOf: function() { + return 2; + } + } +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-21.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-21.js index 1188ac3efd..9470d76796 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-21.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-21.js @@ -10,27 +10,27 @@ description: > returns a string ---*/ - var valueOfOccured = false; - var toStringOccured = false; +var valueOfOccured = false; +var toStringOccured = false; - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); +} - var obj = { - 1: 11, - 2: 9, - length: { - valueOf: function () { - valueOfOccured = true; - return {}; - }, - toString: function () { - toStringOccured = true; - return '2'; - } - } - }; +var obj = { + 1: 11, + 2: 9, + length: { + valueOf: function() { + valueOfOccured = true; + return {}; + }, + toString: function() { + toStringOccured = true; + return '2'; + } + } +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); assert(valueOfOccured, 'valueOfOccured !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-22.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-22.js index 63fca1bd38..b7d4a852c0 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-22.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-22.js @@ -10,32 +10,32 @@ description: > primitive values ---*/ - var accessed = false; - var valueOfAccessed = false; - var toStringAccessed = false; +var accessed = false; +var valueOfAccessed = false; +var toStringAccessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return true; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return true; +} - var obj = { - 1: 11, - 2: 12, +var obj = { + 1: 11, + 2: 12, - length: { - valueOf: function () { - valueOfAccessed = true; - return {}; - }, - toString: function () { - toStringAccessed = true; - return {}; - } - } - }; + length: { + valueOf: function() { + valueOfAccessed = true; + return {}; + }, + toString: function() { + toStringAccessed = true; + return {}; + } + } +}; assert.throws(TypeError, function() { - Array.prototype.reduce.call(obj, callbackfn, 1); + Array.prototype.reduce.call(obj, callbackfn, 1); }); assert.sameValue(accessed, false, 'accessed'); assert(toStringAccessed, 'toStringAccessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-23.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-23.js index d48e58c909..c281ba361e 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-23.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-23.js @@ -9,35 +9,35 @@ description: > an object with an own toString and inherited valueOf methods ---*/ - var valueOfAccessed = false; - var toStringAccessed = false; +var valueOfAccessed = false; +var toStringAccessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); +} - var proto = { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - }; +var proto = { + valueOf: function() { + valueOfAccessed = true; + return 2; + } +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); +var child = new Con(); - child.toString = function () { - toStringAccessed = true; - return '1'; - }; +child.toString = function() { + toStringAccessed = true; + return '1'; +}; - var obj = { - 1: 11, - 2: 9, - length: child - }; +var obj = { + 1: 11, + 2: 9, + length: child +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); assert(valueOfAccessed, 'valueOfAccessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-24.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-24.js index 48c4ede3ca..c3e969f575 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-24.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-24.js @@ -9,14 +9,14 @@ description: > non-integer, ensure truncation occurs in the proper direction ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); +} - var obj = { - 1: 11, - 2: 9, - length: 2.685 - }; +var obj = { + 1: 11, + 2: 9, + length: 2.685 +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-25.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-25.js index 352c988a0a..5a8f54239c 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-25.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-25.js @@ -9,14 +9,14 @@ description: > non-integer ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); +} - var obj = { - 1: 11, - 2: 9, - length: -4294967294.5 - }; +var obj = { + 1: 11, + 2: 9, + length: -4294967294.5 +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-3.js index 89231153da..0fe83bd714 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-3.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-3.js @@ -7,14 +7,18 @@ es5id: 15.4.4.21-3-3 description: Array.prototype.reduce - value of 'length' is a number (value is 0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return 2; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return 2; +} - var obj = { 0: 1, 1: 1, length: 0 }; +var obj = { + 0: 1, + 1: 1, + length: 0 +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-4.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-4.js index 1c6e0d988a..864a0c1e52 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-4.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-4.js @@ -9,14 +9,17 @@ description: > +0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return 2; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return 2; +} - var obj = { 0: 11, length: +0 }; +var obj = { + 0: 11, + length: +0 +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-5.js index da3f4cf5f3..0a22d02a3e 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-5.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-5.js @@ -9,14 +9,17 @@ description: > -0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return 2; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return 2; +} - var obj = { 0: 11, length: -0 }; +var obj = { + 0: 11, + length: -0 +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-6.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-6.js index 1617a74935..fbee22d425 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-6.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-6.js @@ -9,10 +9,14 @@ description: > positive) ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); +} - var obj = { 1: 11, 2: 9, length: 2 }; +var obj = { + 1: 11, + 2: 9, + length: 2 +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-7.js index b8eb598714..b171abfd20 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-7.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-7.js @@ -9,10 +9,14 @@ description: > negative) ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); +} - var obj = { 1: 11, 2: 9, length: -4294967294 }; +var obj = { + 1: 11, + 2: 9, + length: -4294967294 +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-9.js index dc8cbfd8d6..33c8a72d32 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-9.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-9.js @@ -9,13 +9,16 @@ description: > -Infinity) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; +} - var obj = { 0: 9, length: -Infinity }; +var obj = { + 0: 9, + length: -Infinity +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-1.js index 565eec8bfd..ffc66baacf 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-1.js @@ -7,7 +7,7 @@ es5id: 15.4.4.21-4-1 description: Array.prototype.reduce throws TypeError if callbackfn is undefined ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.reduce(); + arr.reduce(); }); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-10.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-10.js index b37a75ea80..5592d22dc8 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-10.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-10.js @@ -9,15 +9,18 @@ description: > was thrown by step 2 ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - Object.defineProperty(obj, "length", { - get: function () { - throw new Test262Error(); - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + throw new Test262Error(); + }, + configurable: true +}); assert.throws(Test262Error, function() { - Array.prototype.reduce.call(obj, undefined); + Array.prototype.reduce.call(obj, undefined); }); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-11.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-11.js index c3a4398988..a9993c2395 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-11.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-11.js @@ -9,19 +9,22 @@ description: > was thrown by step 3 ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - throw new Test262Error(); - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + toString: function() { + throw new Test262Error(); + } + }; + }, + configurable: true +}); assert.throws(Test262Error, function() { - Array.prototype.reduce.call(obj, undefined); + Array.prototype.reduce.call(obj, undefined); }); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-12.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-12.js index 087ba33ec4..3911228646 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-12.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-12.js @@ -7,11 +7,12 @@ es5id: 15.4.4.21-4-12 description: Array.prototype.reduce - 'callbackfn' is a function ---*/ - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return curVal > 10; - } +var accessed = false; + +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return curVal > 10; +} assert.sameValue([11, 9].reduce(callbackfn, 1), false, '[11, 9].reduce(callbackfn, 1)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-15.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-15.js index 509aeb6182..7072a1d2c0 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-15.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-15.js @@ -9,27 +9,29 @@ description: > passing undefined for callbackfn ---*/ - var obj = { 10: 10 }; - var lengthAccessed = false; - var loopAccessed = false; +var obj = { + 10: 10 +}; +var lengthAccessed = false; +var loopAccessed = false; - Object.defineProperty(obj, "length", { - get: function () { - lengthAccessed = true; - return 20; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + lengthAccessed = true; + return 20; + }, + configurable: true +}); - Object.defineProperty(obj, "0", { - get: function () { - loopAccessed = true; - return 10; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + loopAccessed = true; + return 10; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.reduce.call(obj); + Array.prototype.reduce.call(obj); }); assert(lengthAccessed, 'lengthAccessed !== true'); assert.sameValue(loopAccessed, false, 'loopAccessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-2.js index bc24e2d621..a510f11e1a 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-2.js @@ -9,7 +9,7 @@ description: > unreferenced ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(ReferenceError, function() { - arr.reduce(foo); + arr.reduce(foo); }); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-3.js index 8f1bbae3a4..c980003a34 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-3.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-3.js @@ -7,7 +7,7 @@ es5id: 15.4.4.21-4-3 description: Array.prototype.reduce throws TypeError if callbackfn is null ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.reduce(null); + arr.reduce(null); }); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-4.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-4.js index f562ac79ff..f86249342b 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-4.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-4.js @@ -7,7 +7,7 @@ es5id: 15.4.4.21-4-4 description: Array.prototype.reduce throws TypeError if callbackfn is boolean ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.reduce(true); + arr.reduce(true); }); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-5.js index a17c110efd..19ea080d09 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-5.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-5.js @@ -7,7 +7,7 @@ es5id: 15.4.4.21-4-5 description: Array.prototype.reduce throws TypeError if callbackfn is number ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.reduce(5); + arr.reduce(5); }); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-6.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-6.js index 7a815eddc2..10d80e6651 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-6.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-6.js @@ -7,7 +7,7 @@ es5id: 15.4.4.21-4-6 description: Array.prototype.reduce throws TypeError if callbackfn is string ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.reduce("abc"); + arr.reduce("abc"); }); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-7.js index 57281c17c9..5f5bb65167 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-7.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-7.js @@ -9,7 +9,7 @@ description: > without [[Call]] internal method ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.reduce(new Object()); + arr.reduce(new Object()); }); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-8.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-8.js index 07e01936b1..da9ba950c6 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-8.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-8.js @@ -9,18 +9,21 @@ description: > visible when an exception occurs ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - var accessed = false; +var accessed = false; - Object.defineProperty(obj, "length", { - get: function () { - accessed = true; - return 2; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + accessed = true; + return 2; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.reduce.call(obj, null); + Array.prototype.reduce.call(obj, null); }); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-9.js index 31738344a2..b0e48b6282 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-9.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-9.js @@ -9,22 +9,25 @@ description: > visible when an exception occurs ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - var accessed = false; +var accessed = false; - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - accessed = true; - return "2"; - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + toString: function() { + accessed = true; + return "2"; + } + }; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.reduce.call(obj, null); + Array.prototype.reduce.call(obj, null); }); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-1.js index ebf1d03649..ca6c540346 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-1.js @@ -9,7 +9,7 @@ description: > array), no initVal ---*/ - function cb(){} +function cb() {} assert.throws(TypeError, function() { - [].reduce(cb); + [].reduce(cb); }); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-10.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-10.js index 457d6114db..2d392481ce 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-10.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-10.js @@ -9,22 +9,25 @@ description: > side-effects that might be produced by step 2 ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal > 10); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (curVal > 10); +} - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - var accessed = false; +var accessed = false; - Object.defineProperty(obj, "length", { - get: function () { - accessed = true; - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + accessed = true; + return 0; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.reduce.call(obj, callbackfn); + Array.prototype.reduce.call(obj, callbackfn); }); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-11.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-11.js index 604a91c147..8b63d3e3e1 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-11.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-11.js @@ -9,26 +9,29 @@ description: > any side-effects that might be produced by step 3 ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal > 10); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (curVal > 10); +} - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - var accessed = false; +var accessed = false; - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - accessed = true; - return "0"; - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + toString: function() { + accessed = true; + return "0"; + } + }; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.reduce.call(obj, callbackfn); + Array.prototype.reduce.call(obj, callbackfn); }); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-12.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-12.js index 57209d338e..8cdeb3b4c8 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-12.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-12.js @@ -9,19 +9,22 @@ description: > was thrown by step 2 ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal > 10); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (curVal > 10); +} - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - Object.defineProperty(obj, "length", { - get: function () { - throw new Test262Error(); - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + throw new Test262Error(); + }, + configurable: true +}); assert.throws(Test262Error, function() { - Array.prototype.reduce.call(obj, callbackfn); + Array.prototype.reduce.call(obj, callbackfn); }); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-13.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-13.js index 297d0d481c..3285912c3c 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-13.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-13.js @@ -9,23 +9,26 @@ description: > was thrown by step 3 ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal > 10); - } +function callbackfn(prevVal, curVal, idx, obj) { + return (curVal > 10); +} - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - throw new Test262Error(); - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + toString: function() { + throw new Test262Error(); + } + }; + }, + configurable: true +}); assert.throws(Test262Error, function() { - Array.prototype.reduce.call(obj, callbackfn); + Array.prototype.reduce.call(obj, callbackfn); }); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-2.js index c3ff294e2f..ac61503048 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-2.js @@ -10,12 +10,13 @@ description: > no initVal ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = null; +foo.prototype = new Array(1, 2, 3); - function cb(){} +function foo() {} +var f = new foo(); +f.length = null; + +function cb() {} assert.throws(TypeError, function() { - f.reduce(cb); + f.reduce(cb); }); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-3.js index b0b9d00602..1fb61ac829 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-3.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-3.js @@ -10,12 +10,13 @@ description: > no initVal ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = false; +foo.prototype = new Array(1, 2, 3); - function cb(){} +function foo() {} +var f = new foo(); +f.length = false; + +function cb() {} assert.throws(TypeError, function() { - f.reduce(cb); + f.reduce(cb); }); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-4.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-4.js index c452e0f55b..a68dd49343 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-4.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-4.js @@ -10,12 +10,13 @@ description: > initVal ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 0; +foo.prototype = new Array(1, 2, 3); - function cb(){} +function foo() {} +var f = new foo(); +f.length = 0; + +function cb() {} assert.throws(TypeError, function() { - f.reduce(cb); + f.reduce(cb); }); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-5.js index 287cae3609..0717a9eddc 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-5.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-5.js @@ -10,12 +10,13 @@ description: > initVal ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = '0'; +foo.prototype = new Array(1, 2, 3); - function cb(){} +function foo() {} +var f = new foo(); +f.length = '0'; + +function cb() {} assert.throws(TypeError, function() { - f.reduce(cb); + f.reduce(cb); }); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-6.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-6.js index aba39d0b1a..4a935d9a75 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-6.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-6.js @@ -10,14 +10,19 @@ description: > initVal ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - var o = { valueOf: function () { return 0;}}; - f.length = o; +function foo() {} +var f = new foo(); - function cb(){} +var o = { + valueOf: function() { + return 0; + } +}; +f.length = o; + +function cb() {} assert.throws(TypeError, function() { - f.reduce(cb); + f.reduce(cb); }); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-7.js index 13e218f2c2..faede22226 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-7.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-7.js @@ -10,20 +10,25 @@ description: > (toString)), no initVal ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - var o = { toString: function () { return '0';}}; - f.length = o; +function foo() {} +var f = new foo(); - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. +var o = { + toString: function() { + return '0'; + } +}; +f.length = o; - function cb(){} +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. + +function cb() {} assert.throws(TypeError, function() { - f.reduce(cb); + f.reduce(cb); }); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-8.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-8.js index 9d932b3710..ddf3cbf524 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-8.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-8.js @@ -9,27 +9,28 @@ description: > (subclassed Array, length overridden with []), no initVal ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - f.length = []; +function foo() {} +var f = new foo(); - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. +f.length = []; - function cb(){} +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. +// +// The toString( ) method on Array converts the array elements to strings, +// then returns the result of concatenating these strings, with commas in +// between. An array with no elements converts to the empty string, which +// converts to the number 0. If an array has a single element that is a +// number n, the array converts to a string representation of n, which is +// then converted back to n itself. If an array contains more than one element, +// or if its one element is not a number, the array converts to NaN. + +function cb() {} assert.throws(TypeError, function() { - f.reduce(cb); + f.reduce(cb); }); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-9.js index edbcb465fa..8df0ed8c93 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-9.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-9.js @@ -9,10 +9,11 @@ description: > and 'initialValue' is present ---*/ - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } +var accessed = false; + +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; +} assert.sameValue([].reduce(callbackfn, 3), 3, '[].reduce(callbackfn, 3)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-1.js index db603f9524..785c4e32f9 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-1.js @@ -9,5 +9,5 @@ description: > initialValue is present (empty array) ---*/ - function cb(){} -assert.sameValue([].reduce(cb,1), 1, '[].reduce(cb,1)'); +function cb() {} +assert.sameValue([].reduce(cb, 1), 1, '[].reduce(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-10.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-10.js index f86e9806f9..a03752192d 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-10.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-10.js @@ -7,6 +7,6 @@ es5id: 15.4.4.21-7-10 description: Array.prototype.reduce - 'initialValue' is present ---*/ - var str = "initialValue is present"; +var str = "initialValue is present"; -assert.sameValue([].reduce(function () { }, str), str, '[].reduce(function () { }, str)'); +assert.sameValue([].reduce(function() {}, str), str, '[].reduce(function () { }, str)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-11.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-11.js index 619bb2d271..7c2dd91ff3 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-11.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-11.js @@ -7,6 +7,6 @@ es5id: 15.4.4.21-7-11 description: Array.prototype.reduce - 'initialValue' is not present ---*/ - var str = "initialValue is not present"; +var str = "initialValue is not present"; -assert.sameValue([str].reduce(function () { }), str, '[str].reduce(function () { })'); +assert.sameValue([str].reduce(function() {}), str, '[str].reduce(function () { })'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-2.js index 27ddd16b04..7c227878ce 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-2.js @@ -10,10 +10,11 @@ description: > null (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = null; +foo.prototype = new Array(1, 2, 3); - function cb(){} -assert.sameValue(f.reduce(cb,1), 1, 'f.reduce(cb,1)'); +function foo() {} +var f = new foo(); +f.length = null; + +function cb() {} +assert.sameValue(f.reduce(cb, 1), 1, 'f.reduce(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-3.js index eed2c040f4..525f769e3e 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-3.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-3.js @@ -10,10 +10,11 @@ description: > false (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = false; +foo.prototype = new Array(1, 2, 3); - function cb(){} -assert.sameValue(f.reduce(cb,1), 1, 'f.reduce(cb,1)'); +function foo() {} +var f = new foo(); +f.length = false; + +function cb() {} +assert.sameValue(f.reduce(cb, 1), 1, 'f.reduce(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-4.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-4.js index 4fb6146f13..fed398c8e1 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-4.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-4.js @@ -10,10 +10,11 @@ description: > (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 0; +foo.prototype = new Array(1, 2, 3); - function cb(){} -assert.sameValue(f.reduce(cb,1), 1, 'f.reduce(cb,1)'); +function foo() {} +var f = new foo(); +f.length = 0; + +function cb() {} +assert.sameValue(f.reduce(cb, 1), 1, 'f.reduce(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-5.js index 4a6d8d59e4..8634d03a64 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-5.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-5.js @@ -10,10 +10,11 @@ description: > '0' (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = '0'; +foo.prototype = new Array(1, 2, 3); - function cb(){} -assert.sameValue(f.reduce(cb,1), 1, 'f.reduce(cb,1)'); +function foo() {} +var f = new foo(); +f.length = '0'; + +function cb() {} +assert.sameValue(f.reduce(cb, 1), 1, 'f.reduce(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-6.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-6.js index 2c2174482f..33c22e6e73 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-6.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-6.js @@ -10,12 +10,17 @@ description: > obj with valueOf) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - var o = { valueOf: function () { return 0;}}; - f.length = o; +function foo() {} +var f = new foo(); - function cb(){} -assert.sameValue(f.reduce(cb,1), 1, 'f.reduce(cb,1)'); +var o = { + valueOf: function() { + return 0; + } +}; +f.length = o; + +function cb() {} +assert.sameValue(f.reduce(cb, 1), 1, 'f.reduce(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-7.js index 3d7783369a..db7132e8a8 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-7.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-7.js @@ -10,18 +10,23 @@ description: > obj w/o valueOf (toString)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - var o = { toString: function () { return '0';}}; - f.length = o; +function foo() {} +var f = new foo(); - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. +var o = { + toString: function() { + return '0'; + } +}; +f.length = o; - function cb(){} -assert.sameValue(f.reduce(cb,1), 1, 'f.reduce(cb,1)'); +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. + +function cb() {} +assert.sameValue(f.reduce(cb, 1), 1, 'f.reduce(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-8.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-8.js index 430c58cd15..8ddc5cd6f2 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-8.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-8.js @@ -10,25 +10,26 @@ description: > []) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - f.length = []; +function foo() {} +var f = new foo(); - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. +f.length = []; - function cb(){} -assert.sameValue(f.reduce(cb,1), 1, 'f.reduce(cb,1)'); +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. +// +// The toString( ) method on Array converts the array elements to strings, +// then returns the result of concatenating these strings, with commas in +// between. An array with no elements converts to the empty string, which +// converts to the number 0. If an array has a single element that is a +// number n, the array converts to a string representation of n, which is +// then converted back to n itself. If an array contains more than one element, +// or if its one element is not a number, the array converts to NaN. + +function cb() {} +assert.sameValue(f.reduce(cb, 1), 1, 'f.reduce(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-9.js index 744659f51c..4f9f86265a 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-9.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-9.js @@ -10,25 +10,26 @@ description: > [0]) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - f.length = [0]; +function foo() {} +var f = new foo(); - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. +f.length = [0]; - function cb(){} -assert.sameValue(f.reduce(cb,1), 1, 'f.reduce(cb,1)'); +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. +// +// The toString( ) method on Array converts the array elements to strings, +// then returns the result of concatenating these strings, with commas in +// between. An array with no elements converts to the empty string, which +// converts to the number 0. If an array has a single element that is a +// number n, the array converts to a string representation of n, which is +// then converted back to n itself. If an array contains more than one element, +// or if its one element is not a number, the array converts to NaN. + +function cb() {} +assert.sameValue(f.reduce(cb, 1), 1, 'f.reduce(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-1.js index d0650cfc47..af872fd925 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-1.js @@ -7,20 +7,22 @@ es5id: 15.4.4.21-8-b-1 description: Array.prototype.reduce - no observable effects occur if 'len' is 0 ---*/ - var accessed = false; +var accessed = false; - var obj = { length: 0 }; +var obj = { + length: 0 +}; - Object.defineProperty(obj, "0", { - get: function () { - accessed = true; - return 10; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + accessed = true; + return 10; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.reduce.call(obj, function () { }); + Array.prototype.reduce.call(obj, function() {}); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-2.js index 84a6d4181a..a3796550a8 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-2.js @@ -9,18 +9,22 @@ description: > number of iterations in step 9 ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - return idx; - } +function callbackfn(prevVal, curVal, idx, obj) { + return idx; +} - var obj = { 3: 12, 4: 9, length: 4 }; +var obj = { + 3: 12, + 4: 9, + length: 4 +}; - Object.defineProperty(obj, "2", { - get: function () { - obj.length = 10; - return 11; - }, - configurable: true - }); +Object.defineProperty(obj, "2", { + get: function() { + obj.length = 10; + return 11; + }, + configurable: true +}); assert.sameValue(Array.prototype.reduce.call(obj, callbackfn), 3, 'Array.prototype.reduce.call(obj, callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-3.js index 95062f4621..03fd27c09d 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-3.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-3.js @@ -7,37 +7,37 @@ es5id: 15.4.4.21-8-b-3 description: Array.prototype.reduce - loop is broken once 'kPresent' is true ---*/ - var called = 0; - var testResult = false; - var firstCalled = 0; - var secondCalled = 0; +var called = 0; +var testResult = false; +var firstCalled = 0; +var secondCalled = 0; - function callbackfn(prevVal, val, idx, obj) { - if (called === 0) { - testResult = (idx === 1); - } - called++; - } +function callbackfn(prevVal, val, idx, obj) { + if (called === 0) { + testResult = (idx === 1); + } + called++; +} - var arr = [, , ]; +var arr = [, , ]; - Object.defineProperty(arr, "0", { - get: function () { - firstCalled++; - return 11; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + firstCalled++; + return 11; + }, + configurable: true +}); - Object.defineProperty(arr, "1", { - get: function () { - secondCalled++; - return 9; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + secondCalled++; + return 9; + }, + configurable: true +}); - arr.reduce(callbackfn); +arr.reduce(callbackfn); assert(testResult, 'testResult !== true'); assert.sameValue(firstCalled, 1, 'firstCalled'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-ii-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-ii-1.js index f2369b4321..15b0dc2a04 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-ii-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-ii-1.js @@ -9,14 +9,14 @@ description: > here ---*/ - var obj = { }; +var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - obj[1] = "accumulator"; - return 3; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + obj[1] = "accumulator"; + return 3; + }, + configurable: true +}); -assert.sameValue(Array.prototype.reduce.call(obj, function () { }), "accumulator", 'Array.prototype.reduce.call(obj, function () { })'); +assert.sameValue(Array.prototype.reduce.call(obj, function() {}), "accumulator", 'Array.prototype.reduce.call(obj, function () { })'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-ii-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-ii-2.js index 12c5e2fddf..9c51a152a7 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-ii-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-ii-2.js @@ -9,14 +9,17 @@ description: > here ---*/ - var obj = { 1: "accumulator", 2: "another" }; +var obj = { + 1: "accumulator", + 2: "another" +}; - Object.defineProperty(obj, "length", { - get: function () { - delete obj[1]; - return 3; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + delete obj[1]; + return 3; + }, + configurable: true +}); -assert.notSameValue(Array.prototype.reduce.call(obj, function () { }), "accumulator", 'Array.prototype.reduce.call(obj, function () { })'); +assert.notSameValue(Array.prototype.reduce.call(obj, function() {}), "accumulator", 'Array.prototype.reduce.call(obj, function () { })'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-1.js index fbba69c12c..eff2f84cf7 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-1.js @@ -9,14 +9,20 @@ description: > property on an Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 0); - } - } +var testResult = false; - var obj = { 0: 0, 1: 1, 2: 2, length: 2 }; - Array.prototype.reduce.call(obj, callbackfn); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 0); + } +} + +var obj = { + 0: 0, + 1: 1, + 2: 2, + length: 2 +}; +Array.prototype.reduce.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-10.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-10.js index 67b7b3f57b..c3e9f4b4b4 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-10.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-10.js @@ -9,23 +9,23 @@ description: > accessor property on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 0); - } - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 0); + } +} - var arr = [, 1, 2]; +var arr = [, 1, 2]; - Object.defineProperty(arr, "0", { - get: function () { - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + return 0; + }, + configurable: true +}); - arr.reduce(callbackfn); +arr.reduce(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-11.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-11.js index e1f08e697d..e5c7a7b977 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-11.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-11.js @@ -10,28 +10,33 @@ description: > Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "9"); - } - } +var testResult = false; - var proto = { 0: 0, 1: 1, 2: 2 }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "9"); + } +} - var Con = function () { }; - Con.prototype = proto; +var proto = { + 0: 0, + 1: 1, + 2: 2 +}; - var child = new Con(); - child.length = 3; +var Con = function() {}; +Con.prototype = proto; - Object.defineProperty(child, "0", { - get: function () { - return "9"; - }, - configurable: true - }); +var child = new Con(); +child.length = 3; - Array.prototype.reduce.call(child, callbackfn); +Object.defineProperty(child, "0", { + get: function() { + return "9"; + }, + configurable: true +}); + +Array.prototype.reduce.call(child, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-12.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-12.js index 9d9b802d09..79eba49451 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-12.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-12.js @@ -9,24 +9,24 @@ description: > property that overrides an inherited data property on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "9"); - } - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "9"); + } +} - Array.prototype[0] = 0; - var arr = [, 1, 2]; +Array.prototype[0] = 0; +var arr = [, 1, 2]; - Object.defineProperty(arr, "0", { - get: function () { - return "9"; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + return "9"; + }, + configurable: true +}); - arr.reduce(callbackfn); +arr.reduce(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-13.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-13.js index 00f0210ab2..62d5da4b47 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-13.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-13.js @@ -10,36 +10,39 @@ description: > Array-like object ---*/ - var testResult = false; +var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "9"); - } - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "9"); + } +} - var proto = { 1: 1, 2: 2}; +var proto = { + 1: 1, + 2: 2 +}; - Object.defineProperty(proto, "0", { - get: function () { - return 0; - }, - configurable: true - }); +Object.defineProperty(proto, "0", { + get: function() { + return 0; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 3; +var child = new Con(); +child.length = 3; - Object.defineProperty(child, "0", { - get: function () { - return "9"; - }, - configurable: true - }); +Object.defineProperty(child, "0", { + get: function() { + return "9"; + }, + configurable: true +}); - Array.prototype.reduce.call(child, callbackfn); +Array.prototype.reduce.call(child, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-14.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-14.js index 77a1084be6..0b1781550f 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-14.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-14.js @@ -9,28 +9,29 @@ description: > property that overrides an inherited accessor property on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "9"); - } - } +var testResult = false; - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 0; - }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "9"); + } +} - var arr = [, 1, 2]; - Object.defineProperty(arr, "0", { - get: function () { - return "9"; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return 0; + }, + configurable: true +}); - arr.reduce(callbackfn); +var arr = [, 1, 2]; +Object.defineProperty(arr, "0", { + get: function() { + return "9"; + }, + configurable: true +}); + +arr.reduce(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-15.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-15.js index 5344feebd4..6e2cc64b9d 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-15.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-15.js @@ -9,28 +9,32 @@ description: > accessor property on an Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 0); - } - } +var testResult = false; - var proto = { 1: 1, 2: 2 }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 0); + } +} - Object.defineProperty(proto, "0", { - get: function () { - return 0; - }, - configurable: true - }); +var proto = { + 1: 1, + 2: 2 +}; - var Con = function () { }; - Con.prototype = proto; +Object.defineProperty(proto, "0", { + get: function() { + return 0; + }, + configurable: true +}); - var child = new Con(); - child.length = 3; +var Con = function() {}; +Con.prototype = proto; - Array.prototype.reduce.call(child, callbackfn); +var child = new Con(); +child.length = 3; + +Array.prototype.reduce.call(child, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-16.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-16.js index c941e4581f..2bfc2d804b 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-16.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-16.js @@ -9,22 +9,23 @@ description: > accessor property on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 0); - } - } +var testResult = false; - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 0; - }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 0); + } +} - var arr = [, 1, 2]; +Object.defineProperty(Array.prototype, "0", { + get: function() { + return 0; + }, + configurable: true +}); - arr.reduce(callbackfn); +var arr = [, 1, 2]; + +arr.reduce(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-17.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-17.js index a411f9467e..735d1c856e 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-17.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-17.js @@ -9,20 +9,25 @@ description: > property without a get function on an Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === undefined); - } - } +var testResult = false; - var obj = { 1: 1, 2: 2, length: 3 }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === undefined); + } +} - Object.defineProperty(obj, "0", { - set: function () { }, - configurable: true - }); +var obj = { + 1: 1, + 2: 2, + length: 3 +}; - Array.prototype.reduce.call(obj, callbackfn); +Object.defineProperty(obj, "0", { + set: function() {}, + configurable: true +}); + +Array.prototype.reduce.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-18.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-18.js index fbdfb97c81..5b2a3b2f78 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-18.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-18.js @@ -9,20 +9,21 @@ description: > property without a get function on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === undefined); - } - } +var testResult = false; - var arr = [, 1, 2]; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === undefined); + } +} - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); +var arr = [, 1, 2]; - arr.reduce(callbackfn); +Object.defineProperty(arr, "0", { + set: function() {}, + configurable: true +}); + +arr.reduce(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-19.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-19.js index 1611043a21..9178b85feb 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-19.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-19.js @@ -10,22 +10,27 @@ description: > accessor property on an Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === undefined); - } - } +var testResult = false; - Object.prototype[0] = 0; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === undefined); + } +} - var obj = { 1: 1, 2: 2, length: 3 }; +Object.prototype[0] = 0; - Object.defineProperty(obj, "0", { - set: function () { }, - configurable: true - }); +var obj = { + 1: 1, + 2: 2, + length: 3 +}; - Array.prototype.reduce.call(obj, callbackfn); +Object.defineProperty(obj, "0", { + set: function() {}, + configurable: true +}); + +Array.prototype.reduce.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-2.js index 06d593f567..f8ca72b6a0 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-2.js @@ -9,14 +9,15 @@ description: > property on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 0); - } - } +var testResult = false; - var arr = [0, 1, 2]; - arr.reduce(callbackfn); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 0); + } +} + +var arr = [0, 1, 2]; +arr.reduce(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-20.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-20.js index 2a313d786c..e4793560e2 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-20.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-20.js @@ -10,20 +10,21 @@ description: > accessor property on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === undefined); - } - } +var testResult = false; - Array.prototype[0] = 0; - var arr = [, 1, 2]; - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === undefined); + } +} - arr.reduce(callbackfn); +Array.prototype[0] = 0; +var arr = [, 1, 2]; +Object.defineProperty(arr, "0", { + set: function() {}, + configurable: true +}); + +arr.reduce(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-21.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-21.js index d057b59b27..47a9a843b8 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-21.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-21.js @@ -9,26 +9,30 @@ description: > accessor property without a get function on an Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === undefined); - } - } +var testResult = false; - var proto = { 1: 1, 2: 2 }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === undefined); + } +} - Object.defineProperty(proto, "0", { - set: function () { }, - configurable: true - }); +var proto = { + 1: 1, + 2: 2 +}; - var Con = function () { }; - Con.prototype = proto; +Object.defineProperty(proto, "0", { + set: function() {}, + configurable: true +}); - var child = new Con(); - child.length = 3; +var Con = function() {}; +Con.prototype = proto; - Array.prototype.reduce.call(child, callbackfn); +var child = new Con(); +child.length = 3; + +Array.prototype.reduce.call(child, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-22.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-22.js index f7d6f961cd..dc05e78606 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-22.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-22.js @@ -9,20 +9,21 @@ description: > accessor property without a get function on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === undefined); - } - } +var testResult = false; - Object.defineProperty(Array.prototype, "0", { - set: function () { }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === undefined); + } +} - var arr = [, 1, 2]; +Object.defineProperty(Array.prototype, "0", { + set: function() {}, + configurable: true +}); - arr.reduce(callbackfn); +var arr = [, 1, 2]; + +arr.reduce(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-25.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-25.js index 2022366450..451955fccd 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-25.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-25.js @@ -10,17 +10,18 @@ description: > less than number of parameters) ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 0); - } - } +var testResult = false; - var func = function (a, b, c) { - Array.prototype.reduce.call(arguments, callbackfn); - }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 0); + } +} - func(0, 1); +var func = function(a, b, c) { + Array.prototype.reduce.call(arguments, callbackfn); +}; + +func(0, 1); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-26.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-26.js index 887f263153..eef4cdd6ee 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-26.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-26.js @@ -10,18 +10,19 @@ description: > number of parameters) ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 2) { - testResult = (prevVal === 1); - } - } +var testResult = false; - var func = function (a, b, c) { - delete arguments[0]; - Array.prototype.reduce.call(arguments, callbackfn); - }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 2) { + testResult = (prevVal === 1); + } +} - func(0, 1, 2); +var func = function(a, b, c) { + delete arguments[0]; + Array.prototype.reduce.call(arguments, callbackfn); +}; + +func(0, 1, 2); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-27.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-27.js index 3f591f26ec..fc4013d2db 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-27.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-27.js @@ -10,19 +10,20 @@ description: > greater than number of parameters) ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 3) { - testResult = (prevVal === 2); - } - } +var testResult = false; - var func = function (a, b, c) { - delete arguments[0]; - delete arguments[1]; - Array.prototype.reduce.call(arguments, callbackfn); - }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 3) { + testResult = (prevVal === 2); + } +} - func(0, 1, 2, 3); +var func = function(a, b, c) { + delete arguments[0]; + delete arguments[1]; + Array.prototype.reduce.call(arguments, callbackfn); +}; + +func(0, 1, 2, 3); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-28.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-28.js index 2a96496aa5..1c429e4c7b 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-28.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-28.js @@ -9,14 +9,15 @@ description: > implements its own property get method ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "0"); - } - } +var testResult = false; - var str = new String("012"); - Array.prototype.reduce.call(str, callbackfn); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "0"); + } +} + +var str = new String("012"); +Array.prototype.reduce.call(str, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-29.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-29.js index 8f5e18db73..0fe7328fee 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-29.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-29.js @@ -9,21 +9,22 @@ description: > implements its own property get method ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 0); - } - } +var testResult = false; - var obj = function (a, b, c) { - return a + b + c; - }; - obj[0] = 0; - obj[1] = 1; - obj[2] = 2; - obj[3] = 3; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 0); + } +} - Array.prototype.reduce.call(obj, callbackfn); +var obj = function(a, b, c) { + return a + b + c; +}; +obj[0] = 0; +obj[1] = 1; +obj[2] = 2; +obj[3] = 3; + +Array.prototype.reduce.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-3.js index d77985dd3f..15298bc3ef 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-3.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-3.js @@ -10,22 +10,28 @@ description: > Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "9"); - } - } +var testResult = false; - var proto = { 0: 0, 1: 1, 2: 2, length: 3 }; - var Con = function () { }; - Con.prototype = proto; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "9"); + } +} - var child = new Con(); - child[0] = "9"; - child[1] = "1"; - child.length = 3; +var proto = { + 0: 0, + 1: 1, + 2: 2, + length: 3 +}; +var Con = function() {}; +Con.prototype = proto; - Array.prototype.reduce.call(child, callbackfn); +var child = new Con(); +child[0] = "9"; +child[1] = "1"; +child.length = 3; + +Array.prototype.reduce.call(child, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-30.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-30.js index c307ddda90..45f396f05c 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-30.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-30.js @@ -9,35 +9,36 @@ description: > iterations is observed in subsequent iterations on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; - var arr = [, , 2]; - var preIterVisible = false; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} - Object.defineProperty(arr, "0", { - get: function () { - preIterVisible = true; - return 0; - }, - configurable: true - }); +var arr = [, , 2]; +var preIterVisible = false; - Object.defineProperty(arr, "1", { - get: function () { - if (preIterVisible) { - return 1; - } else { - return 100; - } - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + preIterVisible = true; + return 0; + }, + configurable: true +}); - arr.reduce(callbackfn); +Object.defineProperty(arr, "1", { + get: function() { + if (preIterVisible) { + return 1; + } else { + return 100; + } + }, + configurable: true +}); + +arr.reduce(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-31.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-31.js index e035ae8e4a..70282ce37e 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-31.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-31.js @@ -10,35 +10,38 @@ description: > object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; - var obj = { length: 2 }; - var preIterVisible = false; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} - Object.defineProperty(obj, "0", { - get: function () { - preIterVisible = true; - return 0; - }, - configurable: true - }); +var obj = { + length: 2 +}; +var preIterVisible = false; - Object.defineProperty(obj, "1", { - get: function () { - if (preIterVisible) { - return 1; - } else { - return 100; - } - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + preIterVisible = true; + return 0; + }, + configurable: true +}); - Array.prototype.reduce.call(obj, callbackfn); +Object.defineProperty(obj, "1", { + get: function() { + if (preIterVisible) { + return 1; + } else { + return 100; + } + }, + configurable: true +}); + +Array.prototype.reduce.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-32.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-32.js index 1324085437..50002a64e3 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-32.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-32.js @@ -9,24 +9,29 @@ description: > on an Array-like object ---*/ - var accessed = false; - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx >= 1) { - accessed = true; - testResult = (prevVal === 0); - } - } +var accessed = false; +var testResult = false; - var obj = { 2: 2, 1: 1, length: 3 }; - Object.defineProperty(obj, "0", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx >= 1) { + accessed = true; + testResult = (prevVal === 0); + } +} + +var obj = { + 2: 2, + 1: 1, + length: 3 +}; +Object.defineProperty(obj, "0", { + get: function() { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true +}); assert.throws(RangeError, function() { - Array.prototype.reduce.call(obj, callbackfn); + Array.prototype.reduce.call(obj, callbackfn); }); assert.sameValue(accessed, false, 'accessed'); assert.sameValue(testResult, false, 'testResult'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-33.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-33.js index be7c29e8be..9f00cb900f 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-33.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-33.js @@ -9,25 +9,26 @@ description: > on an Array ---*/ - var accessed = false; - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx >= 1) { - accessed = true; - testResult = (prevVal === 0); - } - } +var accessed = false; +var testResult = false; - var arr = [, 1, 2]; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx >= 1) { + accessed = true; + testResult = (prevVal === 0); + } +} - Object.defineProperty(arr, "0", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); +var arr = [, 1, 2]; + +Object.defineProperty(arr, "0", { + get: function() { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true +}); assert.throws(RangeError, function() { - arr.reduce(callbackfn); + arr.reduce(callbackfn); }); assert.sameValue(accessed, false, 'accessed'); assert.sameValue(testResult, false, 'testResult'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-4.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-4.js index 26118b58f1..72a46d6c81 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-4.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-4.js @@ -9,14 +9,15 @@ description: > property that overrides an inherited data property on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 0); - } - } +var testResult = false; - Array.prototype[0] = "9"; - [0, 1, 2].reduce(callbackfn); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 0); + } +} + +Array.prototype[0] = "9"; +[0, 1, 2].reduce(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-5.js index 0c9aeb7b8a..17c7e51c65 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-5.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-5.js @@ -10,33 +10,34 @@ description: > Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "9"); - } - } +var testResult = false; - var proto = {}; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "9"); + } +} - Object.defineProperty(proto, "0", { - get: function () { - return 0; - }, - configurable: true - }); +var proto = {}; - var Con = function () { }; - Con.prototype = proto; +Object.defineProperty(proto, "0", { + get: function() { + return 0; + }, + configurable: true +}); - var child = new Con(); - child.length = 2; - Object.defineProperty(child, "0", { - value: "9", - configurable: true - }); - child[1] = "1"; +var Con = function() {}; +Con.prototype = proto; - Array.prototype.reduce.call(child, callbackfn); +var child = new Con(); +child.length = 2; +Object.defineProperty(child, "0", { + value: "9", + configurable: true +}); +child[1] = "1"; + +Array.prototype.reduce.call(child, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-6.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-6.js index 22b4af3ec5..2b0f847da4 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-6.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-6.js @@ -9,20 +9,21 @@ description: > property that overrides an inherited accessor property on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 0); - } - } +var testResult = false; - Object.defineProperty(Array.prototype, "0", { - get: function () { - return "5"; - }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 0); + } +} - [0, 1, 2].reduce(callbackfn); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return "5"; + }, + configurable: true +}); + +[0, 1, 2].reduce(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-7.js index 6eaf1bac18..24fa5654ce 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-7.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-7.js @@ -9,20 +9,26 @@ description: > property on an Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 0); - } - } +var testResult = false; - var proto = { 0: 0, 1: 1, 2: 2, length: 3 }; - var Con = function () { }; - Con.prototype = proto; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 0); + } +} - var child = new Con(); - child.length = 3; +var proto = { + 0: 0, + 1: 1, + 2: 2, + length: 3 +}; +var Con = function() {}; +Con.prototype = proto; - Array.prototype.reduce.call(child, callbackfn); +var child = new Con(); +child.length = 3; + +Array.prototype.reduce.call(child, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-8.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-8.js index 48166b7ee4..0eed563635 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-8.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-8.js @@ -9,16 +9,17 @@ description: > property on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 0); - } - } +var testResult = false; - Array.prototype[0] = 0; - Array.prototype[1] = 1; - Array.prototype[2] = 2; - [, , ,].reduce(callbackfn); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 0); + } +} + +Array.prototype[0] = 0; +Array.prototype[1] = 1; +Array.prototype[2] = 2; +[, , , ].reduce(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-9.js index 82a348b81e..d61c61aea2 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-9.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-9.js @@ -9,21 +9,26 @@ description: > property on an Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 0); - } - } +var testResult = false; - var obj = { 1: 1, 2: 2, length: 3 }; - Object.defineProperty(obj, "0", { - get: function () { - return 0; - }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 0); + } +} - Array.prototype.reduce.call(obj, callbackfn); +var obj = { + 1: 1, + 2: 2, + length: 3 +}; +Object.defineProperty(obj, "0", { + get: function() { + return 0; + }, + configurable: true +}); + +Array.prototype.reduce.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-1.js index 9fb6bc97ca..bd6232342c 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-1.js @@ -9,11 +9,10 @@ description: > initialValue is not present ---*/ - function callbackfn(prevVal, curVal, idx, obj) - { - } +function callbackfn(prevVal, curVal, idx, obj) +{} - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.reduce(callbackfn); + arr.reduce(callbackfn); }); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-2.js index ae73a9a862..f30f014b99 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-2.js @@ -10,13 +10,12 @@ description: > not present ---*/ - function callbackfn(prevVal, curVal, idx, obj) - { - } +function callbackfn(prevVal, curVal, idx, obj) +{} - var arr = new Array(10); - arr[9] = 1; - arr.length = 5; +var arr = new Array(10); +arr[9] = 1; +arr.length = 5; assert.throws(TypeError, function() { - arr.reduce(callbackfn); + arr.reduce(callbackfn); }); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-3.js index f4e87f5e0b..15d80dfa2a 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-3.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-3.js @@ -9,16 +9,15 @@ description: > values are deleted and initialValue is not present ---*/ - function callbackfn(prevVal, curVal, idx, obj) - { - } +function callbackfn(prevVal, curVal, idx, obj) +{} - var arr = [1,2,3,4,5]; - delete arr[0]; - delete arr[1]; - delete arr[2]; - delete arr[3]; - delete arr[4]; +var arr = [1, 2, 3, 4, 5]; +delete arr[0]; +delete arr[1]; +delete arr[2]; +delete arr[3]; +delete arr[4]; assert.throws(TypeError, function() { - arr.reduce(callbackfn); + arr.reduce(callbackfn); }); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-4.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-4.js index 3e712b86da..db9f7aebab 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-4.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-4.js @@ -9,11 +9,11 @@ description: > properties but prototype contains a single property ---*/ - var arr = [, , , ]; +var arr = [, , , ]; - try { - Array.prototype[1] = "prototype"; - arr.reduce(function () { }); - } finally { - delete Array.prototype[1]; - } +try { + Array.prototype[1] = "prototype"; + arr.reduce(function() {}); +} finally { + delete Array.prototype[1]; +} diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-5.js index 756a4e93d3..d04354342b 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-5.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-5.js @@ -9,18 +9,18 @@ description: > side-effects that might be produced by step 2 ---*/ - var obj = { }; +var obj = {}; - var accessed = false; +var accessed = false; - Object.defineProperty(obj, "length", { - get: function () { - accessed = true; - return 2; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + accessed = true; + return 2; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.reduce.call(obj, function () { }); + Array.prototype.reduce.call(obj, function() {}); }); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-6.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-6.js index af901dc8ef..687736c2bc 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-6.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-6.js @@ -9,22 +9,22 @@ description: > side-effects that might be produced by step 3 ---*/ - var obj = {}; +var obj = {}; - var accessed = false; +var accessed = false; - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - accessed = true; - return "2"; - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + toString: function() { + accessed = true; + return "2"; + } + }; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.reduce.call(obj, function () { }); + Array.prototype.reduce.call(obj, function() {}); }); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-7.js index adbdc526a8..178c34c704 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-7.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-7.js @@ -9,15 +9,15 @@ description: > was thrown by step 2 ---*/ - var obj = {}; +var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - throw new Test262Error(); - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + throw new Test262Error(); + }, + configurable: true +}); assert.throws(Test262Error, function() { - Array.prototype.reduce.call(obj, function () { }); + Array.prototype.reduce.call(obj, function() {}); }); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-8.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-8.js index cd677383a6..64f4b8f793 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-8.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-c-8.js @@ -9,19 +9,19 @@ description: > was thrown by step 3 ---*/ - var obj = {}; +var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - throw new Test262Error(); - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + toString: function() { + throw new Test262Error(); + } + }; + }, + configurable: true +}); assert.throws(Test262Error, function() { - Array.prototype.reduce.call(obj, function () { }); + Array.prototype.reduce.call(obj, function() {}); }); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-1.js index 6076c9b101..2ac5c2e737 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-1.js @@ -9,12 +9,12 @@ description: > array after it is called ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - arr[5] = 6; - arr[2] = 3; - return prevVal + curVal; - } +function callbackfn(prevVal, curVal, idx, obj) { + arr[5] = 6; + arr[2] = 3; + return prevVal + curVal; +} - var arr = [1, 2, , 4, '5']; +var arr = [1, 2, , 4, '5']; assert.sameValue(arr.reduce(callbackfn), "105", 'arr.reduce(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-10.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-10.js index 10a0e43683..fec5a6b8d9 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-10.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-10.js @@ -9,12 +9,12 @@ description: > consider new elements added to array after it is called ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - arr[5] = 6; - arr[2] = 3; - return prevVal + curVal; - } +function callbackfn(prevVal, curVal, idx, obj) { + arr[5] = 6; + arr[2] = 3; + return prevVal + curVal; +} - var arr = [1,2,,4,'5']; +var arr = [1, 2, , 4, '5']; assert.sameValue(arr.reduce(callbackfn, ""), "12345", 'arr.reduce(callbackfn, "")'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-2.js index 2e74efa53b..0db9712104 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-2.js @@ -9,13 +9,13 @@ description: > after it is called ---*/ - function callbackfn(prevVal, curVal, idx, obj) - { - arr[3] = -2; - arr[4] = -1; - return prevVal + curVal; - } +function callbackfn(prevVal, curVal, idx, obj) +{ + arr[3] = -2; + arr[4] = -1; + return prevVal + curVal; +} - var arr = [1,2,3,4,5]; +var arr = [1, 2, 3, 4, 5]; assert.sameValue(arr.reduce(callbackfn), 3, 'arr.reduce(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-3.js index e5942de1a0..514951a748 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-3.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-3.js @@ -9,14 +9,14 @@ description: > after the call ---*/ - function callbackfn(prevVal, curVal, idx, obj) - { - delete arr[3]; - delete arr[4]; - return prevVal + curVal; - } +function callbackfn(prevVal, curVal, idx, obj) +{ + delete arr[3]; + delete arr[4]; + return prevVal + curVal; +} - var arr = ['1',2,3,4,5]; +var arr = ['1', 2, 3, 4, 5]; // two elements deleted assert.sameValue(arr.reduce(callbackfn), "123", 'arr.reduce(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-4.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-4.js index e1d2f69fb4..6b9f7ca036 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-4.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-4.js @@ -9,12 +9,12 @@ description: > Array.length is decreased ---*/ - function callbackfn(prevVal, curVal, idx, obj) - { - arr.length = 2; - return prevVal + curVal; - } +function callbackfn(prevVal, curVal, idx, obj) +{ + arr.length = 2; + return prevVal + curVal; +} - var arr = [1,2,3,4,5]; +var arr = [1, 2, 3, 4, 5]; assert.sameValue(arr.reduce(callbackfn), 3, 'arr.reduce(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-5.js index b07ae90200..4fc56efead 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-5.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-5.js @@ -9,14 +9,15 @@ description: > element ---*/ - var callCnt = 0; - function callbackfn(prevVal, curVal, idx, obj) - { - callCnt++; - return 2; - } +var callCnt = 0; - var arr = [1]; +function callbackfn(prevVal, curVal, idx, obj) +{ + callCnt++; + return 2; +} + +var arr = [1]; assert.sameValue(arr.reduce(callbackfn), 1, 'arr.reduce(callbackfn)'); assert.sameValue(callCnt, 0, 'callCnt'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-6.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-6.js index a31d59a240..2d05468ef2 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-6.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-6.js @@ -9,17 +9,17 @@ description: > call when same index is also present in prototype ---*/ - function callbackfn(prevVal, curVal, idx, obj) - { - delete arr[3]; - delete arr[4]; - return prevVal + curVal; - } +function callbackfn(prevVal, curVal, idx, obj) +{ + delete arr[3]; + delete arr[4]; + return prevVal + curVal; +} - Array.prototype[4] = 5; - var arr = ['1',2,3,4,5]; - var res = arr.reduce(callbackfn); - delete Array.prototype[4]; +Array.prototype[4] = 5; +var arr = ['1', 2, 3, 4, 5]; +var res = arr.reduce(callbackfn); +delete Array.prototype[4]; //one element acually deleted assert.sameValue(res, "1235", 'res'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-7.js index 67e99779fa..f8c3a4b711 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-7.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-7.js @@ -9,13 +9,13 @@ description: > deleted during the call ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - delete o.arr; - return prevVal + curVal; - } +function callbackfn(prevVal, curVal, idx, obj) { + delete o.arr; + return prevVal + curVal; +} - var o = new Object(); - o.arr = ['1', 2, 3, 4, 5]; +var o = new Object(); +o.arr = ['1', 2, 3, 4, 5]; assert.sameValue(o.arr.reduce(callbackfn), "12345", 'o.arr.reduce(callbackfn)'); assert.sameValue(o.hasOwnProperty("arr"), false, 'o.hasOwnProperty("arr")'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-8.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-8.js index beceef98c6..6feccfcb35 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-8.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-8.js @@ -7,23 +7,26 @@ es5id: 15.4.4.21-9-8 description: Array.prototype.reduce - no observable effects occur if 'len' is 0 ---*/ - var accessed = false; - var callbackAccessed = false; - function callbackfn() { - callbackAccessed = true; - } +var accessed = false; +var callbackAccessed = false; - var obj = { length: 0 }; +function callbackfn() { + callbackAccessed = true; +} - Object.defineProperty(obj, "0", { - get: function () { - accessed = true; - return 10; - }, - configurable: true - }); +var obj = { + length: 0 +}; - Array.prototype.reduce.call(obj, function () { }, "initialValue"); +Object.defineProperty(obj, "0", { + get: function() { + accessed = true; + return 10; + }, + configurable: true +}); + +Array.prototype.reduce.call(obj, function() {}, "initialValue"); assert.sameValue(accessed, false, 'accessed'); assert.sameValue(callbackAccessed, false, 'callbackAccessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-9.js index aa867346f2..0a6ba82e40 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-9.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-9.js @@ -9,22 +9,23 @@ description: > number of iterations in step 9 ---*/ - var called = 0; - function callbackfn(accum, val, idx, obj) { - called++; - return accum + val; - } +var called = 0; - var arr = [0, 1, 2, 3]; - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 2; - return 0; - }, - configurable: true - }); +function callbackfn(accum, val, idx, obj) { + called++; + return accum + val; +} - var newAccum = arr.reduce(callbackfn, "initialValue"); +var arr = [0, 1, 2, 3]; +Object.defineProperty(arr, "0", { + get: function() { + arr.length = 2; + return 0; + }, + configurable: true +}); + +var newAccum = arr.reduce(callbackfn, "initialValue"); assert.sameValue(newAccum, "initialValue01", 'newAccum'); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-1.js index e7f18d3bdc..274f1bb6ee 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-1.js @@ -9,10 +9,9 @@ description: > and initialValue is present ---*/ - function callbackfn(prevVal, curVal, idx, obj) - { - } +function callbackfn(prevVal, curVal, idx, obj) +{} - var arr = new Array(10); +var arr = new Array(10); -assert.sameValue(arr.reduce(callbackfn,5), 5, 'arr.reduce(callbackfn,5)'); +assert.sameValue(arr.reduce(callbackfn, 5), 5, 'arr.reduce(callbackfn,5)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-10.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-10.js index 4adec3c103..bf0d29423d 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-10.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-10.js @@ -10,28 +10,31 @@ description: > Object ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(accum, val, idx, obj) { - accessed = true; - if (idx === 3) { - testResult = false; - } - } +function callbackfn(accum, val, idx, obj) { + accessed = true; + if (idx === 3) { + testResult = false; + } +} - var obj = { 2: 2, length: 20 }; +var obj = { + 2: 2, + length: 20 +}; - Object.defineProperty(obj, "0", { - get: function () { - delete Object.prototype[3]; - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + delete Object.prototype[3]; + return 0; + }, + configurable: true +}); - Object.prototype[3] = 1; - Array.prototype.reduce.call(obj, callbackfn); +Object.prototype[3] = 1; +Array.prototype.reduce.call(obj, callbackfn); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-11.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-11.js index b2f71de95f..4636bd54a2 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-11.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-11.js @@ -9,27 +9,27 @@ description: > causes deleted index property not to be visited on an Array ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(accum, val, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } +function callbackfn(accum, val, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } +} - var arr = [, , , 3]; - Object.defineProperty(arr, "0", { - get: function () { - delete Array.prototype[1]; - return 0; - }, - configurable: true - }); +var arr = [, , , 3]; +Object.defineProperty(arr, "0", { + get: function() { + delete Array.prototype[1]; + return 0; + }, + configurable: true +}); - Array.prototype[1] = 1; - arr.reduce(callbackfn); +Array.prototype[1] = 1; +arr.reduce(callbackfn); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-12.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-12.js index c82150f241..7605c7ebee 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-12.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-12.js @@ -10,25 +10,30 @@ description: > on an Array-like object ---*/ - var testResult = false; +var testResult = false; - function callbackfn(accum, val, idx, obj) { - if (idx === 1 && val === 1) { - testResult = true; - } - } +function callbackfn(accum, val, idx, obj) { + if (idx === 1 && val === 1) { + testResult = true; + } +} - var obj = { 0: 0, 1: 111, 4: 10, length: 10 }; +var obj = { + 0: 0, + 1: 111, + 4: 10, + length: 10 +}; - Object.defineProperty(obj, "0", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + delete obj[1]; + return 0; + }, + configurable: true +}); - Object.prototype[1] = 1; - Array.prototype.reduce.call(obj, callbackfn); +Object.prototype[1] = 1; +Array.prototype.reduce.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-13.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-13.js index fa7a8f54d9..4960d60e65 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-13.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-13.js @@ -10,24 +10,24 @@ description: > on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(accum, val, idx, obj) { - if (idx === 1 && val === 1) { - testResult = true; - } - } - var arr = [0, 111]; +function callbackfn(accum, val, idx, obj) { + if (idx === 1 && val === 1) { + testResult = true; + } +} +var arr = [0, 111]; - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); - Array.prototype[1] = 1; - arr.reduce(callbackfn); +Array.prototype[1] = 1; +arr.reduce(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-14.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-14.js index 590122b87e..0d00a32316 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-14.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-14.js @@ -9,27 +9,27 @@ description: > causes deleted index property not to be visited ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(accum, val, idx, obj) { - accessed = true; - if (idx === 2) { - testResult = false; - } - } +function callbackfn(accum, val, idx, obj) { + accessed = true; + if (idx === 2) { + testResult = false; + } +} - var arr = [0, 1, 2, 3]; +var arr = [0, 1, 2, 3]; - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 2; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + arr.length = 2; + return 0; + }, + configurable: true +}); - arr.reduce(callbackfn); +arr.reduce(callbackfn); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-15.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-15.js index 18cc658186..4d42c2ca78 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-15.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-15.js @@ -9,30 +9,30 @@ description: > property in step 8 causes prototype index property to be visited ---*/ - var testResult = false; +var testResult = false; - function callbackfn(accum, val, idx, obj) { - if (idx === 2 && val === "prototype") { - testResult = true; - } - } - var arr = [0, 1, 2, 3]; +function callbackfn(accum, val, idx, obj) { + if (idx === 2 && val === "prototype") { + testResult = true; + } +} +var arr = [0, 1, 2, 3]; - Object.defineProperty(Array.prototype, "2", { - get: function () { - return "prototype"; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "2", { + get: function() { + return "prototype"; + }, + configurable: true +}); - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + arr.length = 2; + return 1; + }, + configurable: true +}); - arr.reduce(callbackfn); +arr.reduce(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-16.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-16.js index 29c1d4f8e8..047fc4db91 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-16.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-16.js @@ -10,31 +10,31 @@ description: > flags: [noStrict] ---*/ - var testResult = false; +var testResult = false; - function callbackfn(accum, val, idx, obj) { - if (idx === 2 && val === "unconfigurable") { - testResult = true; - } - } +function callbackfn(accum, val, idx, obj) { + if (idx === 2 && val === "unconfigurable") { + testResult = true; + } +} - var arr = [0, 1, 2, 3]; +var arr = [0, 1, 2, 3]; - Object.defineProperty(arr, "2", { - get: function () { - return "unconfigurable"; - }, - configurable: false - }); +Object.defineProperty(arr, "2", { + get: function() { + return "unconfigurable"; + }, + configurable: false +}); - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + arr.length = 2; + return 1; + }, + configurable: true +}); - arr.reduce(callbackfn); +arr.reduce(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-17.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-17.js index 34cbe86514..2364819b98 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-17.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-17.js @@ -9,29 +9,31 @@ description: > visited on an Array-like object ---*/ - var testResult = false; +var testResult = false; - function callbackfn(accum, val, idx, obj) { - if (idx === 3 && val === 3) { - testResult = true; - } - } +function callbackfn(accum, val, idx, obj) { + if (idx === 3 && val === 3) { + testResult = true; + } +} - var obj = { length: 5 }; +var obj = { + length: 5 +}; - Object.defineProperty(obj, "1", { - get: function () { - Object.defineProperty(obj, "3", { - get: function () { - return 3; - }, - configurable: true - }); - return 1; - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + Object.defineProperty(obj, "3", { + get: function() { + return 3; + }, + configurable: true + }); + return 1; + }, + configurable: true +}); - Array.prototype.reduce.call(obj, callbackfn, "initialValue"); +Array.prototype.reduce.call(obj, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-18.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-18.js index 9cede28d07..94cdebfc31 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-18.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-18.js @@ -9,29 +9,29 @@ description: > visited on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(accum, val, idx, obj) { - if (idx === 1 && val === 1) { - testResult = true; - } - } +function callbackfn(accum, val, idx, obj) { + if (idx === 1 && val === 1) { + testResult = true; + } +} - var arr = [0, , 2]; +var arr = [0, , 2]; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(arr, "1", { + get: function() { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); - arr.reduce(callbackfn, "initialValue"); +arr.reduce(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-19.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-19.js index 76fb7a8176..719447c92e 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-19.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-19.js @@ -9,29 +9,31 @@ description: > on an Array-like object ---*/ - var testResult = false; +var testResult = false; - function callbackfn(accum, val, idx, obj) { - if (idx === 1 && val === 6.99) { - testResult = true; - } - } +function callbackfn(accum, val, idx, obj) { + if (idx === 1 && val === 6.99) { + testResult = true; + } +} - var obj = { length: 6 }; +var obj = { + length: 6 +}; - Object.defineProperty(obj, "0", { - get: function () { - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + Object.defineProperty(Object.prototype, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); - Array.prototype.reduce.call(obj, callbackfn, "initialValue"); +Array.prototype.reduce.call(obj, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-2.js index 42f76e8fae..eabeeb5eb1 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-2.js @@ -9,24 +9,24 @@ description: > here ---*/ - var testResult = false; +var testResult = false; - function callbackfn(accum, val, idx, obj) { - if (idx === 2 && val === "2") { - testResult = true; - } - } +function callbackfn(accum, val, idx, obj) { + if (idx === 2 && val === "2") { + testResult = true; + } +} - var obj = {}; +var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - obj[2] = "2"; - return 3; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + obj[2] = "2"; + return 3; + }, + configurable: true +}); - Array.prototype.reduce.call(obj, callbackfn, "initialValue"); +Array.prototype.reduce.call(obj, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-20.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-20.js index 2d52994db6..935e8ca310 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-20.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-20.js @@ -9,29 +9,29 @@ description: > visited on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(accum, val, idx, obj) { - if (idx === 1 && val === 6.99) { - testResult = true; - } - } +function callbackfn(accum, val, idx, obj) { + if (idx === 1 && val === 6.99) { + testResult = true; + } +} - var arr = [0, , 2]; +var arr = [0, , 2]; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(Array.prototype, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); - arr.reduce(callbackfn, "initialValue"); +arr.reduce(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-21.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-21.js index f5ae4f380e..200ac1c68e 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-21.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-21.js @@ -9,34 +9,37 @@ description: > index property not to be visited on an Array-like object ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(accum, val, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } +function callbackfn(accum, val, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } +} - var obj = { 5: 10, length: 10 }; +var obj = { + 5: 10, + length: 10 +}; - Object.defineProperty(obj, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + return 6.99; + }, + configurable: true +}); - Object.defineProperty(obj, "0", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + delete obj[1]; + return 0; + }, + configurable: true +}); - Array.prototype.reduce.call(obj, callbackfn, "initialValue"); +Array.prototype.reduce.call(obj, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-22.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-22.js index f824832cb2..64402e07c9 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-22.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-22.js @@ -9,34 +9,34 @@ description: > index property not to be visited on an Array ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(accum, val, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } +function callbackfn(accum, val, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } +} - var arr = [1, 2, 4]; +var arr = [1, 2, 4]; - Object.defineProperty(arr, "1", { - get: function () { - return "6.99"; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + return "6.99"; + }, + configurable: true +}); - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); - arr.reduce(callbackfn, "initialValue"); +arr.reduce(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-23.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-23.js index 3ee4365ed6..236167f7ed 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-23.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-23.js @@ -9,28 +9,31 @@ description: > deleted index property not to be visited on an Array-like Object ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(accum, val, idx, obj) { - accessed = true; - if (idx === 3) { - testResult = false; - } - } +function callbackfn(accum, val, idx, obj) { + accessed = true; + if (idx === 3) { + testResult = false; + } +} - var obj = { 2: 2, length: 20 }; +var obj = { + 2: 2, + length: 20 +}; - Object.defineProperty(obj, "0", { - get: function () { - delete Object.prototype[3]; - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + delete Object.prototype[3]; + return 0; + }, + configurable: true +}); - Object.prototype[3] = 1; - Array.prototype.reduce.call(obj, callbackfn, "initialValue"); +Object.prototype[3] = 1; +Array.prototype.reduce.call(obj, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-24.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-24.js index 18d1e20694..7a2cbcd165 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-24.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-24.js @@ -9,27 +9,27 @@ description: > deleted index property not to be visited on an Array ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(accum, val, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } +function callbackfn(accum, val, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } +} - var arr = [0, , , 3]; - Object.defineProperty(arr, "0", { - get: function () { - delete Array.prototype[1]; - return 0; - }, - configurable: true - }); +var arr = [0, , , 3]; +Object.defineProperty(arr, "0", { + get: function() { + delete Array.prototype[1]; + return 0; + }, + configurable: true +}); - Array.prototype[1] = 1; - arr.reduce(callbackfn, "initialValue"); +Array.prototype[1] = 1; +arr.reduce(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-25.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-25.js index 83c1b449e9..311f9f21f0 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-25.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-25.js @@ -10,25 +10,30 @@ description: > Array-like object ---*/ - var testResult = false; +var testResult = false; - function callbackfn(accum, val, idx, obj) { - if (idx === 1 && val === 1) { - testResult = true; - } - } +function callbackfn(accum, val, idx, obj) { + if (idx === 1 && val === 1) { + testResult = true; + } +} - var obj = { 0: 0, 1: 111, 4: 10, length: 10 }; +var obj = { + 0: 0, + 1: 111, + 4: 10, + length: 10 +}; - Object.defineProperty(obj, "0", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + delete obj[1]; + return 0; + }, + configurable: true +}); - Object.prototype[1] = 1; - Array.prototype.reduce.call(obj, callbackfn, "initialValue"); +Object.prototype[1] = 1; +Array.prototype.reduce.call(obj, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-26.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-26.js index c5b22131b1..8a570c25ee 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-26.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-26.js @@ -9,24 +9,24 @@ description: > property causes prototype index property to be visited on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(accum, val, idx, obj) { - if (idx === 1 && val === 1) { - testResult = true; - } - } - var arr = [0, 111]; +function callbackfn(accum, val, idx, obj) { + if (idx === 1 && val === 1) { + testResult = true; + } +} +var arr = [0, 111]; - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); - Array.prototype[1] = 1; - arr.reduce(callbackfn, "initialValue"); +Array.prototype[1] = 1; +arr.reduce(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-27.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-27.js index a20faec87f..bfbf66fbf4 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-27.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-27.js @@ -9,27 +9,27 @@ description: > index property not to be visited ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(accum, val, idx, obj) { - accessed = true; - if (idx === 2) { - testResult = false; - } - } +function callbackfn(accum, val, idx, obj) { + accessed = true; + if (idx === 2) { + testResult = false; + } +} - var arr = [0, 1, 2, 3]; +var arr = [0, 1, 2, 3]; - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 2; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + arr.length = 2; + return 0; + }, + configurable: true +}); - arr.reduce(callbackfn, "initialValue"); +arr.reduce(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-28.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-28.js index 44bdb414cf..ba16dafa85 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-28.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-28.js @@ -9,30 +9,30 @@ description: > property causes prototype index property to be visited ---*/ - var testResult = false; +var testResult = false; - function callbackfn(accum, val, idx, obj) { - if (idx === 2 && val === "prototype") { - testResult = true; - } - } - var arr = [0, 1, 2, 3]; +function callbackfn(accum, val, idx, obj) { + if (idx === 2 && val === "prototype") { + testResult = true; + } +} +var arr = [0, 1, 2, 3]; - Object.defineProperty(Array.prototype, "2", { - get: function () { - return "prototype"; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "2", { + get: function() { + return "prototype"; + }, + configurable: true +}); - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + arr.length = 2; + return 1; + }, + configurable: true +}); - arr.reduce(callbackfn, "initialValue"); +arr.reduce(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-29.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-29.js index a4f5167437..1c872c518c 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-29.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-29.js @@ -10,31 +10,31 @@ description: > flags: [noStrict] ---*/ - var testResult = false; +var testResult = false; - function callbackfn(accum, val, idx, obj) { - if (idx === 2 && val === "unconfigurable") { - testResult = true; - } - } +function callbackfn(accum, val, idx, obj) { + if (idx === 2 && val === "unconfigurable") { + testResult = true; + } +} - var arr = [0, 1, 2, 3]; +var arr = [0, 1, 2, 3]; - Object.defineProperty(arr, "2", { - get: function () { - return "unconfigurable"; - }, - configurable: false - }); +Object.defineProperty(arr, "2", { + get: function() { + return "unconfigurable"; + }, + configurable: false +}); - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + arr.length = 2; + return 1; + }, + configurable: true +}); - arr.reduce(callbackfn, "initialValue"); +arr.reduce(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-3.js index 8f8382931e..2f72b891a4 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-3.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-3.js @@ -9,27 +9,30 @@ description: > here ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(accum, val, idx, obj) { - accessed = true; - if (idx === 2) { - testResult = false; - } - } +function callbackfn(accum, val, idx, obj) { + accessed = true; + if (idx === 2) { + testResult = false; + } +} - var obj = { 2: "2", 3: 10 }; +var obj = { + 2: "2", + 3: 10 +}; - Object.defineProperty(obj, "length", { - get: function () { - delete obj[2]; - return 5; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + delete obj[2]; + return 5; + }, + configurable: true +}); - Array.prototype.reduce.call(obj, callbackfn, "initialValue"); +Array.prototype.reduce.call(obj, callbackfn, "initialValue"); assert(accessed, 'accessed !== true'); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-4.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-4.js index 249f49a291..208fd04f22 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-4.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-4.js @@ -9,29 +9,31 @@ description: > 8 are visited on an Array-like object ---*/ - var testResult = false; +var testResult = false; - function callbackfn(accum, val, idx, obj) { - if (idx === 3 && val === 3) { - testResult = true; - } - } +function callbackfn(accum, val, idx, obj) { + if (idx === 3 && val === 3) { + testResult = true; + } +} - var obj = { length: 5 }; +var obj = { + length: 5 +}; - Object.defineProperty(obj, "1", { - get: function () { - Object.defineProperty(obj, "3", { - get: function () { - return 3; - }, - configurable: true - }); - return 1; - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + Object.defineProperty(obj, "3", { + get: function() { + return 3; + }, + configurable: true + }); + return 1; + }, + configurable: true +}); - Array.prototype.reduce.call(obj, callbackfn); +Array.prototype.reduce.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-5.js index 43b8766cd2..872321367d 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-5.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-5.js @@ -9,29 +9,29 @@ description: > 8 are visited on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(accum, val, idx, obj) { - if (idx === 1 && val === 1) { - testResult = true; - } - } +function callbackfn(accum, val, idx, obj) { + if (idx === 1 && val === 1) { + testResult = true; + } +} - var arr = [0, , 2]; +var arr = [0, , 2]; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(arr, "1", { + get: function() { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); - arr.reduce(callbackfn); +arr.reduce(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-6.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-6.js index 85e075d852..6002cbd912 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-6.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-6.js @@ -9,29 +9,31 @@ description: > are visited on an Array-like object ---*/ - var testResult = false; +var testResult = false; - function callbackfn(accum, val, idx, obj) { - if (idx === 1 && val === 6.99) { - testResult = true; - } - } +function callbackfn(accum, val, idx, obj) { + if (idx === 1 && val === 6.99) { + testResult = true; + } +} - var obj = { length: 6 }; +var obj = { + length: 6 +}; - Object.defineProperty(obj, "0", { - get: function () { - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + Object.defineProperty(Object.prototype, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); - Array.prototype.reduce.call(obj, callbackfn); +Array.prototype.reduce.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-7.js index 67e1fc135d..b41a6c1378 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-7.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-7.js @@ -9,29 +9,29 @@ description: > are visited on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(accum, val, idx, obj) { - if (idx === 1 && val === 6.99) { - testResult = true; - } - } +function callbackfn(accum, val, idx, obj) { + if (idx === 1 && val === 6.99) { + testResult = true; + } +} - var arr = [0, , 2]; +var arr = [0, , 2]; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(Array.prototype, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); - arr.reduce(callbackfn); +arr.reduce(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-8.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-8.js index 219d2df560..4386fa4a48 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-8.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-8.js @@ -9,34 +9,37 @@ description: > deleted index property not to be visited on an Array-like object ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(accum, val, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } +function callbackfn(accum, val, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } +} - var obj = { 5: 10, length: 10 }; +var obj = { + 5: 10, + length: 10 +}; - Object.defineProperty(obj, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + return 6.99; + }, + configurable: true +}); - Object.defineProperty(obj, "0", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + delete obj[1]; + return 0; + }, + configurable: true +}); - Array.prototype.reduce.call(obj, callbackfn); +Array.prototype.reduce.call(obj, callbackfn); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-9.js index ab402f3367..2f9739a3d1 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-9.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-9.js @@ -9,27 +9,27 @@ description: > deleted index property not to be visited on an Array ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(accum, val, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } +function callbackfn(accum, val, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } +} - var arr = [1, 2, 4]; +var arr = [1, 2, 4]; - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); - arr.reduce(callbackfn); +arr.reduce(callbackfn); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-1.js index 9f22078b8b..82bb1fd5fd 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-1.js @@ -9,15 +9,16 @@ description: > been assigned values ---*/ - var callCnt = 0; - function callbackfn(prevVal, curVal, idx, obj) - { - callCnt++; - return curVal; - } +var callCnt = 0; - var arr = new Array(10); - arr[0] = arr[1] = undefined; //explicitly assigning a value +function callbackfn(prevVal, curVal, idx, obj) +{ + callCnt++; + return curVal; +} + +var arr = new Array(10); +arr[0] = arr[1] = undefined; //explicitly assigning a value assert.sameValue(arr.reduce(callbackfn), undefined, 'arr.reduce(callbackfn)'); assert.sameValue(callCnt, 1, 'callCnt'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-1.js index 8e4385ae23..83910eb355 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-1.js @@ -9,15 +9,21 @@ description: > property on an Array-like object ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; +var initialValue = 0; - var obj = { 0: 0, 1: 1, 2: 2, length: 2 }; - Array.prototype.reduce.call(obj, callbackfn, initialValue); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} + +var obj = { + 0: 0, + 1: 1, + 2: 2, + length: 2 +}; +Array.prototype.reduce.call(obj, callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-10.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-10.js index 35db68b11f..a297b03616 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-10.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-10.js @@ -9,23 +9,24 @@ description: > property on an Array ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; +var initialValue = 0; - var arr = [0, , 2]; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); +var arr = [0, , 2]; - arr.reduce(callbackfn, initialValue); +Object.defineProperty(arr, "1", { + get: function() { + return 1; + }, + configurable: true +}); + +arr.reduce(callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-11.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-11.js index 3468f85edc..b5cc2ad9b2 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-11.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-11.js @@ -10,29 +10,34 @@ description: > Array-like object ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === "11"); - } - } +var testResult = false; +var initialValue = 0; - var proto = { 0: 0, 1: 1, 2: 2 }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === "11"); + } +} - var Con = function () { }; - Con.prototype = proto; +var proto = { + 0: 0, + 1: 1, + 2: 2 +}; - var child = new Con(); - child.length = 3; +var Con = function() {}; +Con.prototype = proto; - Object.defineProperty(child, "1", { - get: function () { - return "11"; - }, - configurable: true - }); +var child = new Con(); +child.length = 3; - Array.prototype.reduce.call(child, callbackfn, initialValue); +Object.defineProperty(child, "1", { + get: function() { + return "11"; + }, + configurable: true +}); + +Array.prototype.reduce.call(child, callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-12.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-12.js index 85072151e3..de4c3f77b5 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-12.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-12.js @@ -9,24 +9,25 @@ description: > property that overrides an inherited data property on an Array ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === "11"); - } - } +var testResult = false; +var initialValue = 0; - Array.prototype[1] = 1; - var arr = [0, ,2]; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === "11"); + } +} - Object.defineProperty(arr, "1", { - get: function () { - return "11"; - }, - configurable: true - }); +Array.prototype[1] = 1; +var arr = [0, , 2]; - arr.reduce(callbackfn, initialValue); +Object.defineProperty(arr, "1", { + get: function() { + return "11"; + }, + configurable: true +}); + +arr.reduce(callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-13.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-13.js index 49d727d7a5..c29ed6061a 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-13.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-13.js @@ -10,36 +10,40 @@ description: > Array-like object ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === "11"); - } - } +var testResult = false; +var initialValue = 0; - var proto = { 0: 0, 2: 2}; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === "11"); + } +} - Object.defineProperty(proto, "1", { - get: function () { - return 1; - }, - configurable: true - }); +var proto = { + 0: 0, + 2: 2 +}; - var Con = function () { }; - Con.prototype = proto; +Object.defineProperty(proto, "1", { + get: function() { + return 1; + }, + configurable: true +}); - var child = new Con(); - child.length = 3; +var Con = function() {}; +Con.prototype = proto; - Object.defineProperty(child, "1", { - get: function () { - return "11"; - }, - configurable: true - }); +var child = new Con(); +child.length = 3; - Array.prototype.reduce.call(child, callbackfn, initialValue); +Object.defineProperty(child, "1", { + get: function() { + return "11"; + }, + configurable: true +}); + +Array.prototype.reduce.call(child, callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-14.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-14.js index 439002290c..5d2ea3e9cc 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-14.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-14.js @@ -9,29 +9,30 @@ description: > property that overrides an inherited accessor property on an Array ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === "11"); - } - } +var testResult = false; +var initialValue = 0; - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 1; - }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === "11"); + } +} - var arr = [0, ,2]; +Object.defineProperty(Array.prototype, "1", { + get: function() { + return 1; + }, + configurable: true +}); - Object.defineProperty(arr, "1", { - get: function () { - return "11"; - }, - configurable: true - }); - arr.reduce(callbackfn, initialValue); +var arr = [0, , 2]; + +Object.defineProperty(arr, "1", { + get: function() { + return "11"; + }, + configurable: true +}); +arr.reduce(callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-15.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-15.js index 8a48197782..fb6f4b4307 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-15.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-15.js @@ -9,29 +9,33 @@ description: > accessor property on an Array-like object ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; +var initialValue = 0; - var proto = { 0: 0, 2: 2 }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} - Object.defineProperty(proto, "1", { - get: function () { - return 1; - }, - configurable: true - }); +var proto = { + 0: 0, + 2: 2 +}; - var Con = function () { }; - Con.prototype = proto; +Object.defineProperty(proto, "1", { + get: function() { + return 1; + }, + configurable: true +}); - var child = new Con(); - child.length = 3; +var Con = function() {}; +Con.prototype = proto; - Array.prototype.reduce.call(child, callbackfn, initialValue); +var child = new Con(); +child.length = 3; + +Array.prototype.reduce.call(child, callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-16.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-16.js index 0b26a82315..ea5b70bf7e 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-16.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-16.js @@ -9,23 +9,24 @@ description: > accessor property on an Array ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; +var initialValue = 0; - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 1; - }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} - var arr = [0, , 2, ]; +Object.defineProperty(Array.prototype, "1", { + get: function() { + return 1; + }, + configurable: true +}); - arr.reduce(callbackfn, initialValue); +var arr = [0, , 2, ]; + +arr.reduce(callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-17.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-17.js index 72e9c9c3e1..2612938851 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-17.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-17.js @@ -9,21 +9,26 @@ description: > property without a get function on an Array-like object ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === undefined); - } - } +var testResult = false; +var initialValue = 0; - var obj = { 0: 0, 2: 2, length: 3 }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === undefined); + } +} - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); +var obj = { + 0: 0, + 2: 2, + length: 3 +}; - Array.prototype.reduce.call(obj, callbackfn, initialValue); +Object.defineProperty(obj, "1", { + set: function() {}, + configurable: true +}); + +Array.prototype.reduce.call(obj, callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-18.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-18.js index e5e1c98e3e..8b1b27917f 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-18.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-18.js @@ -9,21 +9,22 @@ description: > property without a get function on an Array ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === undefined); - } - } +var testResult = false; +var initialValue = 0; - var arr = [0, , 2]; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === undefined); + } +} - Object.defineProperty(arr, "1", { - set: function () { }, - configurable: true - }); +var arr = [0, , 2]; - arr.reduce(callbackfn, initialValue); +Object.defineProperty(arr, "1", { + set: function() {}, + configurable: true +}); + +arr.reduce(callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-19.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-19.js index a8ab13f94b..d385edd583 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-19.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-19.js @@ -10,28 +10,33 @@ description: > accessor property on an Array-like object ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === undefined); - } - } +var testResult = false; +var initialValue = 0; - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 1; - }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === undefined); + } +} - var obj = { 0: 0, 2: 2, length: 3 }; +Object.defineProperty(Object.prototype, "1", { + get: function() { + return 1; + }, + configurable: true +}); - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); +var obj = { + 0: 0, + 2: 2, + length: 3 +}; - Array.prototype.reduce.call(obj, callbackfn, initialValue); +Object.defineProperty(obj, "1", { + set: function() {}, + configurable: true +}); + +Array.prototype.reduce.call(obj, callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-2.js index cbabbcf459..bec49675d6 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-2.js @@ -9,15 +9,16 @@ description: > property on an Array ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; +var initialValue = 0; - var arr = [0, 1]; - arr.reduce(callbackfn, initialValue); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} + +var arr = [0, 1]; +arr.reduce(callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-20.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-20.js index 5596e002fc..96d6089f47 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-20.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-20.js @@ -10,27 +10,28 @@ description: > accessor property on an Array ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === undefined); - } - } +var testResult = false; +var initialValue = 0; - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 11; - }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === undefined); + } +} - var arr = [0, , 2]; - Object.defineProperty(arr, "1", { - set: function () { }, - configurable: true - }); +Object.defineProperty(Array.prototype, "1", { + get: function() { + return 11; + }, + configurable: true +}); - arr.reduce(callbackfn, initialValue); +var arr = [0, , 2]; +Object.defineProperty(arr, "1", { + set: function() {}, + configurable: true +}); + +arr.reduce(callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-21.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-21.js index 160a4ea8e1..4994164fdd 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-21.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-21.js @@ -9,27 +9,31 @@ description: > accessor property without a get function on an Array-like object ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === undefined); - } - } +var testResult = false; +var initialValue = 0; - var proto = { 0: 0, 2: 2 }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === undefined); + } +} - Object.defineProperty(proto, "1", { - set: function () { }, - configurable: true - }); +var proto = { + 0: 0, + 2: 2 +}; - var Con = function () { }; - Con.prototype = proto; +Object.defineProperty(proto, "1", { + set: function() {}, + configurable: true +}); - var child = new Con(); - child.length = 3; +var Con = function() {}; +Con.prototype = proto; - Array.prototype.reduce.call(child, callbackfn, initialValue); +var child = new Con(); +child.length = 3; + +Array.prototype.reduce.call(child, callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-22.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-22.js index e6a171d693..b906e19e77 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-22.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-22.js @@ -9,21 +9,22 @@ description: > accessor property without a get function on an Array ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === undefined); - } - } +var testResult = false; +var initialValue = 0; - Object.defineProperty(Array.prototype, "1", { - set: function () { }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === undefined); + } +} - var arr = [0, , 2]; +Object.defineProperty(Array.prototype, "1", { + set: function() {}, + configurable: true +}); - arr.reduce(callbackfn, initialValue); +var arr = [0, , 2]; + +arr.reduce(callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-25.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-25.js index dc5a6a969b..08713388f0 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-25.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-25.js @@ -10,18 +10,19 @@ description: > less than number of parameters) ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; +var initialValue = 0; - var func = function (a, b, c) { - Array.prototype.reduce.call(arguments, callbackfn, initialValue); - }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} - func(0, 1); +var func = function(a, b, c) { + Array.prototype.reduce.call(arguments, callbackfn, initialValue); +}; + +func(0, 1); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-26.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-26.js index a941dc65f6..d8ce4350b2 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-26.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-26.js @@ -10,18 +10,19 @@ description: > number of parameters) ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 2) { - testResult = (curVal === 2); - } - } +var testResult = false; +var initialValue = 0; - var func = function (a, b, c) { - Array.prototype.reduce.call(arguments, callbackfn, initialValue); - }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 2) { + testResult = (curVal === 2); + } +} - func(0, 1, 2); +var func = function(a, b, c) { + Array.prototype.reduce.call(arguments, callbackfn, initialValue); +}; + +func(0, 1, 2); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-27.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-27.js index 2907f2210f..40b63f9877 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-27.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-27.js @@ -10,18 +10,19 @@ description: > greater than number of parameters) ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 3) { - testResult = (curVal === 3); - } - } +var testResult = false; +var initialValue = 0; - var func = function (a, b, c) { - Array.prototype.reduce.call(arguments, callbackfn, initialValue); - }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 3) { + testResult = (curVal === 3); + } +} - func(0, 1, 2, 3); +var func = function(a, b, c) { + Array.prototype.reduce.call(arguments, callbackfn, initialValue); +}; + +func(0, 1, 2, 3); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-28.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-28.js index 9422c48fcd..92981a4a9f 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-28.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-28.js @@ -9,16 +9,17 @@ description: > implements its own property get method ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === "1"); - } - } +var testResult = false; +var initialValue = 0; - var str = new String("012"); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === "1"); + } +} - Array.prototype.reduce.call(str, callbackfn, initialValue); +var str = new String("012"); + +Array.prototype.reduce.call(str, callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-29.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-29.js index 9003db41a2..270742aa9c 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-29.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-29.js @@ -9,22 +9,23 @@ description: > implements its own property get method ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; +var initialValue = 0; - var obj = function (a, b, c) { - return a + b + c; - }; - obj[0] = 0; - obj[1] = 1; - obj[2] = 2; - obj[3] = 3; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} - Array.prototype.reduce.call(obj, callbackfn, initialValue); +var obj = function(a, b, c) { + return a + b + c; +}; +obj[0] = 0; +obj[1] = 1; +obj[2] = 2; +obj[3] = 3; + +Array.prototype.reduce.call(obj, callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-3.js index 19a4e19a09..0a23d5c010 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-3.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-3.js @@ -10,23 +10,29 @@ description: > Array-like object ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === "11"); - } - } +var testResult = false; +var initialValue = 0; - var proto = { 0: 0, 1: 1, 2: 2, length: 2 }; - var Con = function () { }; - Con.prototype = proto; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === "11"); + } +} - var child = new Con(); - child[1] = "11"; - child[2] = "22"; - child.length = 3; +var proto = { + 0: 0, + 1: 1, + 2: 2, + length: 2 +}; +var Con = function() {}; +Con.prototype = proto; - Array.prototype.reduce.call(child, callbackfn, initialValue); +var child = new Con(); +child[1] = "11"; +child[2] = "22"; +child.length = 3; + +Array.prototype.reduce.call(child, callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-30.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-30.js index 49c26b0e6f..46dfa9febf 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-30.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-30.js @@ -9,36 +9,37 @@ description: > iterations is observed on an Array ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; +var initialValue = 0; - var arr = [, , 2]; - var preIterVisible = false; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} - Object.defineProperty(arr, "0", { - get: function () { - preIterVisible = true; - return 0; - }, - configurable: true - }); +var arr = [, , 2]; +var preIterVisible = false; - Object.defineProperty(arr, "1", { - get: function () { - if (preIterVisible) { - return 1; - } else { - return 100; - } - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + preIterVisible = true; + return 0; + }, + configurable: true +}); - arr.reduce(callbackfn, initialValue); +Object.defineProperty(arr, "1", { + get: function() { + if (preIterVisible) { + return 1; + } else { + return 100; + } + }, + configurable: true +}); + +arr.reduce(callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-31.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-31.js index f948d29786..db862cce17 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-31.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-31.js @@ -9,36 +9,40 @@ description: > iterations is observed on an Array-like object ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; +var initialValue = 0; - var obj = { 2: 2, length: 3 }; - var preIterVisible = false; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} - Object.defineProperty(obj, "0", { - get: function () { - preIterVisible = true; - return 0; - }, - configurable: true - }); +var obj = { + 2: 2, + length: 3 +}; +var preIterVisible = false; - Object.defineProperty(obj, "1", { - get: function () { - if (preIterVisible) { - return 1; - } else { - return "11"; - } - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + preIterVisible = true; + return 0; + }, + configurable: true +}); - Array.prototype.reduce.call(obj, callbackfn, initialValue); +Object.defineProperty(obj, "1", { + get: function() { + if (preIterVisible) { + return 1; + } else { + return "11"; + } + }, + configurable: true +}); + +Array.prototype.reduce.call(obj, callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-32.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-32.js index 3654543c5e..787d0261c9 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-32.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-32.js @@ -9,25 +9,30 @@ description: > terminate iteration on an Array-like object ---*/ - var accessed = false; - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx >= 1) { - accessed = true; - testResult = (curVal >= 1); - } - } +var accessed = false; +var testResult = false; +var initialValue = 0; - var obj = { 0: 0, 2: 2, length: 3 }; - Object.defineProperty(obj, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx >= 1) { + accessed = true; + testResult = (curVal >= 1); + } +} + +var obj = { + 0: 0, + 2: 2, + length: 3 +}; +Object.defineProperty(obj, "1", { + get: function() { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true +}); assert.throws(RangeError, function() { - Array.prototype.reduce.call(obj, callbackfn, initialValue); + Array.prototype.reduce.call(obj, callbackfn, initialValue); }); assert.sameValue(accessed, false, 'accessed'); assert.sameValue(testResult, false, 'testResult'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-33.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-33.js index 45c8487f92..eb596116ae 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-33.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-33.js @@ -9,26 +9,27 @@ description: > terminate iteration on an Array ---*/ - var accessed = false; - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx >= 1) { - accessed = true; - testResult = (curVal >= 1); - } - } +var accessed = false; +var testResult = false; +var initialValue = 0; - var arr = [0, , 2]; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx >= 1) { + accessed = true; + testResult = (curVal >= 1); + } +} - Object.defineProperty(arr, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); +var arr = [0, , 2]; + +Object.defineProperty(arr, "1", { + get: function() { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true +}); assert.throws(RangeError, function() { - arr.reduce(callbackfn, initialValue); + arr.reduce(callbackfn, initialValue); }); assert.sameValue(accessed, false, 'accessed'); assert.sameValue(testResult, false, 'testResult'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-4.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-4.js index 5be0e63fc6..0f26cabfef 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-4.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-4.js @@ -9,15 +9,16 @@ description: > property that overrides an inherited data property on an Array ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; +var initialValue = 0; - Array.prototype[1] = "3"; - [0, 1, 2].reduce(callbackfn, initialValue); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} + +Array.prototype[1] = "3"; +[0, 1, 2].reduce(callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-5.js index fc93b44d16..44cb554c70 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-5.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-5.js @@ -10,36 +10,37 @@ description: > Array-like object ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 0) { - testResult = (curVal === "9"); - } - } +var testResult = false; +var initialValue = 0; - var proto = {}; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 0) { + testResult = (curVal === "9"); + } +} - Object.defineProperty(proto, "0", { - get: function () { - return 0; - }, - configurable: true - }); +var proto = {}; - var Con = function () { }; - Con.prototype = proto; +Object.defineProperty(proto, "0", { + get: function() { + return 0; + }, + configurable: true +}); - var child = new Con(); - child.length = 2; +var Con = function() {}; +Con.prototype = proto; - Object.defineProperty(child, "0", { - value: "9", - configurable: true - }); +var child = new Con(); +child.length = 2; - child[1] = "1"; +Object.defineProperty(child, "0", { + value: "9", + configurable: true +}); - Array.prototype.reduce.call(child, callbackfn, initialValue); +child[1] = "1"; + +Array.prototype.reduce.call(child, callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-6.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-6.js index ee27f62425..d3aca565c0 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-6.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-6.js @@ -9,20 +9,21 @@ description: > property that overrides an inherited accessor property on an Array ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; +var initialValue = 0; - Object.defineProperty(Array.prototype, "1", { - get: function () { - return "9"; - }, - configurable: true - }); - [0, 1, 2].reduce(callbackfn, initialValue); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} + +Object.defineProperty(Array.prototype, "1", { + get: function() { + return "9"; + }, + configurable: true +}); +[0, 1, 2].reduce(callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-7.js index b20d880b3b..49844b47d8 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-7.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-7.js @@ -9,21 +9,27 @@ description: > property on an Array-like object ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; +var initialValue = 0; - var proto = { 0: 0, 1: 1, 2: 2, length: 3 }; - var Con = function () { }; - Con.prototype = proto; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} - var child = new Con(); - child.length = 3; +var proto = { + 0: 0, + 1: 1, + 2: 2, + length: 3 +}; +var Con = function() {}; +Con.prototype = proto; - Array.prototype.reduce.call(child, callbackfn, initialValue); +var child = new Con(); +child.length = 3; + +Array.prototype.reduce.call(child, callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-8.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-8.js index 5906f0d472..08a408abd6 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-8.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-8.js @@ -9,17 +9,18 @@ description: > property on an Array ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; +var initialValue = 0; - Array.prototype[0] = 0; - Array.prototype[1] = 1; - Array.prototype[2] = 2; - [, , , ].reduce(callbackfn, initialValue); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} + +Array.prototype[0] = 0; +Array.prototype[1] = 1; +Array.prototype[2] = 2; +[, , , ].reduce(callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-9.js index 8dcce90a16..5188213e3e 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-9.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-9.js @@ -9,22 +9,27 @@ description: > property on an Array-like object ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; +var initialValue = 0; - var obj = { 0: 0, 2: 2, length: 3 }; - Object.defineProperty(obj, "1", { - get: function () { - return 1; - }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} - Array.prototype.reduce.call(obj, callbackfn, initialValue); +var obj = { + 0: 0, + 2: 2, + length: 3 +}; +Object.defineProperty(obj, "1", { + get: function() { + return 1; + }, + configurable: true +}); + +Array.prototype.reduce.call(obj, callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-1.js index 0b5a92f763..af3c3074e9 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-1.js @@ -9,14 +9,14 @@ description: > (initialvalue not passed) ---*/ - function callbackfn(prevVal, curVal, idx, obj) - { - if(idx > 0 && obj[idx] === curVal && obj[idx-1] === prevVal) - return curVal; - else - return false; - } +function callbackfn(prevVal, curVal, idx, obj) +{ + if (idx > 0 && obj[idx] === curVal && obj[idx - 1] === prevVal) + return curVal; + else + return false; +} - var arr = [0,1,true,null,new Object(),"five"]; +var arr = [0, 1, true, null, new Object(), "five"]; assert.sameValue(arr.reduce(callbackfn), "five", 'arr.reduce(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-10.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-10.js index 6492c1d4b6..9a9a5567d5 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-10.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-10.js @@ -9,11 +9,12 @@ description: > parameter ---*/ - var result = false; - function callbackfn(prevVal) { - result = (prevVal === 1); - } +var result = false; - [11].reduce(callbackfn, 1); +function callbackfn(prevVal) { + result = (prevVal === 1); +} + +[11].reduce(callbackfn, 1); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-11.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-11.js index fe374ad09a..503028a433 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-11.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-11.js @@ -9,11 +9,12 @@ description: > parameter ---*/ - var result = false; - function callbackfn(prevVal, curVal) { - result = (curVal > 10 && 1 === prevVal); - } +var result = false; - [11].reduce(callbackfn, 1); +function callbackfn(prevVal, curVal) { + result = (curVal > 10 && 1 === prevVal); +} + +[11].reduce(callbackfn, 1); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-12.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-12.js index 282d5ccc55..58b12b3d20 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-12.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-12.js @@ -9,11 +9,12 @@ description: > parameter ---*/ - var result = false; - function callbackfn(prevVal, curVal, idx) { - result = (prevVal === 1 && arguments[3][idx] === curVal); - } +var result = false; - [11].reduce(callbackfn, 1); +function callbackfn(prevVal, curVal, idx) { + result = (prevVal === 1 && arguments[3][idx] === curVal); +} + +[11].reduce(callbackfn, 1); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-13.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-13.js index 24cb3df068..170366208a 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-13.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-13.js @@ -9,11 +9,12 @@ description: > parameter ---*/ - var result = false; - function callbackfn(prevVal, curVal, idx, obj) { - result = (prevVal === 1 && obj[idx] === curVal); - } +var result = false; - [11].reduce(callbackfn, 1); +function callbackfn(prevVal, curVal, idx, obj) { + result = (prevVal === 1 && obj[idx] === curVal); +} + +[11].reduce(callbackfn, 1); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-14.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-14.js index 170de856dc..12cf2c4288 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-14.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-14.js @@ -7,11 +7,12 @@ es5id: 15.4.4.21-9-c-ii-14 description: Array.prototype.reduce - callbackfn that uses arguments ---*/ - var result = false; - function callbackfn() { - result = (arguments[0] === 1 && arguments[3][arguments[2]] === arguments[1]); - } +var result = false; - [11].reduce(callbackfn, 1); +function callbackfn() { + result = (arguments[0] === 1 && arguments[3][arguments[2]] === arguments[1]); +} + +[11].reduce(callbackfn, 1); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-16.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-16.js index 3dcd208df0..976b1a2696 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-16.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-16.js @@ -7,24 +7,29 @@ es5id: 15.4.4.21-9-c-ii-16 description: Array.prototype.reduce - non-indexed properties are not called ---*/ - var accessed = false; - var result1 = true; - var result2 = true; +var accessed = false; +var result1 = true; +var result2 = true; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - if (curVal === 8) { - result1 = false; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + if (curVal === 8) { + result1 = false; + } - if (prevVal === 8) { - result2 = false; - } - } + if (prevVal === 8) { + result2 = false; + } +} - var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 }; +var obj = { + 0: 11, + 10: 12, + non_index_property: 8, + length: 20 +}; - Array.prototype.reduce.call(obj, callbackfn, 1); +Array.prototype.reduce.call(obj, callbackfn, 1); assert(result1, 'result1 !== true'); assert(result2, 'result2 !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-17.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-17.js index 0c97041580..1179c4e145 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-17.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-17.js @@ -9,19 +9,20 @@ description: > is the result of previous iteration on an Array ---*/ - var result = true; - var accessed = false; - var preIteration = 1; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - if (preIteration !== prevVal) { - result = false; - } - preIteration = curVal; - return curVal; - } +var result = true; +var accessed = false; +var preIteration = 1; - [11, 12, 13].reduce(callbackfn, 1); +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + if (preIteration !== prevVal) { + result = false; + } + preIteration = curVal; + return curVal; +} + +[11, 12, 13].reduce(callbackfn, 1); assert(result, 'result !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-18.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-18.js index 52d3f41d39..acb90c345a 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-18.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-18.js @@ -10,15 +10,20 @@ description: > Array-like object ---*/ - var result = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 0) { - result = (arguments[0] === 1); - } - } +var result = false; - var obj = { 0: 11, 1: 9, length: 2 }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 0) { + result = (arguments[0] === 1); + } +} - Array.prototype.reduce.call(obj, callbackfn, 1); +var obj = { + 0: 11, + 1: 9, + length: 2 +}; + +Array.prototype.reduce.call(obj, callbackfn, 1); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-19.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-19.js index b423857024..9f6c78aef4 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-19.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-19.js @@ -10,16 +10,17 @@ description: > undefined when 'initialValue' is not present on an Array ---*/ - var called = 0; - var result = false; - function callbackfn(prevVal, curVal, idx, obj) { - called++; - if (idx === 1) { - result = (prevVal === 11) && curVal === 9; - } - } +var called = 0; +var result = false; - [11, 9].reduce(callbackfn); +function callbackfn(prevVal, curVal, idx, obj) { + called++; + if (idx === 1) { + result = (prevVal === 11) && curVal === 9; + } +} + +[11, 9].reduce(callbackfn); assert(result, 'result !== true'); assert.sameValue(called, 1, 'called'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-2.js index 88c46fffc7..024016564a 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-2.js @@ -9,18 +9,19 @@ description: > (initialvalue passed) ---*/ - var bParCorrect = false; - function callbackfn(prevVal, curVal, idx, obj) - { - if(idx === 0 && obj[idx] === curVal && prevVal === initialValue) - return curVal; - else if(idx > 0 && obj[idx] === curVal && obj[idx-1] === prevVal) - return curVal; - else - return false; - } +var bParCorrect = false; - var arr = [0,1,true,null,new Object(),"five"]; - var initialValue = 5.5; +function callbackfn(prevVal, curVal, idx, obj) +{ + if (idx === 0 && obj[idx] === curVal && prevVal === initialValue) + return curVal; + else if (idx > 0 && obj[idx] === curVal && obj[idx - 1] === prevVal) + return curVal; + else + return false; +} -assert.sameValue(arr.reduce(callbackfn,initialValue), "five", 'arr.reduce(callbackfn,initialValue)'); +var arr = [0, 1, true, null, new Object(), "five"]; +var initialValue = 5.5; + +assert.sameValue(arr.reduce(callbackfn, initialValue), "five", 'arr.reduce(callbackfn,initialValue)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-20.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-20.js index 7b7cffb199..2e75523561 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-20.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-20.js @@ -7,13 +7,17 @@ es5id: 15.4.4.21-9-c-ii-20 description: Array.prototype.reduce - undefined can be used as accumulator ---*/ - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return typeof prevVal === "undefined"; - } +var accessed = false; - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return typeof prevVal === "undefined"; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, undefined), true, 'Array.prototype.reduce.call(obj, callbackfn, undefined)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-21.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-21.js index 1b27997018..1864d08fac 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-21.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-21.js @@ -7,13 +7,17 @@ es5id: 15.4.4.21-9-c-ii-21 description: Array.prototype.reduce - null can be used as accumulator ---*/ - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === null; - } +var accessed = false; - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === null; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, null), true, 'Array.prototype.reduce.call(obj, callbackfn, null)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-22.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-22.js index 7a7f286fc0..272db1b967 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-22.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-22.js @@ -9,13 +9,17 @@ description: > accumulator ---*/ - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === false; - } +var accessed = false; - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === false; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, false), true, 'Array.prototype.reduce.call(obj, callbackfn, false)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-23.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-23.js index 0ccff0d309..41fbfeb168 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-23.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-23.js @@ -9,13 +9,17 @@ description: > accumulator ---*/ - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === 12; - } +var accessed = false; - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === 12; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 12), true, 'Array.prototype.reduce.call(obj, callbackfn, 12)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-24.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-24.js index 5c3b4c73d7..64fbb4eb37 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-24.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-24.js @@ -9,13 +9,17 @@ description: > accumulator ---*/ - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === "hello_"; - } +var accessed = false; - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === "hello_"; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, "hello_"), true, 'Array.prototype.reduce.call(obj, callbackfn, "hello_")'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-25.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-25.js index fe4c9a0a0c..7a20725f1f 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-25.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-25.js @@ -7,15 +7,19 @@ es5id: 15.4.4.21-9-c-ii-25 description: Array.prototype.reduce - Function object can be used as accumulator ---*/ - var objFunction = function () { }; +var objFunction = function() {}; - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objFunction; - } +var accessed = false; - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objFunction; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, objFunction), true, 'Array.prototype.reduce.call(obj, callbackfn, objFunction)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-26.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-26.js index 8402e82fa6..44cd75abd6 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-26.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-26.js @@ -7,15 +7,19 @@ es5id: 15.4.4.21-9-c-ii-26 description: Array.prototype.reduce - Array object can be used as accumulator ---*/ - var objArray = new Array(10); +var objArray = new Array(10); - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objArray; - } +var accessed = false; - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objArray; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, objArray), true, 'Array.prototype.reduce.call(obj, callbackfn, objArray)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-27.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-27.js index 951df7bd95..decc22588b 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-27.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-27.js @@ -7,15 +7,19 @@ es5id: 15.4.4.21-9-c-ii-27 description: Array.prototype.reduce - String object can be used as accumulator ---*/ - var objString = new String(); +var objString = new String(); - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objString; - } +var accessed = false; - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objString; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, objString), true, 'Array.prototype.reduce.call(obj, callbackfn, objString)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-28.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-28.js index ca6c358b35..2eca0b849d 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-28.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-28.js @@ -7,15 +7,19 @@ es5id: 15.4.4.21-9-c-ii-28 description: Array.prototype.reduce - Boolean object can be used as accumulator ---*/ - var objBoolean = new Boolean(); +var objBoolean = new Boolean(); - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objBoolean; - } +var accessed = false; - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objBoolean; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, objBoolean), true, 'Array.prototype.reduce.call(obj, callbackfn, objBoolean)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-29.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-29.js index 251e405a9b..03ed7c189f 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-29.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-29.js @@ -7,15 +7,19 @@ es5id: 15.4.4.21-9-c-ii-29 description: Array.prototype.reduce - Number object can be used as accumulator ---*/ - var objNumber = new Number(); +var objNumber = new Number(); - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objNumber; - } +var accessed = false; - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objNumber; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, objNumber), true, 'Array.prototype.reduce.call(obj, callbackfn, objNumber)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-3.js index 1f93af90c5..dfd7391271 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-3.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-3.js @@ -7,16 +7,17 @@ es5id: 15.4.4.21-9-c-ii-3 description: Array.prototype.reduce - callbackfn takes 4 arguments ---*/ - var bCalled = false; - function callbackfn(prevVal, curVal, idx, obj) - { - bCalled = true; - if(prevVal === true && arguments.length === 4) - return true; - else - return false; - } - var arr = [0,1,2,3,4,5,6,7,8,9]; +var bCalled = false; -assert.sameValue(arr.reduce(callbackfn,true), true, 'arr.reduce(callbackfn,true)'); +function callbackfn(prevVal, curVal, idx, obj) +{ + bCalled = true; + if (prevVal === true && arguments.length === 4) + return true; + else + return false; +} +var arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + +assert.sameValue(arr.reduce(callbackfn, true), true, 'arr.reduce(callbackfn,true)'); assert.sameValue(bCalled, true, 'bCalled'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-30.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-30.js index 0b3202e748..2cc426a8d2 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-30.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-30.js @@ -7,13 +7,17 @@ es5id: 15.4.4.21-9-c-ii-30 description: Array.prototype.reduce - the Math object can be used as accumulator ---*/ - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === Math; - } +var accessed = false; - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === Math; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, Math), true, 'Array.prototype.reduce.call(obj, callbackfn, Math)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-31.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-31.js index 6e4c92b939..4bf720831f 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-31.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-31.js @@ -7,15 +7,19 @@ es5id: 15.4.4.21-9-c-ii-31 description: Array.prototype.reduce - Date object can be used as accumulator ---*/ - var objDate = new Date(); +var objDate = new Date(); - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objDate; - } +var accessed = false; - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objDate; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, objDate), true, 'Array.prototype.reduce.call(obj, callbackfn, objDate)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-32.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-32.js index 8a0f61496f..de51b59f3e 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-32.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-32.js @@ -7,15 +7,19 @@ es5id: 15.4.4.21-9-c-ii-32 description: Array.prototype.reduce - RegExp object can be used as accumulator ---*/ - var objRegExp = new RegExp(); +var objRegExp = new RegExp(); - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objRegExp; - } +var accessed = false; - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objRegExp; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, objRegExp), true, 'Array.prototype.reduce.call(obj, callbackfn, objRegExp)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-33.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-33.js index c010c39ff1..b5cdc3cc86 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-33.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-33.js @@ -7,13 +7,17 @@ es5id: 15.4.4.21-9-c-ii-33 description: Array.prototype.reduce - the JSON can be used as accumulator ---*/ - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === JSON; - } +var accessed = false; - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === JSON; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, JSON), true, 'Array.prototype.reduce.call(obj, callbackfn, JSON)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-34.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-34.js index 8f6dbd8885..9df298c155 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-34.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-34.js @@ -7,15 +7,19 @@ es5id: 15.4.4.21-9-c-ii-34 description: Array.prototype.reduce - Error object can be used as accumulator ---*/ - var objError = new RangeError(); +var objError = new RangeError(); - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objError; - } +var accessed = false; - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objError; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, objError), true, 'Array.prototype.reduce.call(obj, callbackfn, objError)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-35.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-35.js index 30daec0a86..8d01e4e831 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-35.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-35.js @@ -9,19 +9,22 @@ description: > accumulator ---*/ - var accessed = false; - var arg; +var accessed = false; +var arg; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === arg; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === arg; +} - var obj = { 0: 11, length: 1 }; +var obj = { + 0: 11, + length: 1 +}; - (function fun() { - arg = arguments; - }(10, 11, 12, 13)); +(function fun() { + arg = arguments; +}(10, 11, 12, 13)); assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, arg), true, 'Array.prototype.reduce.call(obj, callbackfn, arg)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-37.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-37.js index a0a46fa90b..bb97f5f54b 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-37.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-37.js @@ -10,13 +10,17 @@ description: > ---*/ var global = this; - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === global; - } +var accessed = false; - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === global; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, this), true, 'Array.prototype.reduce.call(obj, callbackfn, this)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-4-s.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-4-s.js index 1d1517917c..89872b1279 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-4-s.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-4-s.js @@ -10,13 +10,14 @@ description: > flags: [noStrict] ---*/ - var innerThisCorrect = false; - function callbackfn(prevVal, curVal, idx, obj) - { - "use strict"; - innerThisCorrect = this===undefined; - return true; - } - [0].reduce(callbackfn,true); +var innerThisCorrect = false; + +function callbackfn(prevVal, curVal, idx, obj) +{ + "use strict"; + innerThisCorrect = this === undefined; + return true; +} +[0].reduce(callbackfn, true); assert(innerThisCorrect, 'innerThisCorrect !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-4.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-4.js index 5b70ba2204..f0982335e1 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-4.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-4.js @@ -9,21 +9,21 @@ description: > order on an Array ---*/ - var arr = [0, 1, 2]; - var lastIdx = 0; - var result = true; - var accessed = false; +var arr = [0, 1, 2]; +var lastIdx = 0; +var result = true; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - if (lastIdx !== idx) { - result = false; - } else { - lastIdx++; - } - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + if (lastIdx !== idx) { + result = false; + } else { + lastIdx++; + } +} - arr.reduce(callbackfn, 11); +arr.reduce(callbackfn, 11); assert(result, 'result !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-5.js index 4476ea3d03..2a7ad3a6a8 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-5.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-5.js @@ -9,26 +9,26 @@ description: > iteration and not prior to starting the loop on an Array ---*/ - var result = true; - var kIndex = []; - var called = 0; +var result = true; +var kIndex = []; +var called = 0; - //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. - function callbackfn(prevVal, curVal, idx, obj) { - //Each position should be visited one time, which means k is accessed one time during iterations. - called++; - if (typeof kIndex[idx] === "undefined") { - //when current position is visited, its previous index should has been visited. - if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") { - result = false; - } - kIndex[idx] = 1; - } else { - result = false; - } - } +//By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. +function callbackfn(prevVal, curVal, idx, obj) { + //Each position should be visited one time, which means k is accessed one time during iterations. + called++; + if (typeof kIndex[idx] === "undefined") { + //when current position is visited, its previous index should has been visited. + if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") { + result = false; + } + kIndex[idx] = 1; + } else { + result = false; + } +} - [11, 12, 13, 14].reduce(callbackfn, 1); +[11, 12, 13, 14].reduce(callbackfn, 1); assert(result, 'result !== true'); assert.sameValue(called, 4, 'called'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-7.js index 9f76afad69..31c3a8c588 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-7.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-7.js @@ -9,19 +9,24 @@ description: > callbackfn terminate iteration ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 0) { - accessed = true; - } - if (idx === 0) { - throw new Error("Exception occurred in callbackfn"); - } - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 0) { + accessed = true; + } + if (idx === 0) { + throw new Error("Exception occurred in callbackfn"); + } +} - var obj = { 0: 11, 4: 10, 10: 8, length: 20 }; +var obj = { + 0: 11, + 4: 10, + 10: 8, + length: 20 +}; assert.throws(Error, function() { - Array.prototype.reduce.call(obj, callbackfn, 1); + Array.prototype.reduce.call(obj, callbackfn, 1); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-8.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-8.js index b3395afcce..e3ed219e68 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-8.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-8.js @@ -9,19 +9,24 @@ description: > iterations is observed ---*/ - var result = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 0) { - obj[idx + 1] = 8; - } +var result = false; - if (idx === 1) { - result = (curVal === 8); - } - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 0) { + obj[idx + 1] = 8; + } - var obj = { 0: 11, 1: 12, length: 2 }; + if (idx === 1) { + result = (curVal === 8); + } +} - Array.prototype.reduce.call(obj, callbackfn, 1); +var obj = { + 0: 11, + 1: 12, + length: 2 +}; + +Array.prototype.reduce.call(obj, callbackfn, 1); assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-9.js index a8f5758d3f..c9d0ae895b 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-9.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-9.js @@ -9,11 +9,12 @@ description: > parameter ---*/ - var called = 0; - function callbackfn() { - called++; - } +var called = 0; - [11, 12].reduce(callbackfn, 1); +function callbackfn() { + called++; +} + +[11, 12].reduce(callbackfn, 1); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-1.js index 7650b6531b..5a64f1472e 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-1.js @@ -9,5 +9,5 @@ description: Array.prototype.reduceRight applied to undefined throws a TypeError assert.throws(TypeError, function() { - Array.prototype.reduceRight.call(undefined); + Array.prototype.reduceRight.call(undefined); }); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-10.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-10.js index 341dac7295..fb0a1f9f89 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-10.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-10.js @@ -7,15 +7,15 @@ es5id: 15.4.4.22-1-10 description: Array.prototype.reduceRight applied to the Math object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return '[object Math]' === Object.prototype.toString.call(obj); - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return '[object Math]' === Object.prototype.toString.call(obj); +} - Math.length = 1; - Math[0] = 1; +Math.length = 1; +Math[0] = 1; assert(Array.prototype.reduceRight.call(Math, callbackfn, 1), 'Array.prototype.reduceRight.call(Math, callbackfn, 1) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-11.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-11.js index 447771e6ed..610b412912 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-11.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-11.js @@ -7,15 +7,15 @@ es5id: 15.4.4.22-1-11 description: Array.prototype.reduceRight applied to Date object ---*/ - var obj = new Date(); - obj.length = 1; - obj[0] = 1; - var accessed = false; +var obj = new Date(); +obj.length = 1; +obj[0] = 1; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj instanceof Date; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj instanceof Date; +} assert(Array.prototype.reduceRight.call(obj, callbackfn, 1), 'Array.prototype.reduceRight.call(obj, callbackfn, 1) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-12.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-12.js index 06834d39e4..efc9fa2e3a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-12.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-12.js @@ -7,15 +7,15 @@ es5id: 15.4.4.22-1-12 description: Array.prototype.reduceRight applied to RegExp object ---*/ - var obj = new RegExp(); - obj.length = 1; - obj[0] = 1; - var accessed = false; +var obj = new RegExp(); +obj.length = 1; +obj[0] = 1; +var accessed = false; - function callbackfn(prevVal, curVal, idx, o) { - accessed = true; - return o instanceof RegExp; - } +function callbackfn(prevVal, curVal, idx, o) { + accessed = true; + return o instanceof RegExp; +} assert(Array.prototype.reduceRight.call(obj, callbackfn, 1), 'Array.prototype.reduceRight.call(obj, callbackfn, 1) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-13.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-13.js index 9d6b8f83cb..822d57425d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-13.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-13.js @@ -7,15 +7,15 @@ es5id: 15.4.4.22-1-13 description: Array.prototype.reduceRight applied to the JSON object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return ('[object JSON]' === Object.prototype.toString.call(obj)); - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return ('[object JSON]' === Object.prototype.toString.call(obj)); +} - JSON.length = 1; - JSON[0] = 1; +JSON.length = 1; +JSON[0] = 1; assert(Array.prototype.reduceRight.call(JSON, callbackfn, 1), 'Array.prototype.reduceRight.call(JSON, callbackfn, 1) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-14.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-14.js index 6b7e76ea42..4d8557c59b 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-14.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-14.js @@ -7,15 +7,15 @@ es5id: 15.4.4.22-1-14 description: Array.prototype.reduceRight applied to Error object ---*/ - var obj = new Error(); - obj.length = 1; - obj[0] = 1; - var accessed = false; +var obj = new Error(); +obj.length = 1; +obj[0] = 1; +var accessed = false; - function callbackfn(prevVal, curVal, idx, o) { - accessed = true; - return o instanceof Error; - } +function callbackfn(prevVal, curVal, idx, o) { + accessed = true; + return o instanceof Error; +} assert(Array.prototype.reduceRight.call(obj, callbackfn, 1), 'Array.prototype.reduceRight.call(obj, callbackfn, 1) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-15.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-15.js index 8e739dfaba..a2bb8a9ffc 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-15.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-15.js @@ -7,16 +7,16 @@ es5id: 15.4.4.22-1-15 description: Array.prototype.reduceRight applied to the Arguments object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return '[object Arguments]' === Object.prototype.toString.call(obj); - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return '[object Arguments]' === Object.prototype.toString.call(obj); +} - var obj = (function () { - return arguments; - }("a", "b")); +var obj = (function() { + return arguments; +}("a", "b")); assert(Array.prototype.reduceRight.call(obj, callbackfn, "a"), 'Array.prototype.reduceRight.call(obj, callbackfn, "a") !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-2.js index 602cef5da8..cf08c68a5a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-2.js @@ -9,5 +9,5 @@ description: Array.prototype.reduceRight applied to null throws a TypeError assert.throws(TypeError, function() { - Array.prototype.reduceRight.call(null); + Array.prototype.reduceRight.call(null); }); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-3.js index 54f2c207a6..6fca6c3040 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-3.js @@ -7,15 +7,15 @@ es5id: 15.4.4.22-1-3 description: Array.prototype.reduceRight applied to boolean primitive ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj instanceof Boolean; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj instanceof Boolean; +} - Boolean.prototype[0] = 1; - Boolean.prototype.length = 1; +Boolean.prototype[0] = 1; +Boolean.prototype.length = 1; assert(Array.prototype.reduceRight.call(false, callbackfn, 1), 'Array.prototype.reduceRight.call(false, callbackfn, 1) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-4.js index 77427f29cd..d782446858 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-4.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-4.js @@ -7,16 +7,16 @@ es5id: 15.4.4.22-1-4 description: Array.prototype.reduceRight applied to Boolean object ---*/ - var obj = new Boolean(true); - obj.length = 2; - obj[0] = 11; - obj[1] = 12; - var accessed = false; +var obj = new Boolean(true); +obj.length = 2; +obj[0] = 11; +obj[1] = 12; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj instanceof Boolean; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj instanceof Boolean; +} assert(Array.prototype.reduceRight.call(obj, callbackfn, 11), 'Array.prototype.reduceRight.call(obj, callbackfn, 11) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-5.js index 59244bbe90..c83b156f04 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-5.js @@ -7,15 +7,15 @@ es5id: 15.4.4.22-1-5 description: Array.prototype.reduceRight applied to number primitive ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj instanceof Number; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj instanceof Number; +} - Number.prototype[0] = 1; - Number.prototype.length = 1; +Number.prototype[0] = 1; +Number.prototype.length = 1; assert(Array.prototype.reduceRight.call(2.5, callbackfn, 1), 'Array.prototype.reduceRight.call(2.5, callbackfn, 1) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-6.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-6.js index a0c2df0e81..9d1c2792a3 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-6.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-6.js @@ -7,16 +7,16 @@ es5id: 15.4.4.22-1-6 description: Array.prototype.reduceRight applied to Number object ---*/ - var obj = new Number(-128); - obj.length = 2; - obj[0] = 11; - obj[1] = 12; - var accessed = false; +var obj = new Number(-128); +obj.length = 2; +obj[0] = 11; +obj[1] = 12; +var accessed = false; - function callbackfn(prevVal, curVal, idx, o) { - accessed = true; - return o instanceof Number; - } +function callbackfn(prevVal, curVal, idx, o) { + accessed = true; + return o instanceof Number; +} assert(Array.prototype.reduceRight.call(obj, callbackfn, 11), 'Array.prototype.reduceRight.call(obj, callbackfn, 11) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-7.js index 6e368cfffd..7c3dabefe4 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-7.js @@ -7,12 +7,12 @@ es5id: 15.4.4.22-1-7 description: Array.prototype.reduceRight applied to string primitive ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj instanceof String; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj instanceof String; +} assert(Array.prototype.reduceRight.call("hello\nworld\\!", callbackfn, "h"), 'Array.prototype.reduceRight.call("hello\nworld\\!", callbackfn, "h") !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-8.js index d034b48b39..9f6ee35dbc 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-8.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-8.js @@ -7,13 +7,13 @@ es5id: 15.4.4.22-1-8 description: Array.prototype.reduceRight applied to String object ---*/ - var obj = new String("hello\nworld\\!"); - var accessed = false; +var obj = new String("hello\nworld\\!"); +var accessed = false; - function callbackfn(prevVal, curVal, idx, o) { - accessed = true; - return o instanceof String; - } +function callbackfn(prevVal, curVal, idx, o) { + accessed = true; + return o instanceof String; +} assert(Array.prototype.reduceRight.call(obj, callbackfn, "h"), 'Array.prototype.reduceRight.call(obj, callbackfn, "h") !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-9.js index 1820f546c1..42e6c8ca6b 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-9.js @@ -7,17 +7,17 @@ es5id: 15.4.4.22-1-9 description: Array.prototype.reduceRight applied to Function object ---*/ - var obj = function (a, b) { - return a + b; - }; - obj[0] = 11; - obj[1] = 9; - var accessed = false; +var obj = function(a, b) { + return a + b; +}; +obj[0] = 11; +obj[1] = 9; +var accessed = false; - function callbackfn(prevVal, curVal, idx, o) { - accessed = true; - return o instanceof Function; - } +function callbackfn(prevVal, curVal, idx, o) { + accessed = true; + return o instanceof Function; +} assert(Array.prototype.reduceRight.call(obj, callbackfn, 11), 'Array.prototype.reduceRight.call(obj, callbackfn, 11) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-1.js index d9b0c874d8..eaaca4897c 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-1.js @@ -9,12 +9,12 @@ description: > is called on ---*/ - function callbackfn(prevVal, curVal, idx, obj) - { - return 1; - } - var srcArr = [1,2,3,4,5]; - srcArr.reduceRight(callbackfn); +function callbackfn(prevVal, curVal, idx, obj) +{ + return 1; +} +var srcArr = [1, 2, 3, 4, 5]; +srcArr.reduceRight(callbackfn); assert.sameValue(srcArr[0], 1, 'srcArr[0]'); assert.sameValue(srcArr[1], 2, 'srcArr[1]'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-2.js index 1b34162cfa..cffd5e08e1 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-2.js @@ -9,10 +9,10 @@ description: > indices ---*/ - function callbackfn(prevVal, curVal, idx, obj) - { - return prevVal + curVal; - } - var srcArr = ['1','2','3','4','5']; +function callbackfn(prevVal, curVal, idx, obj) +{ + return prevVal + curVal; +} +var srcArr = ['1', '2', '3', '4', '5']; assert.sameValue(srcArr.reduceRight(callbackfn), '54321', 'srcArr.reduceRight(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-3.js index 6e47fd8715..de4a59b0c2 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-3.js @@ -7,10 +7,11 @@ es5id: 15.4.4.22-10-3 description: Array.prototype.reduceRight - subclassed array with length 1 ---*/ - foo.prototype = [1]; - function foo() {} - var f = new foo(); +foo.prototype = [1]; - function cb(){} +function foo() {} +var f = new foo(); + +function cb() {} assert.sameValue(f.reduceRight(cb), 1, 'f.reduceRight(cb)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-4.js index 76afe60296..7726d9fde8 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-4.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-4.js @@ -9,10 +9,13 @@ description: > than 1 ---*/ - foo.prototype = new Array(0, 1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(0, 1, 2, 3); - function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} +function foo() {} +var f = new foo(); + +function cb(prevVal, curVal, idx, obj) { + return prevVal + curVal; +} assert.sameValue(f.reduceRight(cb), 6, 'f.reduceRight(cb)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-5.js index 78e6d744fa..c5c29eb025 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-5.js @@ -9,10 +9,10 @@ description: > indices(initialvalue present) ---*/ - function callbackfn(prevVal, curVal, idx, obj) - { - return prevVal + curVal; - } - var srcArr = ['1','2','3','4','5']; +function callbackfn(prevVal, curVal, idx, obj) +{ + return prevVal + curVal; +} +var srcArr = ['1', '2', '3', '4', '5']; -assert.sameValue(srcArr.reduceRight(callbackfn,'6'), '654321', 'srcArr.reduceRight(callbackfn,"6")'); +assert.sameValue(srcArr.reduceRight(callbackfn, '6'), '654321', 'srcArr.reduceRight(callbackfn,"6")'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-6.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-6.js index 1ce24519ca..37cb4705e4 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-6.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-6.js @@ -9,10 +9,13 @@ description: > provided ---*/ - foo.prototype = new Array(0, 1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(0, 1, 2, 3); - function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} +function foo() {} +var f = new foo(); -assert.sameValue(f.reduceRight(cb,"4"), "43210", 'f.reduceRight(cb,"4")'); +function cb(prevVal, curVal, idx, obj) { + return prevVal + curVal; +} + +assert.sameValue(f.reduceRight(cb, "4"), "43210", 'f.reduceRight(cb,"4")'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-7.js index 27be976b4b..813179ec75 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-7.js @@ -9,10 +9,13 @@ description: > and initialvalue provided ---*/ - foo.prototype = [1]; - function foo() {} - var f = new foo(); +foo.prototype = [1]; - function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} +function foo() {} +var f = new foo(); -assert.sameValue(f.reduceRight(cb,"4"), "41", 'f.reduceRight(cb,"4")'); +function cb(prevVal, curVal, idx, obj) { + return prevVal + curVal; +} + +assert.sameValue(f.reduceRight(cb, "4"), "41", 'f.reduceRight(cb,"4")'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-8.js index 8a9eb81650..a9aa697407 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-8.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-8.js @@ -7,15 +7,16 @@ es5id: 15.4.4.22-10-8 description: Array.prototype.reduceRight doesn't visit expandos ---*/ - var callCnt = 0; - function callbackfn(prevVal, curVal, idx, obj) - { - callCnt++; - } - var srcArr = ['1','2','3','4','5']; - srcArr["i"] = 10; - srcArr[true] = 11; +var callCnt = 0; - srcArr.reduceRight(callbackfn); +function callbackfn(prevVal, curVal, idx, obj) +{ + callCnt++; +} +var srcArr = ['1', '2', '3', '4', '5']; +srcArr["i"] = 10; +srcArr[true] = 11; + +srcArr.reduceRight(callbackfn); assert.sameValue(callCnt, 4, 'callCnt'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-1.js index 5da45ad9da..5a7a0af527 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-1.js @@ -9,18 +9,18 @@ description: > is an own data property ---*/ - var accessed = false; - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: 2 - }; +var accessed = false; +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: 2 +}; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj.length === 2; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj.length === 2; +} assert(Array.prototype.reduceRight.call(obj, callbackfn, 11), 'Array.prototype.reduceRight.call(obj, callbackfn, 11) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-10.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-10.js index ad204a77ba..035cc1c822 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-10.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-10.js @@ -9,30 +9,30 @@ description: > is an inherited accessor property ---*/ - var accessed = false; - var Con = function () { }; +var accessed = false; +var Con = function() {}; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj.length === 2; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj.length === 2; +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(proto, "length", { + get: function() { + return 2; + }, + configurable: true +}); - Con.prototype = proto; +Con.prototype = proto; - var child = new Con(); - child[0] = 12; - child[1] = 11; - child[2] = 9; +var child = new Con(); +child[0] = 12; +child[1] = 11; +child[2] = 9; assert(Array.prototype.reduceRight.call(child, callbackfn, 11), 'Array.prototype.reduceRight.call(child, callbackfn, 11) !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-11.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-11.js index dc8d017bd6..ffd66953e4 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-11.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-11.js @@ -9,21 +9,21 @@ description: > is an own accessor property without a get function ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return typeof obj.length === "undefined"; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return typeof obj.length === "undefined"; +} - var obj = { - 0: 11, - 1: 12 - }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); +var obj = { + 0: 11, + 1: 12 +}; +Object.defineProperty(obj, "length", { + set: function() {}, + configurable: true +}); assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 111), 111, 'Array.prototype.reduceRight.call(obj, callbackfn, 111)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-12.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-12.js index c162760d00..b685810f9a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-12.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-12.js @@ -10,25 +10,28 @@ description: > property ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return typeof obj.length === "undefined"; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return typeof obj.length === "undefined"; +} - Object.defineProperty(Object.prototype, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(Object.prototype, "length", { + get: function() { + return 2; + }, + configurable: true +}); - var obj = { 0: 12, 1: 13 }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); +var obj = { + 0: 12, + 1: 13 +}; +Object.defineProperty(obj, "length", { + set: function() {}, + configurable: true +}); assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 11), 11, 'Array.prototype.reduceRight.call(obj, callbackfn, 11)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-13.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-13.js index 56f37873fa..7cdaf568c6 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-13.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-13.js @@ -9,25 +9,25 @@ description: > 'length' is inherited accessor property without a get function ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return curVal > 10; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return curVal > 10; +} - var proto = {}; - Object.defineProperty(proto, "length", { - set: function () { }, - configurable: true - }); +var proto = {}; +Object.defineProperty(proto, "length", { + set: function() {}, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[0] = 11; - child[1] = 12; +var child = new Con(); +child[0] = 11; +child[1] = 12; assert.sameValue(Array.prototype.reduceRight.call(child, callbackfn, 111), 111, 'Array.prototype.reduceRight.call(child, callbackfn, 111)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-14.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-14.js index 26f6a9d37d..75d312923b 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-14.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-14.js @@ -9,13 +9,16 @@ description: > 'length' property doesn't exist ---*/ - var obj = { 0: 11, 1: 12 }; - var accessed = false; +var obj = { + 0: 11, + 1: 12 +}; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return curVal > 10; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return curVal > 10; +} assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 111), 111, 'Array.prototype.reduceRight.call(obj, callbackfn, 111)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-17.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-17.js index 41f7352af6..b888b562e2 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-17.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-17.js @@ -9,18 +9,18 @@ description: > implements its own property get method ---*/ - var arg; - var accessed = false; +var arg; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj.length === 2; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj.length === 2; +} - var func = function (a, b) { - arg = arguments; - return Array.prototype.reduceRight.call(arguments, callbackfn, 11); - }; +var func = function(a, b) { + arg = arguments; + return Array.prototype.reduceRight.call(arguments, callbackfn, 11); +}; assert(func(12, 11), 'func(12, 11) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-18.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-18.js index 89f7a89fa6..bc036bf488 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-18.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-18.js @@ -9,15 +9,15 @@ description: > implements its own property get method ---*/ - var accessed = false; - var str = new String("432"); +var accessed = false; +var str = new String("432"); - function callbackfn(preVal, curVal, idx, obj) { - accessed = true; - return obj.length === 3; - } +function callbackfn(preVal, curVal, idx, obj) { + accessed = true; + return obj.length === 3; +} - String.prototype[3] = "1"; +String.prototype[3] = "1"; assert(Array.prototype.reduceRight.call(str, callbackfn, 111), 'Array.prototype.reduceRight.call(str, callbackfn, 111) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-19.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-19.js index 08bdd46df1..f76fdf2239 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-19.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-19.js @@ -9,18 +9,18 @@ description: > implements its own property get method ---*/ - var accessed = false; - var fun = function (a, b) { - return a + b; - }; - fun[0] = 12; - fun[1] = 11; - fun[2] = 9; +var accessed = false; +var fun = function(a, b) { + return a + b; +}; +fun[0] = 12; +fun[1] = 11; +fun[2] = 9; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj.length === 2; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj.length === 2; +} assert(Array.prototype.reduceRight.call(fun, callbackfn, 11), 'Array.prototype.reduceRight.call(fun, callbackfn, 11) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-2.js index c56d545b43..b2b8335e1c 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-2.js @@ -9,12 +9,12 @@ description: > Array ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj.length === 2; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj.length === 2; +} assert([12, 11].reduceRight(callbackfn, 11), '[12, 11].reduceRight(callbackfn, 11) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-3.js index feff6998df..ef1d83a5d7 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-3.js @@ -9,23 +9,25 @@ description: > is an own data property that overrides an inherited data property ---*/ - var accessed = true; +var accessed = true; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj.length === 2; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj.length === 2; +} - var proto = { length: 3 }; +var proto = { + length: 3 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 2; - child[0] = 12; - child[1] = 11; - child[2] = 9; +var child = new Con(); +child.length = 2; +child[0] = 12; +child[1] = 11; +child[2] = 9; assert(Array.prototype.reduceRight.call(child, callbackfn), 'Array.prototype.reduceRight.call(child, callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-4.js index 0a1b81254b..4335394fa0 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-4.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-4.js @@ -9,15 +9,16 @@ description: > overrides an inherited data property on an Array ---*/ - var accessed = false; - var arrProtoLen; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj.length === 2; - } +var accessed = false; +var arrProtoLen; - arrProtoLen = Array.prototype.length; - Array.prototype.length = 0; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj.length === 2; +} + +arrProtoLen = Array.prototype.length; +Array.prototype.length = 0; assert([12, 11].reduceRight(callbackfn, 11), '[12, 11].reduceRight(callbackfn, 11) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-5.js index 3fcf425de9..50e35c3b48 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-5.js @@ -10,32 +10,32 @@ description: > property ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj.length === 2; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj.length === 2; +} - var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 3; - }, - configurable: true - }); +var proto = {}; +Object.defineProperty(proto, "length", { + get: function() { + return 3; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - Object.defineProperty(child, "length", { - value: 2, - configurable: true - }); - child[0] = 12; - child[1] = 11; - child[2] = 9; +var child = new Con(); +Object.defineProperty(child, "length", { + value: 2, + configurable: true +}); +child[0] = 12; +child[1] = 11; +child[2] = 9; assert(Array.prototype.reduceRight.call(child, callbackfn), 'Array.prototype.reduceRight.call(child, callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-6.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-6.js index b31b796cbd..d41b9630ae 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-6.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-6.js @@ -9,20 +9,22 @@ description: > is an inherited data property ---*/ - var accessed = false; - var proto = { length: 2 }; - var Con = function () { }; - Con.prototype = proto; +var accessed = false; +var proto = { + length: 2 +}; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[0] = 12; - child[1] = 11; - child[2] = 9; +var child = new Con(); +child[0] = 12; +child[1] = 11; +child[2] = 9; - function callbackfn1(prevVal, curVal, idx, obj) { - accessed = true; - return obj.length === 2; - } +function callbackfn1(prevVal, curVal, idx, obj) { + accessed = true; + return obj.length === 2; +} assert(Array.prototype.reduceRight.call(child, callbackfn1, 11), 'Array.prototype.reduceRight.call(child, callbackfn1, 11) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-7.js index 1400c9e8eb..836ed95e1f 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-7.js @@ -9,23 +9,23 @@ description: > is an own accessor property ---*/ - var accessed = true; - var obj = {}; - obj[0] = 12; - obj[1] = 11; - obj[2] = 9; +var accessed = true; +var obj = {}; +obj[0] = 12; +obj[1] = 11; +obj[2] = 9; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj.length === 2; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj.length === 2; +} - Object.defineProperty(obj, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return 2; + }, + configurable: true +}); assert(Array.prototype.reduceRight.call(obj, callbackfn, 11), 'Array.prototype.reduceRight.call(obj, callbackfn, 11) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-8.js index 85912235a3..f867632c02 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-8.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-8.js @@ -10,30 +10,32 @@ description: > property ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj.length === 2; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj.length === 2; +} - var proto = { length: 3 }; +var proto = { + length: 3 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); +var child = new Con(); - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(child, "length", { + get: function() { + return 2; + }, + configurable: true +}); - child[0] = 12; - child[1] = 11; - child[2] = 9; +child[0] = 12; +child[1] = 11; +child[2] = 9; assert(Array.prototype.reduceRight.call(child, callbackfn, 11), 'Array.prototype.reduceRight.call(child, callbackfn, 11) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-9.js index 139b4d1751..d47f6150fb 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-9.js @@ -10,34 +10,34 @@ description: > property ---*/ - var accessed = false; +var accessed = false; - function callbackfn1(prevVal, curVal, idx, obj) { - accessed = true; - return obj.length === 2; - } +function callbackfn1(prevVal, curVal, idx, obj) { + accessed = true; + return obj.length === 2; +} - var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 3; - }, - configurable: true - }); +var proto = {}; +Object.defineProperty(proto, "length", { + get: function() { + return 3; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); - child[0] = 12; - child[1] = 11; - child[2] = 9; +var child = new Con(); +Object.defineProperty(child, "length", { + get: function() { + return 2; + }, + configurable: true +}); +child[0] = 12; +child[1] = 11; +child[2] = 9; assert(Array.prototype.reduceRight.call(child, callbackfn1, 111), 'Array.prototype.reduceRight.call(child, callbackfn1, 111) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-1.js index d309b78ac3..7ce837aeb6 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-1.js @@ -7,13 +7,16 @@ es5id: 15.4.4.22-3-1 description: Array.prototype.reduceRight - value of 'length' is undefined ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; +} - var obj = { 0: 9, length: undefined }; +var obj = { + 0: 9, + length: undefined +}; assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 1), 1, 'Array.prototype.reduceRight.call(obj, callbackfn, 1)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-10.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-10.js index be485e4db8..938371d986 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-10.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-10.js @@ -9,13 +9,16 @@ description: > is NaN) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; +} - var obj = { 0: 9, length: NaN }; +var obj = { + 0: 9, + length: NaN +}; assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 1), 1, 'Array.prototype.reduceRight.call(obj, callbackfn, 1)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-11.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-11.js index c5d9cb5abc..63f6e57121 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-11.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-11.js @@ -9,22 +9,28 @@ description: > containing a positive number ---*/ - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } +var testResult1 = true; +var testResult2 = false; - if (idx === 1) { - testResult2 = true; - } - return false; - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } - var obj = { 0: 12, 1: 11, 2: 9, length: "2" }; + if (idx === 1) { + testResult2 = true; + } + return false; +} - Array.prototype.reduceRight.call(obj, callbackfn, 1); +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: "2" +}; + +Array.prototype.reduceRight.call(obj, callbackfn, 1); assert(testResult1, 'testResult1 !== true'); assert(testResult2, 'testResult2 !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-12.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-12.js index f81ce7b4c9..3a209ff400 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-12.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-12.js @@ -9,22 +9,28 @@ description: > containing a negative number ---*/ - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } +var testResult1 = true; +var testResult2 = false; - if (idx === 1) { - testResult2 = true; - } - return false; - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } - var obj = { 0: 11, 1: 12, 2: 9, length: "-4294967294" }; + if (idx === 1) { + testResult2 = true; + } + return false; +} - Array.prototype.reduceRight.call(obj, callbackfn, 1); +var obj = { + 0: 11, + 1: 12, + 2: 9, + length: "-4294967294" +}; + +Array.prototype.reduceRight.call(obj, callbackfn, 1); assert(testResult1, 'testResult1 !== true'); assert.sameValue(testResult2, false, 'testResult2'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-13.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-13.js index 054d4cf94c..6fb47ffde7 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-13.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-13.js @@ -9,22 +9,28 @@ description: > containing a decimal number ---*/ - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } +var testResult1 = true; +var testResult2 = false; - if (idx === 1) { - testResult2 = true; - } - return false; - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } - var obj = { 0: 12, 1: 11, 2: 9, length: "2.5" }; + if (idx === 1) { + testResult2 = true; + } + return false; +} - Array.prototype.reduceRight.call(obj, callbackfn, 1); +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: "2.5" +}; + +Array.prototype.reduceRight.call(obj, callbackfn, 1); assert(testResult1, 'testResult1 !== true'); assert(testResult2, 'testResult2 !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-14.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-14.js index 8f7aeeb382..8fc2ef112a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-14.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-14.js @@ -9,13 +9,16 @@ description: > containing -Infinity ---*/ - var accessed2 = false; +var accessed2 = false; - function callbackfn2(prevVal, curVal, idx, obj) { - accessed2 = true; - } +function callbackfn2(prevVal, curVal, idx, obj) { + accessed2 = true; +} - var obj2 = { 0: 9, length: "-Infinity" }; +var obj2 = { + 0: 9, + length: "-Infinity" +}; assert.sameValue(Array.prototype.reduceRight.call(obj2, callbackfn2, 2), 2, 'Array.prototype.reduceRight.call(obj2, callbackfn2, 2)'); assert.sameValue(accessed2, false, 'accessed2'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-15.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-15.js index a77e817bd3..dc7937f776 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-15.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-15.js @@ -9,22 +9,28 @@ description: > containing an exponential number ---*/ - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } +var testResult1 = true; +var testResult2 = false; - if (idx === 1) { - testResult2 = true; - } - return false; - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } - var obj = { 0: 12, 1: 11, 2: 9, length: "2E0" }; + if (idx === 1) { + testResult2 = true; + } + return false; +} - Array.prototype.reduceRight.call(obj, callbackfn, 1); +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: "2E0" +}; + +Array.prototype.reduceRight.call(obj, callbackfn, 1); assert(testResult1, 'testResult1 !== true'); assert(testResult2, 'testResult2 !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-16.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-16.js index 6d75ccf2e6..ac8deb3c90 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-16.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-16.js @@ -9,22 +9,28 @@ description: > containing a hex number ---*/ - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } +var testResult1 = true; +var testResult2 = false; - if (idx === 1) { - testResult2 = true; - } - return false; - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } - var obj = { 0: 12, 1: 11, 2: 9, length: "0x0002" }; + if (idx === 1) { + testResult2 = true; + } + return false; +} - Array.prototype.reduceRight.call(obj, callbackfn, 1); +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: "0x0002" +}; + +Array.prototype.reduceRight.call(obj, callbackfn, 1); assert(testResult1, 'testResult1 !== true'); assert(testResult2, 'testResult2 !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-17.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-17.js index ace3561654..5da8f8d4fa 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-17.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-17.js @@ -9,22 +9,28 @@ description: > containing a number with leading zeros ---*/ - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } +var testResult1 = true; +var testResult2 = false; - if (idx === 1) { - testResult2 = true; - } - return false; - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } - var obj = { 0: 12, 1: 11, 2: 9, length: "0002.00" }; + if (idx === 1) { + testResult2 = true; + } + return false; +} - Array.prototype.reduceRight.call(obj, callbackfn, 1); +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: "0002.00" +}; + +Array.prototype.reduceRight.call(obj, callbackfn, 1); assert(testResult1, 'testResult1 !== true'); assert(testResult2, 'testResult2 !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-18.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-18.js index 1ae0c97f9a..bd2586f989 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-18.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-18.js @@ -9,13 +9,17 @@ description: > can't convert to a number ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; +} - var obj = { 0: 9, 1: 8, length: "two" }; +var obj = { + 0: 9, + 1: 8, + length: "two" +}; assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 11), 11, 'Array.prototype.reduceRight.call(obj, callbackfn, 11)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-19.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-19.js index 4f314ad517..1e2f2e395b 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-19.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-19.js @@ -9,39 +9,40 @@ description: > has an own toString method ---*/ - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } +var testResult1 = true; +var testResult2 = false; - if (idx === 1) { - testResult2 = true; - } - return false; - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } - var toStringAccessed = false; - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: { - toString: function () { - toStringAccessed = true; - return '2'; - } - } - }; + if (idx === 1) { + testResult2 = true; + } + return false; +} - // objects inherit the default valueOf() method from Object - // that simply returns itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. +var toStringAccessed = false; +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: { + toString: function() { + toStringAccessed = true; + return '2'; + } + } +}; - Array.prototype.reduceRight.call(obj, callbackfn, 1); +// objects inherit the default valueOf() method from Object +// that simply returns itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. + +Array.prototype.reduceRight.call(obj, callbackfn, 1); assert(testResult1, 'testResult1 !== true'); assert(testResult2, 'testResult2 !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-2.js index 80ddaeaa9c..77c0abd1b4 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-2.js @@ -9,13 +9,16 @@ description: > 'length' is 0 (length overridden to false(type conversion)) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(preVal, curVal, idx, obj) { - accessed = true; - } +function callbackfn(preVal, curVal, idx, obj) { + accessed = true; +} - var obj = { 0: 9, length: false }; +var obj = { + 0: 9, + length: false +}; assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 1), 1, 'Array.prototype.reduceRight.call(obj, callbackfn, 1)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-20.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-20.js index f277c7fa84..5b8cf1cbd6 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-20.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-20.js @@ -9,34 +9,35 @@ description: > has an own valueOf method ---*/ - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } +var testResult1 = true; +var testResult2 = false; - if (idx === 1) { - testResult2 = true; - } - return false; - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } - var valueOfAccessed = false; + if (idx === 1) { + testResult2 = true; + } + return false; +} - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - } - }; +var valueOfAccessed = false; - Array.prototype.reduceRight.call(obj, callbackfn, 1); +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: { + valueOf: function() { + valueOfAccessed = true; + return 2; + } + } +}; + +Array.prototype.reduceRight.call(obj, callbackfn, 1); assert(testResult1, 'testResult1 !== true'); assert(testResult2, 'testResult2 !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-21.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-21.js index 1f7f478cd6..31024633a6 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-21.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-21.js @@ -10,39 +10,40 @@ description: > returns a string ---*/ - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } +var testResult1 = true; +var testResult2 = false; - if (idx === 1) { - testResult2 = true; - } - return false; - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } - var toStringAccessed = false; - var valueOfAccessed = false; + if (idx === 1) { + testResult2 = true; + } + return false; +} - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: { - valueOf: function () { - valueOfAccessed = true; - return {}; - }, - toString: function () { - toStringAccessed = true; - return '2'; - } - } - }; +var toStringAccessed = false; +var valueOfAccessed = false; - Array.prototype.reduceRight.call(obj, callbackfn, 1); +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: { + valueOf: function() { + valueOfAccessed = true; + return {}; + }, + toString: function() { + toStringAccessed = true; + return '2'; + } + } +}; + +Array.prototype.reduceRight.call(obj, callbackfn, 1); assert(testResult1, 'testResult1 !== true'); assert(testResult2, 'testResult2 !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-22.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-22.js index 717f2c2db1..488f1808f2 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-22.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-22.js @@ -10,31 +10,31 @@ description: > return primitive values ---*/ - var accessed = false; - var toStringAccessed = false; - var valueOfAccessed = false; +var accessed = false; +var toStringAccessed = false; +var valueOfAccessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; +} - var obj = { - 0: 11, - 1: 12, +var obj = { + 0: 11, + 1: 12, - length: { - valueOf: function () { - valueOfAccessed = true; - return {}; - }, - toString: function () { - toStringAccessed = true; - return {}; - } - } - }; + length: { + valueOf: function() { + valueOfAccessed = true; + return {}; + }, + toString: function() { + toStringAccessed = true; + return {}; + } + } +}; assert.throws(TypeError, function() { - Array.prototype.reduceRight.call(obj, callbackfn, 1); + Array.prototype.reduceRight.call(obj, callbackfn, 1); }); assert(toStringAccessed, 'toStringAccessed !== true'); assert(valueOfAccessed, 'valueOfAccessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-23.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-23.js index 4a3951bcfc..f9f5fa105d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-23.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-23.js @@ -10,45 +10,45 @@ description: > methods ---*/ - var testResult1 = true; - var testResult2 = false; - var valueOfAccessed = false; - var toStringAccessed = false; +var testResult1 = true; +var testResult2 = false; +var valueOfAccessed = false; +var toStringAccessed = false; - var proto = { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - }; - var Con = function () { }; - Con.prototype = proto; - var child = new Con(); +var proto = { + valueOf: function() { + valueOfAccessed = true; + return 2; + } +}; +var Con = function() {}; +Con.prototype = proto; +var child = new Con(); - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } - if (idx === 1) { - testResult2 = true; - } - return false; - } + if (idx === 1) { + testResult2 = true; + } + return false; +} - child.toString = function () { - toStringAccessed = true; - return '1'; - }; +child.toString = function() { + toStringAccessed = true; + return '1'; +}; - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: child - }; +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: child +}; - Array.prototype.reduceRight.call(obj, callbackfn, 1); +Array.prototype.reduceRight.call(obj, callbackfn, 1); assert(testResult1, 'testResult1 !== true'); assert(testResult2, 'testResult2 !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-24.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-24.js index 33ffe0951a..db317c993b 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-24.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-24.js @@ -9,22 +9,28 @@ description: > non-integer, ensure truncation occurs in the proper direction ---*/ - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } +var testResult1 = true; +var testResult2 = false; - if (idx === 1) { - testResult2 = true; - } - return false; - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } - var obj = { 0: 12, 1: 11, 2: 9, length: 2.685 }; + if (idx === 1) { + testResult2 = true; + } + return false; +} - Array.prototype.reduceRight.call(obj, callbackfn, 1); +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: 2.685 +}; + +Array.prototype.reduceRight.call(obj, callbackfn, 1); assert(testResult1, 'testResult1 !== true'); assert(testResult2, 'testResult2 !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-25.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-25.js index 4895baa710..eb311aa6fd 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-25.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-25.js @@ -9,27 +9,28 @@ description: > non-integer ---*/ - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } +var testResult1 = true; +var testResult2 = false; - if (idx === 1) { - testResult2 = true; - } - return false; - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: -4294967294.5 - }; + if (idx === 1) { + testResult2 = true; + } + return false; +} - Array.prototype.reduceRight.call(obj, callbackfn, 1); +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: -4294967294.5 +}; + +Array.prototype.reduceRight.call(obj, callbackfn, 1); assert(testResult1, 'testResult1 !== true'); assert.sameValue(testResult2, false, 'testResult2'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-3.js index 5eb7512218..b651dc45ec 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-3.js @@ -9,13 +9,16 @@ description: > is 0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; +} - var obj = { 0: 9, length: 0 }; +var obj = { + 0: 9, + length: 0 +}; assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 1), 1, 'Array.prototype.reduceRight.call(obj, callbackfn, 1)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-4.js index 8317bd611c..9b7f07bd48 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-4.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-4.js @@ -9,13 +9,16 @@ description: > is +0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; +} - var obj = { 0: 9, length: +0 }; +var obj = { + 0: 9, + length: +0 +}; assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 1), 1, 'Array.prototype.reduceRight.call(obj, callbackfn, 1)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-5.js index d41f2f0db0..9a8919e54f 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-5.js @@ -9,13 +9,16 @@ description: > is -0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(preVal, curVal, idx, obj) { - accessed = true; - } +function callbackfn(preVal, curVal, idx, obj) { + accessed = true; +} - var obj = { 0: 9, length: -0 }; +var obj = { + 0: 9, + length: -0 +}; assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 1), 1, 'Array.prototype.reduceRight.call(obj, callbackfn, 1)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-6.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-6.js index 4caab36e8a..69ed877c29 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-6.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-6.js @@ -9,22 +9,27 @@ description: > is positive) ---*/ - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } +var testResult1 = true; +var testResult2 = false; - if (idx === 1) { - testResult2 = true; - } - return false; - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } - var obj = { 1: 11, 2: 9, length: 2 }; + if (idx === 1) { + testResult2 = true; + } + return false; +} - Array.prototype.reduceRight.call(obj, callbackfn, 1); +var obj = { + 1: 11, + 2: 9, + length: 2 +}; + +Array.prototype.reduceRight.call(obj, callbackfn, 1); assert(testResult1, 'testResult1 !== true'); assert(testResult2, 'testResult2 !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-7.js index 53556d6bdd..a8da6c075f 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-7.js @@ -9,22 +9,27 @@ description: > is negative) ---*/ - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } +var testResult1 = true; +var testResult2 = false; - if (idx === 1) { - testResult2 = true; - } - return false; - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } - var obj = { 1: 11, 2: 9, length: -4294967294 }; + if (idx === 1) { + testResult2 = true; + } + return false; +} - Array.prototype.reduceRight.call(obj, callbackfn, 1); +var obj = { + 1: 11, + 2: 9, + length: -4294967294 +}; + +Array.prototype.reduceRight.call(obj, callbackfn, 1); assert(testResult1, 'testResult1 !== true'); assert.sameValue(testResult2, false, 'testResult2'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-9.js index b9a895999b..7ecc600aab 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-9.js @@ -9,13 +9,16 @@ description: > is -Infinity) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; +} - var obj = { 0: 9, length: -Infinity }; +var obj = { + 0: 9, + length: -Infinity +}; assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 1), 1, 'Array.prototype.reduceRight.call(obj, callbackfn, 1)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-1.js index dc3e165910..04017e990a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-1.js @@ -9,7 +9,7 @@ description: > undefined ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.reduceRight(); + arr.reduceRight(); }); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-10.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-10.js index 78a88e9b86..b6a599910a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-10.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-10.js @@ -9,15 +9,18 @@ description: > exception was thrown by step 2 ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - Object.defineProperty(obj, "length", { - get: function () { - throw new Test262Error(); - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + throw new Test262Error(); + }, + configurable: true +}); assert.throws(Test262Error, function() { - Array.prototype.reduceRight.call(obj, undefined); + Array.prototype.reduceRight.call(obj, undefined); }); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-11.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-11.js index cfb99f9c3b..34885bde34 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-11.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-11.js @@ -9,19 +9,22 @@ description: > exception was thrown by step 3 ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - throw new Test262Error(); - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + toString: function() { + throw new Test262Error(); + } + }; + }, + configurable: true +}); assert.throws(Test262Error, function() { - Array.prototype.reduceRight.call(obj, undefined); + Array.prototype.reduceRight.call(obj, undefined); }); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-12.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-12.js index 8f83394758..f4e76497f7 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-12.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-12.js @@ -7,10 +7,11 @@ es5id: 15.4.4.22-4-12 description: Array.prototype.reduceRight - 'callbackfn' is a function ---*/ - var initialValue = 0; - function callbackfn(accum, val, idx, obj) { - accum += val; - return accum; - } +var initialValue = 0; + +function callbackfn(accum, val, idx, obj) { + accum += val; + return accum; +} assert.sameValue([11, 9].reduceRight(callbackfn, initialValue), 20, '[11, 9].reduceRight(callbackfn, initialValue)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-15.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-15.js index 38d8e3f06e..cdef077c69 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-15.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-15.js @@ -9,26 +9,28 @@ description: > same as passing undefined for callbackfn ---*/ - var obj = { 10: 10 }; - var lengthAccessed = false; - var loopAccessed = false; +var obj = { + 10: 10 +}; +var lengthAccessed = false; +var loopAccessed = false; - Object.defineProperty(obj, "length", { - get: function () { - lengthAccessed = true; - return 20; - }, - configurable: true - }); - Object.defineProperty(obj, "0", { - get: function () { - loopAccessed = true; - return 10; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + lengthAccessed = true; + return 20; + }, + configurable: true +}); +Object.defineProperty(obj, "0", { + get: function() { + loopAccessed = true; + return 10; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.reduceRight.call(obj, undefined); + Array.prototype.reduceRight.call(obj, undefined); }); assert(lengthAccessed, 'lengthAccessed !== true'); assert.sameValue(loopAccessed, false, 'loopAccessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-2.js index 51c148dce6..40ea5d53ca 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-2.js @@ -9,7 +9,7 @@ description: > unreferenced ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(ReferenceError, function() { - arr.reduceRight(foo); + arr.reduceRight(foo); }); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-3.js index 129cfc44ce..76b084c2ba 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-3.js @@ -7,7 +7,7 @@ es5id: 15.4.4.22-4-3 description: Array.prototype.reduceRight throws TypeError if callbackfn is null ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.reduceRight(null); + arr.reduceRight(null); }); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-4.js index d4dc6d1f2d..9f0043f12a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-4.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-4.js @@ -9,7 +9,7 @@ description: > boolean ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.reduceRight(true); + arr.reduceRight(true); }); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-5.js index a20e6ccb38..e22ed21835 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-5.js @@ -9,7 +9,7 @@ description: > number ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.reduceRight(5); + arr.reduceRight(5); }); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-6.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-6.js index f323243994..e6437a1b33 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-6.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-6.js @@ -9,7 +9,7 @@ description: > string ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.reduceRight("abc"); + arr.reduceRight("abc"); }); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-7.js index 86a86b8c97..c6104250da 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-7.js @@ -9,7 +9,7 @@ description: > Object without [[Call]] internal method ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.reduceRight(new Object()); + arr.reduceRight(new Object()); }); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-8.js index 2b7468f541..d76239982f 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-8.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-8.js @@ -9,18 +9,21 @@ description: > visible when an exception occurs ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - var accessed = false; +var accessed = false; - Object.defineProperty(obj, "length", { - get: function () { - accessed = true; - return 2; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + accessed = true; + return 2; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.reduceRight.call(obj, null); + Array.prototype.reduceRight.call(obj, null); }); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-9.js index dac9e41fa3..0da73eb44d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-9.js @@ -9,22 +9,25 @@ description: > visible when an exception occurs ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - var accessed = false; +var accessed = false; - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - accessed = true; - return "2"; - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + toString: function() { + accessed = true; + return "2"; + } + }; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.reduceRight.call(obj, null); + Array.prototype.reduceRight.call(obj, null); }); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-1.js index 7aca869816..562903de42 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-1.js @@ -9,7 +9,7 @@ description: > (empty array), no initVal ---*/ - function cb(){} +function cb() {} assert.throws(TypeError, function() { - [].reduceRight(cb); + [].reduceRight(cb); }); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-10.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-10.js index ede41e29f6..f70a3062d0 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-10.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-10.js @@ -9,18 +9,21 @@ description: > an exception occurs ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - var accessed = false; +var accessed = false; - Object.defineProperty(obj, "length", { - get: function () { - accessed = true; - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + accessed = true; + return 0; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.reduceRight.call(obj, function () { }); + Array.prototype.reduceRight.call(obj, function() {}); }); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-11.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-11.js index 627bebe300..a0d148aacf 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-11.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-11.js @@ -9,22 +9,25 @@ description: > an exception occurs ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - var accessed = false; +var accessed = false; - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - accessed = true; - return "0"; - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + toString: function() { + accessed = true; + return "0"; + } + }; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.reduceRight.call(obj, function () { }); + Array.prototype.reduceRight.call(obj, function() {}); }); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-12.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-12.js index 7115439f27..5a8f490967 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-12.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-12.js @@ -9,15 +9,18 @@ description: > exception was thrown by step 2 ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - Object.defineProperty(obj, "length", { - get: function () { - throw new Test262Error(); - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + throw new Test262Error(); + }, + configurable: true +}); assert.throws(Test262Error, function() { - Array.prototype.reduceRight.call(obj, function () { }); + Array.prototype.reduceRight.call(obj, function() {}); }); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-13.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-13.js index 8ff17da58e..f3a658dbdf 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-13.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-13.js @@ -9,19 +9,22 @@ description: > exception was thrown by step 3 ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - throw new Test262Error(); - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + toString: function() { + throw new Test262Error(); + } + }; + }, + configurable: true +}); assert.throws(Test262Error, function() { - Array.prototype.reduceRight.call(obj, function () { }); + Array.prototype.reduceRight.call(obj, function() {}); }); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-2.js index 4f74f4fb56..e2ea6c0a1d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-2.js @@ -10,12 +10,13 @@ description: > no initVal ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = null; +foo.prototype = new Array(1, 2, 3); - function cb(){} +function foo() {} +var f = new foo(); +f.length = null; + +function cb() {} assert.throws(TypeError, function() { - f.reduceRight(cb); + f.reduceRight(cb); }); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-3.js index a19e73e2b1..1256ed6687 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-3.js @@ -10,12 +10,13 @@ description: > no initVal ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = false; +foo.prototype = new Array(1, 2, 3); - function cb(){} +function foo() {} +var f = new foo(); +f.length = false; + +function cb() {} assert.throws(TypeError, function() { - f.reduceRight(cb); + f.reduceRight(cb); }); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-4.js index 31a202f5ec..ec024658ff 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-4.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-4.js @@ -10,12 +10,13 @@ description: > initVal ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 0; +foo.prototype = new Array(1, 2, 3); - function cb(){} +function foo() {} +var f = new foo(); +f.length = 0; + +function cb() {} assert.throws(TypeError, function() { - f.reduceRight(cb); + f.reduceRight(cb); }); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-5.js index db633c2142..ddf90e92e9 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-5.js @@ -10,12 +10,13 @@ description: > initVal ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = '0'; +foo.prototype = new Array(1, 2, 3); - function cb(){} +function foo() {} +var f = new foo(); +f.length = '0'; + +function cb() {} assert.throws(TypeError, function() { - f.reduceRight(cb); + f.reduceRight(cb); }); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-6.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-6.js index cea6793e0b..76d34aed03 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-6.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-6.js @@ -10,14 +10,19 @@ description: > initVal ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - var o = { valueOf: function () { return 0;}}; - f.length = o; +function foo() {} +var f = new foo(); - function cb(){} +var o = { + valueOf: function() { + return 0; + } +}; +f.length = o; + +function cb() {} assert.throws(TypeError, function() { - f.reduceRight(cb); + f.reduceRight(cb); }); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-7.js index 6fac3bfd8d..bd392b8003 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-7.js @@ -10,20 +10,25 @@ description: > (toString)), no initVal ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - var o = { toString: function () { return '0';}}; - f.length = o; +function foo() {} +var f = new foo(); - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. +var o = { + toString: function() { + return '0'; + } +}; +f.length = o; - function cb(){} +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. + +function cb() {} assert.throws(TypeError, function() { - f.reduceRight(cb); + f.reduceRight(cb); }); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-8.js index 10631cf823..93ce902f0b 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-8.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-8.js @@ -9,27 +9,28 @@ description: > (subclassed Array, length overridden with []), no initVal ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - f.length = []; +function foo() {} +var f = new foo(); - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. +f.length = []; - function cb(){} +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. +// +// The toString( ) method on Array converts the array elements to strings, +// then returns the result of concatenating these strings, with commas in +// between. An array with no elements converts to the empty string, which +// converts to the number 0. If an array has a single element that is a +// number n, the array converts to a string representation of n, which is +// then converted back to n itself. If an array contains more than one element, +// or if its one element is not a number, the array converts to NaN. + +function cb() {} assert.throws(TypeError, function() { - f.reduceRight(cb); + f.reduceRight(cb); }); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-9.js index ce3fe68446..8c9053cdb4 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-9.js @@ -9,6 +9,6 @@ description: > is 0 and 'initialValue' is present ---*/ - var initialValue = 10; +var initialValue = 10; -assert.sameValue([].reduceRight(function () { }, initialValue), initialValue, '[].reduceRight(function () { }, initialValue)'); +assert.sameValue([].reduceRight(function() {}, initialValue), initialValue, '[].reduceRight(function () { }, initialValue)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-1.js index cd191ee0ea..76cec3316e 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-1.js @@ -9,5 +9,5 @@ description: > and initialValue is present (empty array) ---*/ - function cb(){} -assert.sameValue([].reduceRight(cb,1), 1, '[].reduceRight(cb,1)'); +function cb() {} +assert.sameValue([].reduceRight(cb, 1), 1, '[].reduceRight(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-10.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-10.js index ca80beabf5..c50c734da4 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-10.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-10.js @@ -7,6 +7,6 @@ es5id: 15.4.4.22-7-10 description: Array.prototype.reduceRight - 'initialValue' is present ---*/ - var str = "initialValue is present"; +var str = "initialValue is present"; -assert.sameValue([].reduceRight(function () { }, str), str, '[].reduceRight(function () { }, str)'); +assert.sameValue([].reduceRight(function() {}, str), str, '[].reduceRight(function () { }, str)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-11.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-11.js index c7c2a92a6d..466105ad62 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-11.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-11.js @@ -7,6 +7,6 @@ es5id: 15.4.4.22-7-11 description: Array.prototype.reduceRight - 'initialValue' is not present ---*/ - var str = "initialValue is not present"; +var str = "initialValue is not present"; -assert.sameValue([str].reduceRight(function () { }), str, '[str].reduceRight(function () { })'); +assert.sameValue([str].reduceRight(function() {}), str, '[str].reduceRight(function () { })'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-2.js index d6bbe8e4db..226fe2e53b 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-2.js @@ -10,10 +10,11 @@ description: > to null (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = null; +foo.prototype = new Array(1, 2, 3); - function cb(){} -assert.sameValue(f.reduceRight(cb,1), 1, 'f.reduceRight(cb,1)'); +function foo() {} +var f = new foo(); +f.length = null; + +function cb() {} +assert.sameValue(f.reduceRight(cb, 1), 1, 'f.reduceRight(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-3.js index f06d61ae53..07b39a3cce 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-3.js @@ -10,10 +10,11 @@ description: > to false (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = false; +foo.prototype = new Array(1, 2, 3); - function cb(){} -assert.sameValue(f.reduceRight(cb,1), 1, 'f.reduceRight(cb,1)'); +function foo() {} +var f = new foo(); +f.length = false; + +function cb() {} +assert.sameValue(f.reduceRight(cb, 1), 1, 'f.reduceRight(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-4.js index 5cc4058fe4..6006a08c35 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-4.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-4.js @@ -10,10 +10,11 @@ description: > to 0 (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 0; +foo.prototype = new Array(1, 2, 3); - function cb(){} -assert.sameValue(f.reduceRight(cb,1), 1, 'f.reduceRight(cb,1)'); +function foo() {} +var f = new foo(); +f.length = 0; + +function cb() {} +assert.sameValue(f.reduceRight(cb, 1), 1, 'f.reduceRight(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-5.js index 1a7b538fdc..e91ba16276 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-5.js @@ -10,10 +10,11 @@ description: > to '0' (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = '0'; +foo.prototype = new Array(1, 2, 3); - function cb(){} -assert.sameValue(f.reduceRight(cb,1), 1, 'f.reduceRight(cb,1)'); +function foo() {} +var f = new foo(); +f.length = '0'; + +function cb() {} +assert.sameValue(f.reduceRight(cb, 1), 1, 'f.reduceRight(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-6.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-6.js index 7d7f0356d0..5fda998754 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-6.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-6.js @@ -10,12 +10,17 @@ description: > with obj with valueOf) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - var o = { valueOf: function () { return 0;}}; - f.length = o; +function foo() {} +var f = new foo(); - function cb(){} -assert.sameValue(f.reduceRight(cb,1), 1, 'f.reduceRight(cb,1)'); +var o = { + valueOf: function() { + return 0; + } +}; +f.length = o; + +function cb() {} +assert.sameValue(f.reduceRight(cb, 1), 1, 'f.reduceRight(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-7.js index a2fdb76eb0..80819a2b4c 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-7.js @@ -10,18 +10,23 @@ description: > with obj w/o valueOf (toString)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - var o = { toString: function () { return '0';}}; - f.length = o; +function foo() {} +var f = new foo(); - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. +var o = { + toString: function() { + return '0'; + } +}; +f.length = o; - function cb(){} -assert.sameValue(f.reduceRight(cb,1), 1, 'f.reduceRight(cb,1)'); +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. + +function cb() {} +assert.sameValue(f.reduceRight(cb, 1), 1, 'f.reduceRight(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-8.js index 88fd551cf1..d2db08ed90 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-8.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-8.js @@ -10,25 +10,26 @@ description: > with []) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - f.length = []; +function foo() {} +var f = new foo(); - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. +f.length = []; - function cb(){} -assert.sameValue(f.reduceRight(cb,1), 1, 'f.reduceRight(cb,1)'); +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. +// +// The toString( ) method on Array converts the array elements to strings, +// then returns the result of concatenating these strings, with commas in +// between. An array with no elements converts to the empty string, which +// converts to the number 0. If an array has a single element that is a +// number n, the array converts to a string representation of n, which is +// then converted back to n itself. If an array contains more than one element, +// or if its one element is not a number, the array converts to NaN. + +function cb() {} +assert.sameValue(f.reduceRight(cb, 1), 1, 'f.reduceRight(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-9.js index b7d1567e27..9903f299bf 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-9.js @@ -10,25 +10,26 @@ description: > with [0]) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - f.length = [0]; +function foo() {} +var f = new foo(); - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. +f.length = [0]; - function cb(){} -assert.sameValue(f.reduceRight(cb,1), 1, 'f.reduceRight(cb,1)'); +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. +// +// The toString( ) method on Array converts the array elements to strings, +// then returns the result of concatenating these strings, with commas in +// between. An array with no elements converts to the empty string, which +// converts to the number 0. If an array has a single element that is a +// number n, the array converts to a string representation of n, which is +// then converted back to n itself. If an array contains more than one element, +// or if its one element is not a number, the array converts to NaN. + +function cb() {} +assert.sameValue(f.reduceRight(cb, 1), 1, 'f.reduceRight(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-1.js index 2763dde2e5..de85b84e2c 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-1.js @@ -9,20 +9,22 @@ description: > is 0 ---*/ - var accessed = false; +var accessed = false; - var obj = { length: 0 }; +var obj = { + length: 0 +}; - Object.defineProperty(obj, "0", { - get: function () { - accessed = true; - return 10; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + accessed = true; + return 10; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.reduceRight.call(obj, function () { }); + Array.prototype.reduceRight.call(obj, function() {}); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-2.js index c2c0b4e857..96e4d9109a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-2.js @@ -9,22 +9,23 @@ description: > number of iterations in step 9 ---*/ - var called = 0; - function callbackfn(prevVal, curVal, idx, obj) { - called++; - return prevVal + curVal; - } +var called = 0; - var arr = [0, 1, 2, 3]; - Object.defineProperty(arr, "4", { - get: function () { - arr.length = 2; - return 10; - }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + called++; + return prevVal + curVal; +} - var preVal = arr.reduceRight(callbackfn); +var arr = [0, 1, 2, 3]; +Object.defineProperty(arr, "4", { + get: function() { + arr.length = 2; + return 10; + }, + configurable: true +}); + +var preVal = arr.reduceRight(callbackfn); assert.sameValue(preVal, 11, 'preVal'); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-3.js index cfa839663c..0c9292f976 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-3.js @@ -9,37 +9,37 @@ description: > 'kPresent' is true ---*/ - var called = 0; - var testResult = false; - var firstCalled = 0; - var secondCalled = 0; +var called = 0; +var testResult = false; +var firstCalled = 0; +var secondCalled = 0; - function callbackfn(prevVal, val, idx, obj) { - if (called === 0) { - testResult = (idx === 1); - } - called++; - } +function callbackfn(prevVal, val, idx, obj) { + if (called === 0) { + testResult = (idx === 1); + } + called++; +} - var arr = [, , , ]; +var arr = [, , , ]; - Object.defineProperty(arr, "1", { - get: function () { - firstCalled++; - return 9; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + firstCalled++; + return 9; + }, + configurable: true +}); - Object.defineProperty(arr, "2", { - get: function () { - secondCalled++; - return 11; - }, - configurable: true - }); +Object.defineProperty(arr, "2", { + get: function() { + secondCalled++; + return 11; + }, + configurable: true +}); - arr.reduceRight(callbackfn); +arr.reduceRight(callbackfn); assert(testResult, 'testResult !== true'); assert.sameValue(firstCalled, 1, 'firstCalled'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-ii-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-ii-1.js index 41ea823dc7..cbd57020ed 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-ii-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-ii-1.js @@ -9,16 +9,16 @@ description: > visible here ---*/ - var obj = {}; +var obj = {}; - function callbackfn(prevVal, curVal, idx, obj) { } +function callbackfn(prevVal, curVal, idx, obj) {} - Object.defineProperty(obj, "length", { - get: function () { - obj[2] = "accumulator"; - return 3; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + obj[2] = "accumulator"; + return 3; + }, + configurable: true +}); assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn), "accumulator", 'Array.prototype.reduceRight.call(obj, callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-ii-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-ii-2.js index 4afeb3bb75..8da273e0c2 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-ii-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-ii-2.js @@ -9,14 +9,17 @@ description: > visible here ---*/ - var obj = { 2: "accumulator", 3: "another" }; +var obj = { + 2: "accumulator", + 3: "another" +}; - Object.defineProperty(obj, "length", { - get: function () { - delete obj[2]; - return 5; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + delete obj[2]; + return 5; + }, + configurable: true +}); -assert.notSameValue(Array.prototype.reduceRight.call(obj, function () { }), "accumulator", 'Array.prototype.reduceRight.call(obj, function () { })'); +assert.notSameValue(Array.prototype.reduceRight.call(obj, function() {}), "accumulator", 'Array.prototype.reduceRight.call(obj, function () { })'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-1.js index d3421ebb5c..3edc447853 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-1.js @@ -9,15 +9,20 @@ description: > property on an Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 0) { - testResult = (prevVal === 1); - } - } +var testResult = false; - var obj = { 0: 0, 1: 1, length: 2 }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 0) { + testResult = (prevVal === 1); + } +} - Array.prototype.reduceRight.call(obj, callbackfn); +var obj = { + 0: 0, + 1: 1, + length: 2 +}; + +Array.prototype.reduceRight.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-10.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-10.js index 2f82c12890..d76cbfc026 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-10.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-10.js @@ -9,22 +9,23 @@ description: > accessor property on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 2) { - testResult = (curVal === 2); - } - } +var testResult = false; - var arr = [0, 1, , 3]; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 2) { + testResult = (curVal === 2); + } +} - Object.defineProperty(arr, "2", { - get: function () { - return 2; - }, - configurable: true - }); +var arr = [0, 1, , 3]; - arr.reduceRight(callbackfn); +Object.defineProperty(arr, "2", { + get: function() { + return 2; + }, + configurable: true +}); + +arr.reduceRight(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-11.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-11.js index 62c9245a9a..98aea64ef5 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-11.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-11.js @@ -10,28 +10,33 @@ description: > Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "20"); - } - } +var testResult = false; - var proto = { 0: 0, 1: 1, 2: 2 }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "20"); + } +} - var Con = function () { }; - Con.prototype = proto; +var proto = { + 0: 0, + 1: 1, + 2: 2 +}; - var child = new Con(); - child.length = 3; +var Con = function() {}; +Con.prototype = proto; - Object.defineProperty(child, "2", { - get: function () { - return "20"; - }, - configurable: true - }); +var child = new Con(); +child.length = 3; - Array.prototype.reduceRight.call(child, callbackfn); +Object.defineProperty(child, "2", { + get: function() { + return "20"; + }, + configurable: true +}); + +Array.prototype.reduceRight.call(child, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-12.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-12.js index ee042baaec..d322bc64d9 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-12.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-12.js @@ -10,23 +10,24 @@ description: > Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "20"); - } - } +var testResult = false; - Array.prototype[2] = 2; - var arr = [0, 1]; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "20"); + } +} - Object.defineProperty(arr, "2", { - get: function () { - return "20"; - }, - configurable: true - }); +Array.prototype[2] = 2; +var arr = [0, 1]; - arr.reduceRight(callbackfn); +Object.defineProperty(arr, "2", { + get: function() { + return "20"; + }, + configurable: true +}); + +arr.reduceRight(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-13.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-13.js index 0d3c40e0ab..f2e27dc4ed 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-13.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-13.js @@ -10,35 +10,39 @@ description: > an Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "20"); - } - } +var testResult = false; - var proto = { 0: 0, 1: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "20"); + } +} - Object.defineProperty(proto, "2", { - get: function () { - return 2; - }, - configurable: true - }); +var proto = { + 0: 0, + 1: 1 +}; - var Con = function () { }; - Con.prototype = proto; +Object.defineProperty(proto, "2", { + get: function() { + return 2; + }, + configurable: true +}); - var child = new Con(); - child.length = 3; +var Con = function() {}; +Con.prototype = proto; - Object.defineProperty(child, "2", { - get: function () { - return "20"; - }, - configurable: true - }); +var child = new Con(); +child.length = 3; - Array.prototype.reduceRight.call(child, callbackfn); +Object.defineProperty(child, "2", { + get: function() { + return "20"; + }, + configurable: true +}); + +Array.prototype.reduceRight.call(child, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-14.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-14.js index 3973a35930..74613a0782 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-14.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-14.js @@ -10,29 +10,30 @@ description: > an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "20"); - } - } +var testResult = false; - Object.defineProperty(Array.prototype, "2", { - get: function () { - return 2; - }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "20"); + } +} - var arr = [0, 1, , ]; +Object.defineProperty(Array.prototype, "2", { + get: function() { + return 2; + }, + configurable: true +}); - Object.defineProperty(arr, "2", { - get: function () { - return "20"; - }, - configurable: true - }); +var arr = [0, 1, , ]; - arr.reduceRight(callbackfn); +Object.defineProperty(arr, "2", { + get: function() { + return "20"; + }, + configurable: true +}); + +arr.reduceRight(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-15.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-15.js index 5ed456fb15..4a484444e3 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-15.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-15.js @@ -9,28 +9,32 @@ description: > accessor property on an Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 2); - } - } +var testResult = false; - var proto = { 0: 0, 1: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 2); + } +} - Object.defineProperty(proto, "2", { - get: function () { - return 2; - }, - configurable: true - }); +var proto = { + 0: 0, + 1: 1 +}; - var Con = function () { }; - Con.prototype = proto; +Object.defineProperty(proto, "2", { + get: function() { + return 2; + }, + configurable: true +}); - var child = new Con(); - child.length = 3; +var Con = function() {}; +Con.prototype = proto; - Array.prototype.reduceRight.call(child, callbackfn); +var child = new Con(); +child.length = 3; + +Array.prototype.reduceRight.call(child, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-16.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-16.js index b2cc5cbb2f..8d473225be 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-16.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-16.js @@ -9,22 +9,23 @@ description: > accessor property on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 2); - } - } +var testResult = false; - Object.defineProperty(Array.prototype, "2", { - get: function () { - return 2; - }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 2); + } +} - var arr = [0, 1, , ]; +Object.defineProperty(Array.prototype, "2", { + get: function() { + return 2; + }, + configurable: true +}); - arr.reduceRight(callbackfn); +var arr = [0, 1, , ]; + +arr.reduceRight(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-17.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-17.js index 754f25206e..00cb060697 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-17.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-17.js @@ -9,20 +9,25 @@ description: > accessor property without a get function on an Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (typeof prevVal === "undefined"); - } - } +var testResult = false; - var obj = { 0: 0, 1: 1, length: 3 }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (typeof prevVal === "undefined"); + } +} - Object.defineProperty(obj, "2", { - set: function () { }, - configurable: true - }); +var obj = { + 0: 0, + 1: 1, + length: 3 +}; - Array.prototype.reduceRight.call(obj, callbackfn); +Object.defineProperty(obj, "2", { + set: function() {}, + configurable: true +}); + +Array.prototype.reduceRight.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-18.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-18.js index 7413e3140f..4be07578a8 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-18.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-18.js @@ -9,20 +9,21 @@ description: > accessor property without a get function on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (typeof prevVal === "undefined"); - } - } +var testResult = false; - var arr = [0, 1]; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (typeof prevVal === "undefined"); + } +} - Object.defineProperty(arr, "2", { - set: function () { }, - configurable: true - }); +var arr = [0, 1]; - arr.reduceRight(callbackfn); +Object.defineProperty(arr, "2", { + set: function() {}, + configurable: true +}); + +arr.reduceRight(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-19.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-19.js index 55df142cb2..65b0ec395f 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-19.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-19.js @@ -10,21 +10,26 @@ description: > inherited accessor property on an Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (typeof prevVal === "undefined"); - } - } +var testResult = false; - Object.prototype[2] = 2; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (typeof prevVal === "undefined"); + } +} - var obj = { 0: 0, 1: 1, length: 3 }; - Object.defineProperty(obj, "2", { - set: function () { }, - configurable: true - }); +Object.prototype[2] = 2; - Array.prototype.reduceRight.call(obj, callbackfn); +var obj = { + 0: 0, + 1: 1, + length: 3 +}; +Object.defineProperty(obj, "2", { + set: function() {}, + configurable: true +}); + +Array.prototype.reduceRight.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-2.js index e7dfce50ce..6b68c4259f 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-2.js @@ -9,15 +9,16 @@ description: > property on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 2); - } - } +var testResult = false; - var arr = [0, 1, 2]; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 2); + } +} - arr.reduceRight(callbackfn); +var arr = [0, 1, 2]; + +arr.reduceRight(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-20.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-20.js index 7c0d2b3d55..f42f77de41 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-20.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-20.js @@ -10,20 +10,21 @@ description: > inherited accessor property on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (typeof prevVal === "undefined"); - } - } +var testResult = false; - Array.prototype[2] = 2; - var arr = [0, 1]; - Object.defineProperty(arr, "2", { - set: function () { }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (typeof prevVal === "undefined"); + } +} - arr.reduceRight(callbackfn); +Array.prototype[2] = 2; +var arr = [0, 1]; +Object.defineProperty(arr, "2", { + set: function() {}, + configurable: true +}); + +arr.reduceRight(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-21.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-21.js index c2586e35a0..234438eb9e 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-21.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-21.js @@ -9,26 +9,30 @@ description: > accessor property without a get function on an Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (typeof prevVal === "undefined"); - } - } +var testResult = false; - var proto = { 0: 0, 1: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (typeof prevVal === "undefined"); + } +} - Object.defineProperty(proto, "2", { - set: function () { }, - configurable: true - }); +var proto = { + 0: 0, + 1: 1 +}; - var Con = function () { }; - Con.prototype = proto; +Object.defineProperty(proto, "2", { + set: function() {}, + configurable: true +}); - var child = new Con(); - child.length = 3; +var Con = function() {}; +Con.prototype = proto; - Array.prototype.reduceRight.call(child, callbackfn); +var child = new Con(); +child.length = 3; + +Array.prototype.reduceRight.call(child, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-22.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-22.js index 0c3321dcec..8014170040 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-22.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-22.js @@ -9,20 +9,21 @@ description: > accessor property without a get function on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (typeof prevVal === "undefined"); - } - } +var testResult = false; - Object.defineProperty(Array.prototype, "2", { - set: function () { }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (typeof prevVal === "undefined"); + } +} - var arr = [0, 1, , ]; +Object.defineProperty(Array.prototype, "2", { + set: function() {}, + configurable: true +}); - arr.reduceRight(callbackfn); +var arr = [0, 1, , ]; + +arr.reduceRight(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-25.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-25.js index ed00735cb0..a00761e4bc 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-25.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-25.js @@ -10,17 +10,18 @@ description: > is less than number of parameters) ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 0) { - testResult = (prevVal === 1); - } - } +var testResult = false; - var func = function (a, b, c) { - Array.prototype.reduceRight.call(arguments, callbackfn); - }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 0) { + testResult = (prevVal === 1); + } +} - func(0, 1); +var func = function(a, b, c) { + Array.prototype.reduceRight.call(arguments, callbackfn); +}; + +func(0, 1); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-26.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-26.js index fa3c52c43a..5024b8159f 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-26.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-26.js @@ -10,17 +10,18 @@ description: > equals number of parameters) ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 2); - } - } +var testResult = false; - var func = function (a, b, c) { - Array.prototype.reduceRight.call(arguments, callbackfn); - }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 2); + } +} - func(0, 1, 2); +var func = function(a, b, c) { + Array.prototype.reduceRight.call(arguments, callbackfn); +}; + +func(0, 1, 2); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-27.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-27.js index c6cfe25cde..4b716884f9 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-27.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-27.js @@ -10,17 +10,18 @@ description: > is greater than number of parameters) ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 2) { - testResult = (prevVal === 3); - } - } +var testResult = false; - var func = function (a, b, c) { - Array.prototype.reduceRight.call(arguments, callbackfn); - }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 2) { + testResult = (prevVal === 3); + } +} - func(0, 1, 2, 3); +var func = function(a, b, c) { + Array.prototype.reduceRight.call(arguments, callbackfn); +}; + +func(0, 1, 2, 3); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-28.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-28.js index 892cfdc56c..296ac59cd4 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-28.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-28.js @@ -9,15 +9,16 @@ description: > implements its own property get method ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "2"); - } - } +var testResult = false; - var str = new String("012"); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "2"); + } +} - Array.prototype.reduceRight.call(str, callbackfn); +var str = new String("012"); + +Array.prototype.reduceRight.call(str, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-29.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-29.js index acb274e175..e7c88ee8fc 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-29.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-29.js @@ -9,21 +9,22 @@ description: > implements its own property get method ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 2); - } - } +var testResult = false; - var obj = function (a, b, c) { - return a + b + c; - }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 2); + } +} - obj[0] = 0; - obj[1] = 1; - obj[2] = 2; +var obj = function(a, b, c) { + return a + b + c; +}; - Array.prototype.reduceRight.call(obj, callbackfn); +obj[0] = 0; +obj[1] = 1; +obj[2] = 2; + +Array.prototype.reduceRight.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-3.js index 062f12ba1c..5dae8cadef 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-3.js @@ -10,22 +10,28 @@ description: > Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "20"); - } - } +var testResult = false; - var proto = { 0: 0, 1: 1, 2: 2, length: 2 }; - var Con = function () { }; - Con.prototype = proto; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "20"); + } +} - var child = new Con(); - child[1] = "10"; - child[2] = "20"; - child.length = 3; +var proto = { + 0: 0, + 1: 1, + 2: 2, + length: 2 +}; +var Con = function() {}; +Con.prototype = proto; - Array.prototype.reduceRight.call(child, callbackfn); +var child = new Con(); +child[1] = "10"; +child[2] = "20"; +child.length = 3; + +Array.prototype.reduceRight.call(child, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-30.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-30.js index bfebf8515e..dd07c30e29 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-30.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-30.js @@ -9,35 +9,36 @@ description: > iteration is observed in subsequent iterations on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1 && prevVal === 2); - } - } +var testResult = false; - var arr = [0]; - var preIterVisible = false; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1 && prevVal === 2); + } +} - Object.defineProperty(arr, "1", { - get: function () { - if (preIterVisible) { - return 1; - } else { - return "20"; - } - }, - configurable: true - }); +var arr = [0]; +var preIterVisible = false; - Object.defineProperty(arr, "2", { - get: function () { - preIterVisible = true; - return 2; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + if (preIterVisible) { + return 1; + } else { + return "20"; + } + }, + configurable: true +}); - arr.reduceRight(callbackfn); +Object.defineProperty(arr, "2", { + get: function() { + preIterVisible = true; + return 2; + }, + configurable: true +}); + +arr.reduceRight(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-31.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-31.js index 8d8168a560..adc024dca6 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-31.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-31.js @@ -9,35 +9,39 @@ description: > iteration is observed subsequetly on an Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 2 && curVal === 1); - } - } +var testResult = false; - var obj = { 0: 0, length: 3 }; - var preIterVisible = false; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 2 && curVal === 1); + } +} - Object.defineProperty(obj, "1", { - get: function () { - if (preIterVisible) { - return 1; - } else { - return "20"; - } - }, - configurable: true - }); +var obj = { + 0: 0, + length: 3 +}; +var preIterVisible = false; - Object.defineProperty(obj, "2", { - get: function () { - preIterVisible = true; - return 2; - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + if (preIterVisible) { + return 1; + } else { + return "20"; + } + }, + configurable: true +}); - Array.prototype.reduceRight.call(obj, callbackfn); +Object.defineProperty(obj, "2", { + get: function() { + preIterVisible = true; + return 2; + }, + configurable: true +}); + +Array.prototype.reduceRight.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-32.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-32.js index 49146cd496..e4056e11fc 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-32.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-32.js @@ -9,21 +9,26 @@ description: > iteration on an Array-like object ---*/ - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx <= 1) { - accessed = true; - } - } +var accessed = false; - var obj = { 0: 0, 1: 1, length: 3 }; - Object.defineProperty(obj, "2", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx <= 1) { + accessed = true; + } +} + +var obj = { + 0: 0, + 1: 1, + length: 3 +}; +Object.defineProperty(obj, "2", { + get: function() { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true +}); assert.throws(RangeError, function() { - Array.prototype.reduceRight.call(obj, callbackfn); + Array.prototype.reduceRight.call(obj, callbackfn); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-33.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-33.js index 53f974e22d..b770c5cccd 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-33.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-33.js @@ -9,22 +9,23 @@ description: > iteration on an Array ---*/ - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx <= 1) { - accessed = true; - } - } +var accessed = false; - var arr = [0, 1]; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx <= 1) { + accessed = true; + } +} - Object.defineProperty(arr, "2", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); +var arr = [0, 1]; + +Object.defineProperty(arr, "2", { + get: function() { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true +}); assert.throws(RangeError, function() { - arr.reduceRight(callbackfn); + arr.reduceRight(callbackfn); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-4.js index 2bf4cc00dc..9363a9c3ba 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-4.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-4.js @@ -9,14 +9,15 @@ description: > property that overrides an inherited data property on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 2); - } - } +var testResult = false; - Array.prototype[2] = "11"; - [0, 1, 2].reduceRight(callbackfn); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 2); + } +} + +Array.prototype[2] = "11"; +[0, 1, 2].reduceRight(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-5.js index c08e592485..1eda02b462 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-5.js @@ -10,34 +10,35 @@ description: > Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "20"); - } - } +var testResult = false; - var proto = {}; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "20"); + } +} - Object.defineProperty(proto, "2", { - get: function () { - return 11; - }, - configurable: true - }); +var proto = {}; - var Con = function () { }; - Con.prototype = proto; +Object.defineProperty(proto, "2", { + get: function() { + return 11; + }, + configurable: true +}); - var child = new Con(); - child.length = 3; - child[0] = "0"; - child[1] = "1"; - Object.defineProperty(proto, "2", { - value: "20", - configurable: true - }); +var Con = function() {}; +Con.prototype = proto; - Array.prototype.reduceRight.call(child, callbackfn); +var child = new Con(); +child.length = 3; +child[0] = "0"; +child[1] = "1"; +Object.defineProperty(proto, "2", { + value: "20", + configurable: true +}); + +Array.prototype.reduceRight.call(child, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-6.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-6.js index 6bd5ab5eb9..6f8f1eec3c 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-6.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-6.js @@ -9,19 +9,20 @@ description: > property that overrides an inherited accessor property on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 2); - } - } +var testResult = false; - Object.defineProperty(Array.prototype, "2", { - get: function () { - return "2"; - }, - configurable: true - }); - [0, 1, 2].reduceRight(callbackfn); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 2); + } +} + +Object.defineProperty(Array.prototype, "2", { + get: function() { + return "2"; + }, + configurable: true +}); +[0, 1, 2].reduceRight(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-7.js index a955557ecb..55a3d6dbda 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-7.js @@ -9,19 +9,25 @@ description: > data property on an Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 2); - } - } +var testResult = false; - var proto = { 0: 0, 1: 1, 2: 2, length: 3 }; - var Con = function () { }; - Con.prototype = proto; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 2); + } +} - var child = new Con(); +var proto = { + 0: 0, + 1: 1, + 2: 2, + length: 3 +}; +var Con = function() {}; +Con.prototype = proto; - Array.prototype.reduceRight.call(child, callbackfn); +var child = new Con(); + +Array.prototype.reduceRight.call(child, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-8.js index 983566a9cc..d7174183c7 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-8.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-8.js @@ -9,16 +9,17 @@ description: > data property on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 2); - } - } +var testResult = false; - Array.prototype[0] = 0; - Array.prototype[1] = 1; - Array.prototype[2] = 2; - [, , ,].reduceRight(callbackfn); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 2); + } +} + +Array.prototype[0] = 0; +Array.prototype[1] = 1; +Array.prototype[2] = 2; +[, , , ].reduceRight(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-9.js index e2f7da4b6f..648e9485b5 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-9.js @@ -9,21 +9,26 @@ description: > accessor property on an Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 2); - } - } +var testResult = false; - var obj = { 0: 0, 1: 1, length: 3 }; - Object.defineProperty(obj, "2", { - get: function () { - return 2; - }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 2); + } +} - Array.prototype.reduceRight.call(obj, callbackfn); +var obj = { + 0: 0, + 1: 1, + length: 3 +}; +Object.defineProperty(obj, "2", { + get: function() { + return 2; + }, + configurable: true +}); + +Array.prototype.reduceRight.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-1.js index 9c1d91d3ca..8c59328e35 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-1.js @@ -9,11 +9,10 @@ description: > and initialValue is not present ---*/ - function callbackfn(prevVal, curVal, idx, obj) - { - } +function callbackfn(prevVal, curVal, idx, obj) +{} - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.reduceRight(callbackfn); + arr.reduceRight(callbackfn); }); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-2.js index 05271d6745..3153f84f56 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-2.js @@ -10,13 +10,12 @@ description: > initialValue is not present ---*/ - function callbackfn(prevVal, curVal, idx, obj) - { - } +function callbackfn(prevVal, curVal, idx, obj) +{} - var arr = new Array(10); - arr[9] = 1; - arr.length = 5; +var arr = new Array(10); +arr[9] = 1; +arr.length = 5; assert.throws(TypeError, function() { - arr.reduceRight(callbackfn); + arr.reduceRight(callbackfn); }); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-3.js index e47a755d52..06d5460c7f 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-3.js @@ -9,16 +9,15 @@ description: > assigned values are deleted and initialValue is not present ---*/ - function callbackfn(prevVal, curVal, idx, obj) - { - } +function callbackfn(prevVal, curVal, idx, obj) +{} - var arr = [1,2,3,4,5]; - delete arr[0]; - delete arr[1]; - delete arr[2]; - delete arr[3]; - delete arr[4]; +var arr = [1, 2, 3, 4, 5]; +delete arr[0]; +delete arr[1]; +delete arr[2]; +delete arr[3]; +delete arr[4]; assert.throws(TypeError, function() { - arr.reduceRight(callbackfn); + arr.reduceRight(callbackfn); }); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-4.js index 18296c2bf4..4dc2980963 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-4.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-4.js @@ -9,11 +9,11 @@ description: > own properties but prototype contains a single property ---*/ - var arr = [, , , ]; +var arr = [, , , ]; - try { - Array.prototype[1] = "prototype"; - arr.reduceRight(function () { }); - } finally { - delete Array.prototype[1]; - } +try { + Array.prototype[1] = "prototype"; + arr.reduceRight(function() {}); +} finally { + delete Array.prototype[1]; +} diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-5.js index b5dd24963e..224ff36c30 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-5.js @@ -9,18 +9,18 @@ description: > visible when an exception occurs ---*/ - var obj = { }; +var obj = {}; - var accessed = false; +var accessed = false; - Object.defineProperty(obj, "length", { - get: function () { - accessed = true; - return 2; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + accessed = true; + return 2; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.reduceRight.call(obj, function () { }); + Array.prototype.reduceRight.call(obj, function() {}); }); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-6.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-6.js index 476886a76b..3dab92c10b 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-6.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-6.js @@ -9,22 +9,22 @@ description: > visible when an exception occurs ---*/ - var obj = {}; +var obj = {}; - var accessed = false; +var accessed = false; - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - accessed = true; - return "2"; - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + toString: function() { + accessed = true; + return "2"; + } + }; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.reduceRight.call(obj, function () { }); + Array.prototype.reduceRight.call(obj, function() {}); }); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-7.js index 2fabc8fd6d..fade921f98 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-7.js @@ -9,15 +9,15 @@ description: > exception was thrown by step 2 ---*/ - var obj = {}; +var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - throw new Test262Error(); - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + throw new Test262Error(); + }, + configurable: true +}); assert.throws(Test262Error, function() { - Array.prototype.reduceRight.call(obj, function () { }); + Array.prototype.reduceRight.call(obj, function() {}); }); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-8.js index 52c2ed7a6a..d0e875976a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-8.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-8.js @@ -9,19 +9,19 @@ description: > exception was thrown by step 3 ---*/ - var obj = {}; +var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - throw new Test262Error(); - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + toString: function() { + throw new Test262Error(); + } + }; + }, + configurable: true +}); assert.throws(Test262Error, function() { - Array.prototype.reduceRight.call(obj, function () { }); + Array.prototype.reduceRight.call(obj, function() {}); }); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-1.js index 8132b414c5..ef9f267914 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-1.js @@ -11,12 +11,12 @@ description: > length ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - arr[5] = 6; - arr[2] = 3; - return prevVal + curVal; - } +function callbackfn(prevVal, curVal, idx, obj) { + arr[5] = 6; + arr[2] = 3; + return prevVal + curVal; +} - var arr = ['1', 2, , 4, '5']; +var arr = ['1', 2, , 4, '5']; assert.sameValue(arr.reduceRight(callbackfn), "54321", 'arr.reduceRight(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-2.js index 05fa751f08..4fa783dfe0 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-2.js @@ -9,13 +9,13 @@ description: > array after it is called ---*/ - function callbackfn(prevVal, curVal, idx, obj) - { - arr[3] = -2; - arr[0] = -1; - return prevVal + curVal; - } +function callbackfn(prevVal, curVal, idx, obj) +{ + arr[3] = -2; + arr[0] = -1; + return prevVal + curVal; +} - var arr = [1,2,3,4,5]; +var arr = [1, 2, 3, 4, 5]; assert.sameValue(arr.reduceRight(callbackfn), 13, 'arr.reduceRight(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-3.js index eb48426ea4..0455ef32ac 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-3.js @@ -9,14 +9,14 @@ description: > elements in array after the call ---*/ - function callbackfn(prevVal, curVal, idx, obj) - { - delete arr[1]; - delete arr[4]; - return prevVal + curVal; - } +function callbackfn(prevVal, curVal, idx, obj) +{ + delete arr[1]; + delete arr[4]; + return prevVal + curVal; +} - var arr = ['1',2,3,4,5]; +var arr = ['1', 2, 3, 4, 5]; // two elements deleted assert.sameValue(arr.reduceRight(callbackfn), "121", 'arr.reduceRight(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-4.js index 0c00cf9c9e..d3fa9884c3 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-4.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-4.js @@ -9,12 +9,12 @@ description: > elements when Array.length is decreased ---*/ - function callbackfn(prevVal, curVal, idx, obj) - { - arr.length = 2; - return prevVal + curVal; - } +function callbackfn(prevVal, curVal, idx, obj) +{ + arr.length = 2; + return prevVal + curVal; +} - var arr = [1,2,3,4,5]; +var arr = [1, 2, 3, 4, 5]; assert.sameValue(arr.reduceRight(callbackfn), 12, 'arr.reduceRight(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-5.js index 8cbf9edee9..a11242c5d0 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-5.js @@ -9,14 +9,15 @@ description: > one element ---*/ - var callCnt = 0; - function callbackfn(prevVal, curVal, idx, obj) - { - callCnt++; - return 2; - } +var callCnt = 0; - var arr = [1]; +function callbackfn(prevVal, curVal, idx, obj) +{ + callCnt++; + return 2; +} + +var arr = [1]; assert.sameValue(arr.reduceRight(callbackfn), 1, 'arr.reduceRight(callbackfn)'); assert.sameValue(callCnt, 0, 'callCnt'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-6.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-6.js index ca9493b319..24f6586901 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-6.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-6.js @@ -9,16 +9,16 @@ description: > the call when same index is also present in prototype ---*/ - function callbackfn(prevVal, curVal, idx, obj) - { - delete arr[1]; - delete arr[2]; - return prevVal + curVal; - } - Array.prototype[2] = 6; - var arr = ['1',2,3,4,5]; - var res = arr.reduceRight(callbackfn); - delete Array.prototype[2]; +function callbackfn(prevVal, curVal, idx, obj) +{ + delete arr[1]; + delete arr[2]; + return prevVal + curVal; +} +Array.prototype[2] = 6; +var arr = ['1', 2, 3, 4, 5]; +var res = arr.reduceRight(callbackfn); +delete Array.prototype[2]; //one element deleted assert.sameValue(res, "151", 'res'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-7.js index 6adeffef53..b76b74b651 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-7.js @@ -9,13 +9,13 @@ description: > deleted during the call ---*/ - function callbackfn(prevVal, curVal, idx, obj) { - delete o.arr; - return prevVal + curVal; - } +function callbackfn(prevVal, curVal, idx, obj) { + delete o.arr; + return prevVal + curVal; +} - var o = new Object(); - o.arr = ['1', 2, 3, 4, 5]; +var o = new Object(); +o.arr = ['1', 2, 3, 4, 5]; assert.sameValue(o.arr.reduceRight(callbackfn), "141", 'o.arr.reduceRight(callbackfn)'); assert.sameValue(o.hasOwnProperty("arr"), false, 'o.hasOwnProperty("arr")'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-8.js index 9968f8929f..a2ef4d7fec 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-8.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-8.js @@ -9,21 +9,24 @@ description: > is 0 ---*/ - var accessed = false; - function callbackfn() { - accessed = true; - } +var accessed = false; - var obj = { length: 0 }; +function callbackfn() { + accessed = true; +} - Object.defineProperty(obj, "5", { - get: function () { - accessed = true; - return 10; - }, - configurable: true - }); +var obj = { + length: 0 +}; - Array.prototype.reduceRight.call(obj, function () { }, "initialValue"); +Object.defineProperty(obj, "5", { + get: function() { + accessed = true; + return 10; + }, + configurable: true +}); + +Array.prototype.reduceRight.call(obj, function() {}, "initialValue"); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-9.js index f5fc22ab3b..ac47f378af 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-9.js @@ -9,19 +9,20 @@ description: > number of iterations ---*/ - var called = 0; - function callbackfn(preVal, val, idx, obj) { - called++; - } +var called = 0; - var arr = [0, 1, 2, 3]; - Object.defineProperty(arr, "4", { - get: function () { - arr.length = 2; - }, - configurable: true - }); +function callbackfn(preVal, val, idx, obj) { + called++; +} - arr.reduceRight(callbackfn, "initialValue"); +var arr = [0, 1, 2, 3]; +Object.defineProperty(arr, "4", { + get: function() { + arr.length = 2; + }, + configurable: true +}); + +arr.reduceRight(callbackfn, "initialValue"); assert.sameValue(called, 3, 'called'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-1.js index 9277ef37d0..b7336d05e7 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-1.js @@ -9,11 +9,10 @@ description: > empty and initialValue is not present ---*/ - function callbackfn(prevVal, curVal, idx, obj) - { - } +function callbackfn(prevVal, curVal, idx, obj) +{} - var arr = new Array(10); +var arr = new Array(10); -assert.sameValue(arr.reduceRight(callbackfn,5), 5, 'arr.reduceRight(callbackfn,5)'); +assert.sameValue(arr.reduceRight(callbackfn, 5), 5, 'arr.reduceRight(callbackfn,5)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-10.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-10.js index a92bf8dcc6..1dd6fb9fe7 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-10.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-10.js @@ -10,28 +10,31 @@ description: > Array-like Object ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(preVal, val, idx, obj) { - accessed = true; - if (idx === 3) { - testResult = false; - } - } +function callbackfn(preVal, val, idx, obj) { + accessed = true; + if (idx === 3) { + testResult = false; + } +} - var obj = { 2: 2, length: 20 }; +var obj = { + 2: 2, + length: 20 +}; - Object.defineProperty(obj, "5", { - get: function () { - delete Object.prototype[3]; - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "5", { + get: function() { + delete Object.prototype[3]; + return 0; + }, + configurable: true +}); - Object.prototype[3] = 1; - Array.prototype.reduceRight.call(obj, callbackfn); +Object.prototype[3] = 1; +Array.prototype.reduceRight.call(obj, callbackfn); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-11.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-11.js index bd1bcb4f31..e364fbbb78 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-11.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-11.js @@ -9,27 +9,27 @@ description: > step 8 causes deleted index property not to be visited on an Array ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } +} - var arr = [0, , , ]; - Object.defineProperty(arr, "3", { - get: function () { - delete Array.prototype[1]; - return 0; - }, - configurable: true - }); +var arr = [0, , , ]; +Object.defineProperty(arr, "3", { + get: function() { + delete Array.prototype[1]; + return 0; + }, + configurable: true +}); - Array.prototype[1] = 1; - arr.reduceRight(callbackfn); +Array.prototype[1] = 1; +arr.reduceRight(callbackfn); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-12.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-12.js index 9d1eca6456..a6aed7624d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-12.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-12.js @@ -10,25 +10,29 @@ description: > on an Array-like object ---*/ - var testResult = false; +var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1 && curVal === 1) { - testResult = true; - } - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1 && curVal === 1) { + testResult = true; + } +} - var obj = { 0: 0, 1: 111, length: 10 }; +var obj = { + 0: 0, + 1: 111, + length: 10 +}; - Object.defineProperty(obj, "4", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "4", { + get: function() { + delete obj[1]; + return 0; + }, + configurable: true +}); - Object.prototype[1] = 1; - Array.prototype.reduceRight.call(obj, callbackfn); +Object.prototype[1] = 1; +Array.prototype.reduceRight.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-13.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-13.js index fe522f0715..470c9420ae 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-13.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-13.js @@ -10,24 +10,24 @@ description: > on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1 && curVal === 1) { - testResult = true; - } - } - var arr = [0, 111]; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1 && curVal === 1) { + testResult = true; + } +} +var arr = [0, 111]; - Object.defineProperty(arr, "2", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "2", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); - Array.prototype[1] = 1; - arr.reduceRight(callbackfn); +Array.prototype[1] = 1; +arr.reduceRight(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-14.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-14.js index 16924c99cb..8307a9768d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-14.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-14.js @@ -9,27 +9,27 @@ description: > causes deleted index property not to be visited ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - if (idx === 2) { - testResult = false; - } - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + if (idx === 2) { + testResult = false; + } +} - var arr = [0, 1, 2, 3]; +var arr = [0, 1, 2, 3]; - Object.defineProperty(arr, "3", { - get: function () { - arr.length = 2; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "3", { + get: function() { + arr.length = 2; + return 0; + }, + configurable: true +}); - arr.reduceRight(callbackfn); +arr.reduceRight(callbackfn); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-15.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-15.js index 456fc605b2..97695a950d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-15.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-15.js @@ -10,30 +10,30 @@ description: > visited ---*/ - var testResult = false; +var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 2 && curVal === "prototype") { - testResult = true; - } - } - var arr = [0, 1, 2, 3]; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 2 && curVal === "prototype") { + testResult = true; + } +} +var arr = [0, 1, 2, 3]; - Object.defineProperty(Array.prototype, "2", { - get: function () { - return "prototype"; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "2", { + get: function() { + return "prototype"; + }, + configurable: true +}); - Object.defineProperty(arr, "3", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "3", { + get: function() { + arr.length = 2; + return 1; + }, + configurable: true +}); - arr.reduceRight(callbackfn); +arr.reduceRight(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-16.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-16.js index f23e5ecf04..71def64c72 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-16.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-16.js @@ -10,31 +10,31 @@ description: > flags: [noStrict] ---*/ - var testResult = false; +var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 2 && curVal === "unconfigurable") { - testResult = true; - } - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 2 && curVal === "unconfigurable") { + testResult = true; + } +} - var arr = [0, 1, 2, 3]; +var arr = [0, 1, 2, 3]; - Object.defineProperty(arr, "2", { - get: function () { - return "unconfigurable"; - }, - configurable: false - }); +Object.defineProperty(arr, "2", { + get: function() { + return "unconfigurable"; + }, + configurable: false +}); - Object.defineProperty(arr, "3", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "3", { + get: function() { + arr.length = 2; + return 1; + }, + configurable: true +}); - arr.reduceRight(callbackfn); +arr.reduceRight(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-17.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-17.js index d74fd82f58..d21d758ac4 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-17.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-17.js @@ -9,29 +9,31 @@ description: > visited on an Array-like object ---*/ - var testResult = false; +var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 0 && curVal === 0) { - testResult = true; - } - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 0 && curVal === 0) { + testResult = true; + } +} - var obj = { length: 2 }; +var obj = { + length: 2 +}; - Object.defineProperty(obj, "1", { - get: function () { - Object.defineProperty(obj, "0", { - get: function () { - return 0; - }, - configurable: true - }); - return 1; - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + Object.defineProperty(obj, "0", { + get: function() { + return 0; + }, + configurable: true + }); + return 1; + }, + configurable: true +}); - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); +Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-18.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-18.js index d6ab2aac61..89ed61d4e2 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-18.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-18.js @@ -9,29 +9,29 @@ description: > visited on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1 && curVal === 1) { - testResult = true; - } - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1 && curVal === 1) { + testResult = true; + } +} - var arr = [0, , 2]; +var arr = [0, , 2]; - Object.defineProperty(arr, "2", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "2", { + get: function() { + Object.defineProperty(arr, "1", { + get: function() { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); - arr.reduceRight(callbackfn, "initialValue"); +arr.reduceRight(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-19.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-19.js index 714b8ecd34..e31e3f370b 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-19.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-19.js @@ -9,29 +9,31 @@ description: > visited on an Array-like object ---*/ - var testResult = false; +var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1 && curVal === 6.99) { - testResult = true; - } - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1 && curVal === 6.99) { + testResult = true; + } +} - var obj = { length: 6 }; +var obj = { + length: 6 +}; - Object.defineProperty(obj, "2", { - get: function () { - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "2", { + get: function() { + Object.defineProperty(Object.prototype, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); +Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-2.js index 423ae546ab..11d7140d9c 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-2.js @@ -9,24 +9,24 @@ description: > visible here ---*/ - var testResult = false; +var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 2 && curVal === "2") { - testResult = true; - } - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 2 && curVal === "2") { + testResult = true; + } +} - var obj = {}; +var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - obj[2] = "2"; - return 3; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + obj[2] = "2"; + return 3; + }, + configurable: true +}); - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); +Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-20.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-20.js index b993b17f58..47586d76f1 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-20.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-20.js @@ -9,29 +9,29 @@ description: > visited on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1 && curVal === 6.99) { - testResult = true; - } - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1 && curVal === 6.99) { + testResult = true; + } +} - var arr = [0, , 2]; +var arr = [0, , 2]; - Object.defineProperty(arr, "2", { - get: function () { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "2", { + get: function() { + Object.defineProperty(Array.prototype, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); - arr.reduceRight(callbackfn, "initialValue"); +arr.reduceRight(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-21.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-21.js index 0b5b53ccfb..13f3eeaa68 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-21.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-21.js @@ -9,34 +9,37 @@ description: > index property not to be visited on an Array-like object ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } +} - var obj = { 0: 10, length: 10 }; +var obj = { + 0: 10, + length: 10 +}; - Object.defineProperty(obj, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + return 6.99; + }, + configurable: true +}); - Object.defineProperty(obj, "5", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "5", { + get: function() { + delete obj[1]; + return 0; + }, + configurable: true +}); - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); +Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-22.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-22.js index d0bffcff62..8c57a1bd23 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-22.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-22.js @@ -9,34 +9,34 @@ description: > index property not to be visited on an Array ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } +} - var arr = [1, 2, 4]; +var arr = [1, 2, 4]; - Object.defineProperty(arr, "1", { - get: function () { - return "6.99"; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + return "6.99"; + }, + configurable: true +}); - Object.defineProperty(arr, "2", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "2", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); - arr.reduceRight(callbackfn, "initialValue"); +arr.reduceRight(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-23.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-23.js index 611310635a..52046431c8 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-23.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-23.js @@ -10,28 +10,31 @@ description: > Object ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - if (idx === 3) { - testResult = false; - } - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + if (idx === 3) { + testResult = false; + } +} - var obj = { 2: 2, length: 20 }; +var obj = { + 2: 2, + length: 20 +}; - Object.defineProperty(obj, "5", { - get: function () { - delete Object.prototype[3]; - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "5", { + get: function() { + delete Object.prototype[3]; + return 0; + }, + configurable: true +}); - Object.prototype[3] = 1; - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); +Object.prototype[3] = 1; +Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-24.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-24.js index 8f2c455206..9248519f97 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-24.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-24.js @@ -9,27 +9,27 @@ description: > causes deleted index property not to be visited on an Array ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } +} - var arr = [0, , , ]; - Object.defineProperty(arr, "3", { - get: function () { - delete Array.prototype[1]; - return 0; - }, - configurable: true - }); +var arr = [0, , , ]; +Object.defineProperty(arr, "3", { + get: function() { + delete Array.prototype[1]; + return 0; + }, + configurable: true +}); - Array.prototype[1] = 1; - arr.reduceRight(callbackfn, "initialValue"); +Array.prototype[1] = 1; +arr.reduceRight(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-25.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-25.js index 78d46ed7ba..bbfac73480 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-25.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-25.js @@ -10,25 +10,30 @@ description: > Array-like object ---*/ - var testResult = false; +var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1 && curVal === 1) { - testResult = true; - } - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1 && curVal === 1) { + testResult = true; + } +} - var obj = { 0: 0, 1: 111, 4: 10, length: 10 }; +var obj = { + 0: 0, + 1: 111, + 4: 10, + length: 10 +}; - Object.defineProperty(obj, "4", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "4", { + get: function() { + delete obj[1]; + return 0; + }, + configurable: true +}); - Object.prototype[1] = 1; - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); +Object.prototype[1] = 1; +Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-26.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-26.js index 7b0e441b33..6b7362927e 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-26.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-26.js @@ -9,24 +9,24 @@ description: > property causes prototype index property to be visited on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1 && curVal === 1) { - testResult = true; - } - } - var arr = [0, 111]; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1 && curVal === 1) { + testResult = true; + } +} +var arr = [0, 111]; - Object.defineProperty(arr, "2", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "2", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); - Array.prototype[1] = 1; - arr.reduceRight(callbackfn, "initialValue"); +Array.prototype[1] = 1; +arr.reduceRight(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-27.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-27.js index 45aa57a168..01b7f09b9e 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-27.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-27.js @@ -9,27 +9,27 @@ description: > deleted index property not to be visited ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - if (idx === 2) { - testResult = false; - } - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + if (idx === 2) { + testResult = false; + } +} - var arr = [0, 1, 2, 3]; +var arr = [0, 1, 2, 3]; - Object.defineProperty(arr, "3", { - get: function () { - arr.length = 2; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "3", { + get: function() { + arr.length = 2; + return 0; + }, + configurable: true +}); - arr.reduceRight(callbackfn, "initialValue"); +arr.reduceRight(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-28.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-28.js index 31ab610686..a039a64b7a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-28.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-28.js @@ -9,30 +9,30 @@ description: > prototype property causes prototype index property to be visited ---*/ - var testResult = false; +var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 2 && curVal === "prototype") { - testResult = true; - } - } - var arr = [0, 1, 2, 3]; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 2 && curVal === "prototype") { + testResult = true; + } +} +var arr = [0, 1, 2, 3]; - Object.defineProperty(Array.prototype, "2", { - get: function () { - return "prototype"; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "2", { + get: function() { + return "prototype"; + }, + configurable: true +}); - Object.defineProperty(arr, "3", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "3", { + get: function() { + arr.length = 2; + return 1; + }, + configurable: true +}); - arr.reduceRight(callbackfn, "initialValue"); +arr.reduceRight(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-29.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-29.js index b30c7d0b6d..b5cd3bd281 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-29.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-29.js @@ -10,31 +10,31 @@ description: > flags: [noStrict] ---*/ - var testResult = false; +var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 2 && curVal === "unconfigurable") { - testResult = true; - } - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 2 && curVal === "unconfigurable") { + testResult = true; + } +} - var arr = [0, 1, 2, 3]; +var arr = [0, 1, 2, 3]; - Object.defineProperty(arr, "2", { - get: function () { - return "unconfigurable"; - }, - configurable: false - }); +Object.defineProperty(arr, "2", { + get: function() { + return "unconfigurable"; + }, + configurable: false +}); - Object.defineProperty(arr, "3", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "3", { + get: function() { + arr.length = 2; + return 1; + }, + configurable: true +}); - arr.reduceRight(callbackfn, "initialValue"); +arr.reduceRight(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-3.js index 3e26f8b983..c9bf72fcb5 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-3.js @@ -9,27 +9,30 @@ description: > visible here ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(preVal, curVal, idx, obj) { - accessed = true; - if (idx === 2) { - testResult = false; - } - } +function callbackfn(preVal, curVal, idx, obj) { + accessed = true; + if (idx === 2) { + testResult = false; + } +} - var obj = { 2: "2", 3: 10 }; +var obj = { + 2: "2", + 3: 10 +}; - Object.defineProperty(obj, "length", { - get: function () { - delete obj[2]; - return 5; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + delete obj[2]; + return 5; + }, + configurable: true +}); - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); +Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); assert(accessed, 'accessed !== true'); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-4.js index e8038a7976..de1e7e50eb 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-4.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-4.js @@ -9,29 +9,31 @@ description: > step 8 can be visited on an Array-like object ---*/ - var testResult = false; +var testResult = false; - function callbackfn(preVal, curVal, idx, obj) { - if (idx === 0 && curVal === 0) { - testResult = true; - } - } +function callbackfn(preVal, curVal, idx, obj) { + if (idx === 0 && curVal === 0) { + testResult = true; + } +} - var obj = { length: 2 }; +var obj = { + length: 2 +}; - Object.defineProperty(obj, "1", { - get: function () { - Object.defineProperty(obj, "0", { - get: function () { - return 0; - }, - configurable: true - }); - return 1; - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + Object.defineProperty(obj, "0", { + get: function() { + return 0; + }, + configurable: true + }); + return 1; + }, + configurable: true +}); - Array.prototype.reduceRight.call(obj, callbackfn); +Array.prototype.reduceRight.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-5.js index 4c0df97032..be881241bc 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-5.js @@ -9,29 +9,29 @@ description: > step 8 can be visited on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(preVal, curVal, idx, obj) { - if (idx === 1 && curVal === 1) { - testResult = true; - } - } +function callbackfn(preVal, curVal, idx, obj) { + if (idx === 1 && curVal === 1) { + testResult = true; + } +} - var arr = [0, , 2]; +var arr = [0, , 2]; - Object.defineProperty(arr, "2", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "2", { + get: function() { + Object.defineProperty(arr, "1", { + get: function() { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); - arr.reduceRight(callbackfn); +arr.reduceRight(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-6.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-6.js index 7149dad93c..4c4616663d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-6.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-6.js @@ -9,29 +9,31 @@ description: > step 8 visited on an Array-like object ---*/ - var testResult = false; +var testResult = false; - function callbackfn(preVal, curVal, idx, obj) { - if (idx === 1 && curVal === 6.99) { - testResult = true; - } - } +function callbackfn(preVal, curVal, idx, obj) { + if (idx === 1 && curVal === 6.99) { + testResult = true; + } +} - var obj = { length: 6 }; +var obj = { + length: 6 +}; - Object.defineProperty(obj, "2", { - get: function () { - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "2", { + get: function() { + Object.defineProperty(Object.prototype, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); - Array.prototype.reduceRight.call(obj, callbackfn); +Array.prototype.reduceRight.call(obj, callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-7.js index b38b4cb50a..1eea9497cb 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-7.js @@ -9,29 +9,29 @@ description: > step 8 visited on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(preVal, curVal, idx, obj) { - if (idx === 1 && curVal === 6.99) { - testResult = true; - } - } +function callbackfn(preVal, curVal, idx, obj) { + if (idx === 1 && curVal === 6.99) { + testResult = true; + } +} - var arr = [0, , 2]; +var arr = [0, , 2]; - Object.defineProperty(arr, "2", { - get: function () { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "2", { + get: function() { + Object.defineProperty(Array.prototype, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); - arr.reduceRight(callbackfn); +arr.reduceRight(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-8.js index 6e5c2a5674..f71e3926ee 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-8.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-8.js @@ -10,34 +10,37 @@ description: > object ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(preVal, val, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } +function callbackfn(preVal, val, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } +} - var obj = { 0: 10, length: 10 }; +var obj = { + 0: 10, + length: 10 +}; - Object.defineProperty(obj, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + return 6.99; + }, + configurable: true +}); - Object.defineProperty(obj, "5", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "5", { + get: function() { + delete obj[1]; + return 0; + }, + configurable: true +}); - Array.prototype.reduceRight.call(obj, callbackfn); +Array.prototype.reduceRight.call(obj, callbackfn); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-9.js index 8cc4656065..215cab2ef5 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-9.js @@ -9,34 +9,34 @@ description: > causes deleted index property not to be visited on an Array ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(preVal, curVal, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } +function callbackfn(preVal, curVal, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } +} - var arr = [0]; +var arr = [0]; - Object.defineProperty(arr, "1", { - get: function () { - return "6.99"; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + return "6.99"; + }, + configurable: true +}); - Object.defineProperty(arr, "2", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "2", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); - arr.reduceRight(callbackfn); +arr.reduceRight(callbackfn); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-1.js index fdce8cb0da..825a40814b 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-1.js @@ -9,15 +9,16 @@ description: > never been assigned values ---*/ - var callCnt = 0; - function callbackfn(prevVal, curVal, idx, obj) - { - callCnt++; - return curVal; - } +var callCnt = 0; - var arr = new Array(10); - arr[0] = arr[1] = undefined; //explicitly assigning a value +function callbackfn(prevVal, curVal, idx, obj) +{ + callCnt++; + return curVal; +} + +var arr = new Array(10); +arr[0] = arr[1] = undefined; //explicitly assigning a value assert.sameValue(arr.reduceRight(callbackfn), undefined, 'arr.reduceRight(callbackfn)'); assert.sameValue(callCnt, 1, 'callCnt'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-1.js index da0debdf94..351f363ff0 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-1.js @@ -9,14 +9,20 @@ description: > property on an Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 0) { - testResult = (curVal === 0); - } - } +var testResult = false; - var obj = { 0: 0, 1: 1, 2: 2, length: 2 }; - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 0) { + testResult = (curVal === 0); + } +} + +var obj = { + 0: 0, + 1: 1, + 2: 2, + length: 2 +}; +Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-10.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-10.js index d4cf4da379..2c3a2f1e71 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-10.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-10.js @@ -9,22 +9,23 @@ description: > accessor property on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; - var arr = [0, , 2]; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); +var arr = [0, , 2]; - arr.reduceRight(callbackfn, "initialValue"); +Object.defineProperty(arr, "1", { + get: function() { + return 1; + }, + configurable: true +}); + +arr.reduceRight(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-11.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-11.js index 1cbecd5edd..8d72dd51d5 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-11.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-11.js @@ -10,28 +10,33 @@ description: > Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === "1"); - } - } +var testResult = false; - var proto = { 0: 0, 1: 11, 2: 2 }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === "1"); + } +} - var Con = function () { }; - Con.prototype = proto; +var proto = { + 0: 0, + 1: 11, + 2: 2 +}; - var child = new Con(); - child.length = 3; +var Con = function() {}; +Con.prototype = proto; - Object.defineProperty(child, "1", { - get: function () { - return "1"; - }, - configurable: true - }); +var child = new Con(); +child.length = 3; - Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); +Object.defineProperty(child, "1", { + get: function() { + return "1"; + }, + configurable: true +}); + +Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-12.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-12.js index e7a9e708f5..61fb0309ab 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-12.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-12.js @@ -10,23 +10,24 @@ description: > Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === "1"); - } - } +var testResult = false; - Array.prototype[1] = 11; - var arr = [0, ,2]; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === "1"); + } +} - Object.defineProperty(arr, "1", { - get: function () { - return "1"; - }, - configurable: true - }); +Array.prototype[1] = 11; +var arr = [0, , 2]; - arr.reduceRight(callbackfn, "initialValue"); +Object.defineProperty(arr, "1", { + get: function() { + return "1"; + }, + configurable: true +}); + +arr.reduceRight(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-13.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-13.js index d9cbbc10bd..f66c4bf60c 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-13.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-13.js @@ -10,35 +10,39 @@ description: > an Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === "1"); - } - } +var testResult = false; - var proto = { 0: 0, 2: 2}; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === "1"); + } +} - Object.defineProperty(proto, "1", { - get: function () { - return 11; - }, - configurable: true - }); +var proto = { + 0: 0, + 2: 2 +}; - var Con = function () { }; - Con.prototype = proto; +Object.defineProperty(proto, "1", { + get: function() { + return 11; + }, + configurable: true +}); - var child = new Con(); - child.length = 3; +var Con = function() {}; +Con.prototype = proto; - Object.defineProperty(child, "1", { - get: function () { - return "1"; - }, - configurable: true - }); +var child = new Con(); +child.length = 3; - Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); +Object.defineProperty(child, "1", { + get: function() { + return "1"; + }, + configurable: true +}); + +Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-14.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-14.js index e0df7ceb04..25f63b507d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-14.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-14.js @@ -10,28 +10,29 @@ description: > an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === "1"); - } - } +var testResult = false; - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 11; - }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === "1"); + } +} - var arr = [0, ,2]; +Object.defineProperty(Array.prototype, "1", { + get: function() { + return 11; + }, + configurable: true +}); - Object.defineProperty(arr, "1", { - get: function () { - return "1"; - }, - configurable: true - }); - arr.reduceRight(callbackfn, "initialValue"); +var arr = [0, , 2]; + +Object.defineProperty(arr, "1", { + get: function() { + return "1"; + }, + configurable: true +}); +arr.reduceRight(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-15.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-15.js index f8684e9e87..270f2ed4b8 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-15.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-15.js @@ -9,28 +9,32 @@ description: > accessor property on an Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; - var proto = { 0: 0, 2: 2 }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} - Object.defineProperty(proto, "1", { - get: function () { - return 1; - }, - configurable: true - }); +var proto = { + 0: 0, + 2: 2 +}; - var Con = function () { }; - Con.prototype = proto; +Object.defineProperty(proto, "1", { + get: function() { + return 1; + }, + configurable: true +}); - var child = new Con(); - child.length = 3; +var Con = function() {}; +Con.prototype = proto; - Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); +var child = new Con(); +child.length = 3; + +Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-16.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-16.js index 0f70fe6179..78cdc1a281 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-16.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-16.js @@ -9,22 +9,23 @@ description: > accessor property on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 1; - }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} - var arr = [0, , 2]; +Object.defineProperty(Array.prototype, "1", { + get: function() { + return 1; + }, + configurable: true +}); - arr.reduceRight(callbackfn, "initialValue"); +var arr = [0, , 2]; + +arr.reduceRight(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-17.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-17.js index 04d28b5566..7f9c3c0730 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-17.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-17.js @@ -9,20 +9,25 @@ description: > accessor property without a get function on an Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (typeof curVal === "undefined"); - } - } +var testResult = false; - var obj = { 0: 0, 2: 2, length: 3 }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (typeof curVal === "undefined"); + } +} - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); +var obj = { + 0: 0, + 2: 2, + length: 3 +}; - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); +Object.defineProperty(obj, "1", { + set: function() {}, + configurable: true +}); + +Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-18.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-18.js index ffd33eaac3..21a4bf39dc 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-18.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-18.js @@ -9,20 +9,21 @@ description: > accessor property without a get function on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (typeof curVal === "undefined"); - } - } +var testResult = false; - var arr = [0, , 2]; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (typeof curVal === "undefined"); + } +} - Object.defineProperty(arr, "1", { - set: function () { }, - configurable: true - }); +var arr = [0, , 2]; - arr.reduceRight(callbackfn, "initialValue"); +Object.defineProperty(arr, "1", { + set: function() {}, + configurable: true +}); + +arr.reduceRight(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-19.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-19.js index ca309ae008..82ab638bd0 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-19.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-19.js @@ -10,21 +10,26 @@ description: > inherited accessor property on an Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (typeof curVal === "undefined"); - } - } +var testResult = false; - Object.prototype[1] = 1; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (typeof curVal === "undefined"); + } +} - var obj = { 0: 0, 2: 2, length: 3 }; - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); +Object.prototype[1] = 1; - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); +var obj = { + 0: 0, + 2: 2, + length: 3 +}; +Object.defineProperty(obj, "1", { + set: function() {}, + configurable: true +}); + +Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-2.js index f608df6090..c7168a1949 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-2.js @@ -9,14 +9,15 @@ description: > property on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; - var arr = [0, 1, 2]; - arr.reduceRight(callbackfn, "initialValue"); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} + +var arr = [0, 1, 2]; +arr.reduceRight(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-20.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-20.js index 266cafd1ae..0f39cd442b 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-20.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-20.js @@ -10,20 +10,21 @@ description: > inherited accessor property on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (typeof curVal === "undefined"); - } - } +var testResult = false; - Array.prototype[1] = 1; - var arr = [0, ,2]; - Object.defineProperty(arr, "1", { - set: function () { }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (typeof curVal === "undefined"); + } +} - arr.reduceRight(callbackfn, "initialValue"); +Array.prototype[1] = 1; +var arr = [0, , 2]; +Object.defineProperty(arr, "1", { + set: function() {}, + configurable: true +}); + +arr.reduceRight(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-21.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-21.js index 1e7b5fd1ae..f5dda1c866 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-21.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-21.js @@ -9,26 +9,30 @@ description: > accessor property without a get function on an Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (typeof curVal === "undefined"); - } - } +var testResult = false; - var proto = { 0: 0, 2: 2 }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (typeof curVal === "undefined"); + } +} - Object.defineProperty(proto, "1", { - set: function () { }, - configurable: true - }); +var proto = { + 0: 0, + 2: 2 +}; - var Con = function () { }; - Con.prototype = proto; +Object.defineProperty(proto, "1", { + set: function() {}, + configurable: true +}); - var child = new Con(); - child.length = 3; +var Con = function() {}; +Con.prototype = proto; - Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); +var child = new Con(); +child.length = 3; + +Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-22.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-22.js index dedd4b643b..365b543a52 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-22.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-22.js @@ -9,20 +9,21 @@ description: > accessor property without a get function on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (typeof curVal === "undefined"); - } - } +var testResult = false; - Object.defineProperty(Array.prototype, "1", { - set: function () { }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (typeof curVal === "undefined"); + } +} - var arr = [0, , 2]; +Object.defineProperty(Array.prototype, "1", { + set: function() {}, + configurable: true +}); - arr.reduceRight(callbackfn, "initialValue"); +var arr = [0, , 2]; + +arr.reduceRight(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-25.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-25.js index 81d2d0e046..9c177f936a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-25.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-25.js @@ -10,17 +10,18 @@ description: > is less than number of parameters) ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; - var func = function (a, b, c) { - Array.prototype.reduceRight.call(arguments, callbackfn, "initialValue"); - }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} - func(0, 1); +var func = function(a, b, c) { + Array.prototype.reduceRight.call(arguments, callbackfn, "initialValue"); +}; + +func(0, 1); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-26.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-26.js index e2518afe35..79984ddfe3 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-26.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-26.js @@ -10,17 +10,18 @@ description: > equals number of parameters) ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 2) { - testResult = (curVal === 2); - } - } +var testResult = false; - var func = function (a, b, c) { - Array.prototype.reduceRight.call(arguments, callbackfn, "initialValue"); - }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 2) { + testResult = (curVal === 2); + } +} - func(0, 1, 2); +var func = function(a, b, c) { + Array.prototype.reduceRight.call(arguments, callbackfn, "initialValue"); +}; + +func(0, 1, 2); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-27.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-27.js index 677bcd3da2..080ad10a21 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-27.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-27.js @@ -10,17 +10,18 @@ description: > is greater than number of parameters) ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 3) { - testResult = (curVal === 3); - } - } +var testResult = false; - var func = function (a, b, c) { - Array.prototype.reduceRight.call(arguments, callbackfn, "initialValue"); - }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 3) { + testResult = (curVal === 3); + } +} - func(0, 1, 2, 3); +var func = function(a, b, c) { + Array.prototype.reduceRight.call(arguments, callbackfn, "initialValue"); +}; + +func(0, 1, 2, 3); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-28.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-28.js index 83976643ca..388685e913 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-28.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-28.js @@ -9,14 +9,15 @@ description: > implements its own property get method ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === "1"); - } - } +var testResult = false; - var str = new String("012"); - Array.prototype.reduceRight.call(str, callbackfn, "initialValue"); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === "1"); + } +} + +var str = new String("012"); +Array.prototype.reduceRight.call(str, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-29.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-29.js index b69e0332b2..2cc8148fda 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-29.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-29.js @@ -9,22 +9,23 @@ description: > implements its own property get method ---*/ - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; +var initialValue = 0; - var obj = function (a, b, c) { - return a + b + c; - }; - obj[0] = 0; - obj[1] = 1; - obj[2] = 2; - obj[3] = 3; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} - Array.prototype.reduceRight.call(obj, callbackfn, initialValue); +var obj = function(a, b, c) { + return a + b + c; +}; +obj[0] = 0; +obj[1] = 1; +obj[2] = 2; +obj[3] = 3; + +Array.prototype.reduceRight.call(obj, callbackfn, initialValue); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-3.js index 50fa727045..98c28ad1e0 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-3.js @@ -10,22 +10,28 @@ description: > Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === "1"); - } - } +var testResult = false; - var proto = { 0: 10, 1: 11, 2: 12, length: 2 }; - var Con = function () { }; - Con.prototype = proto; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === "1"); + } +} - var child = new Con(); - child[1] = "1"; - child[2] = "2"; - child.length = 3; +var proto = { + 0: 10, + 1: 11, + 2: 12, + length: 2 +}; +var Con = function() {}; +Con.prototype = proto; - Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); +var child = new Con(); +child[1] = "1"; +child[2] = "2"; +child.length = 3; + +Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-30.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-30.js index c3c66cd5fa..234bf191a1 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-30.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-30.js @@ -9,35 +9,36 @@ description: > previous iterations is observed on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; - var arr = [, ,]; - var preIterVisible = false; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} - Object.defineProperty(arr, "2", { - get: function () { - preIterVisible = true; - return 0; - }, - configurable: true - }); +var arr = [, , ]; +var preIterVisible = false; - Object.defineProperty(arr, "1", { - get: function () { - if (preIterVisible) { - return 1; - } else { - return "11"; - } - }, - configurable: true - }); +Object.defineProperty(arr, "2", { + get: function() { + preIterVisible = true; + return 0; + }, + configurable: true +}); - arr.reduceRight(callbackfn, "initialValue"); +Object.defineProperty(arr, "1", { + get: function() { + if (preIterVisible) { + return 1; + } else { + return "11"; + } + }, + configurable: true +}); + +arr.reduceRight(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-31.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-31.js index a25b153974..c560a641e9 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-31.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-31.js @@ -9,35 +9,38 @@ description: > previous iterations is observed on an Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; - var obj = { length: 3 }; - var preIterVisible = false; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} - Object.defineProperty(obj, "2", { - get: function () { - preIterVisible = true; - return 0; - }, - configurable: true - }); +var obj = { + length: 3 +}; +var preIterVisible = false; - Object.defineProperty(obj, "1", { - get: function () { - if (preIterVisible) { - return 1; - } else { - return "11"; - } - }, - configurable: true - }); +Object.defineProperty(obj, "2", { + get: function() { + preIterVisible = true; + return 0; + }, + configurable: true +}); - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); +Object.defineProperty(obj, "1", { + get: function() { + if (preIterVisible) { + return 1; + } else { + return "11"; + } + }, + configurable: true +}); + +Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-32.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-32.js index a0225a8820..57da7683af 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-32.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-32.js @@ -9,22 +9,27 @@ description: > getter terminate iteration on an Array-like object ---*/ - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx <= 1) { - accessed = true; - } - } +var accessed = false; + +function callbackfn(prevVal, curVal, idx, obj) { + if (idx <= 1) { + accessed = true; + } +} - var obj = { 0: 0, 2: 2, length: 3 }; - Object.defineProperty(obj, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); +var obj = { + 0: 0, + 2: 2, + length: 3 +}; +Object.defineProperty(obj, "1", { + get: function() { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true +}); assert.throws(RangeError, function() { - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); + Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-33.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-33.js index 643f4ee4a2..257325e497 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-33.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-33.js @@ -9,24 +9,25 @@ description: > getter terminate iteration on an Array ---*/ - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx <= 1) { - accessed = true; - } - } +var accessed = false; - var arr = [0, , 2]; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx <= 1) { + accessed = true; + } +} - Object.defineProperty(arr, "1", { - get: function () { - throw new Test262Error("unhandle exception happened in getter"); - }, - configurable: true - }); +var arr = [0, , 2]; + +Object.defineProperty(arr, "1", { + get: function() { + throw new Test262Error("unhandle exception happened in getter"); + }, + configurable: true +}); assert.throws(Test262Error, function() { - arr.reduceRight(callbackfn, "initialValue"); + arr.reduceRight(callbackfn, "initialValue"); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-4.js index a5226d8d80..a5145b80d7 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-4.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-4.js @@ -9,14 +9,15 @@ description: > property that overrides an inherited data property on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; - Array.prototype[1] = "11"; - [0, 1, 2].reduceRight(callbackfn, "initialValue"); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} + +Array.prototype[1] = "11"; +[0, 1, 2].reduceRight(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-5.js index fe417547f8..6feb43a1be 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-5.js @@ -10,33 +10,34 @@ description: > Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 0) { - testResult = (curVal === "0"); - } - } +var testResult = false; - var proto = {}; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 0) { + testResult = (curVal === "0"); + } +} - Object.defineProperty(proto, "0", { - get: function () { - return 10; - }, - configurable: true - }); +var proto = {}; - var Con = function () { }; - Con.prototype = proto; +Object.defineProperty(proto, "0", { + get: function() { + return 10; + }, + configurable: true +}); - var child = new Con(); - child.length = 2; - Object.defineProperty(child, "0", { - value: "0", - configurable: true - }); - child[1] = "1"; +var Con = function() {}; +Con.prototype = proto; - Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); +var child = new Con(); +child.length = 2; +Object.defineProperty(child, "0", { + value: "0", + configurable: true +}); +child[1] = "1"; + +Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-6.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-6.js index d3715f273b..5b47467c31 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-6.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-6.js @@ -9,19 +9,20 @@ description: > property that overrides an inherited accessor property on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; - Object.defineProperty(Array.prototype, "1", { - get: function () { - return "11"; - }, - configurable: true - }); - [0, 1, 2].reduceRight(callbackfn, "initialValue"); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} + +Object.defineProperty(Array.prototype, "1", { + get: function() { + return "11"; + }, + configurable: true +}); +[0, 1, 2].reduceRight(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-7.js index 31f37fcee5..e5a8ebfc36 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-7.js @@ -9,20 +9,25 @@ description: > data property on an Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; - var proto = { 0: 0, 1: 1, 2: 2 }; - var Con = function () { }; - Con.prototype = proto; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} - var child = new Con(); - child.length = 3; +var proto = { + 0: 0, + 1: 1, + 2: 2 +}; +var Con = function() {}; +Con.prototype = proto; - Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); +var child = new Con(); +child.length = 3; + +Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-8.js index 754987649d..ad73acacbe 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-8.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-8.js @@ -9,16 +9,17 @@ description: > data property on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; - Array.prototype[0] = 0; - Array.prototype[1] = 1; - Array.prototype[2] = 2; - [, , , ].reduceRight(callbackfn, "initialValue"); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} + +Array.prototype[0] = 0; +Array.prototype[1] = 1; +Array.prototype[2] = 2; +[, , , ].reduceRight(callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-9.js index e26ebcc168..d512dd5daf 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-9.js @@ -9,21 +9,26 @@ description: > accessor property on an Array-like object ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } +var testResult = false; - var obj = { 0: 0, 2: 2, length: 3 }; - Object.defineProperty(obj, "1", { - get: function () { - return 1; - }, - configurable: true - }); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } +} - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); +var obj = { + 0: 0, + 2: 2, + length: 3 +}; +Object.defineProperty(obj, "1", { + get: function() { + return 1; + }, + configurable: true +}); + +Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-1.js index ef650ba62a..50b5043be2 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-1.js @@ -9,14 +9,14 @@ description: > parameters (initialvalue not passed) ---*/ - function callbackfn(prevVal, curVal, idx, obj) - { - if(idx+1 < obj.length && obj[idx] === curVal && obj[idx+1] === prevVal) - return curVal; - else - return false; - } +function callbackfn(prevVal, curVal, idx, obj) +{ + if (idx + 1 < obj.length && obj[idx] === curVal && obj[idx + 1] === prevVal) + return curVal; + else + return false; +} - var arr = [0,1,true,null,new Object(),"five"]; +var arr = [0, 1, true, null, new Object(), "five"]; assert.sameValue(arr.reduceRight(callbackfn), 0, 'arr.reduceRight(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-10.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-10.js index ef2c334856..1953c9a379 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-10.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-10.js @@ -9,12 +9,12 @@ description: > parameter ---*/ - var called = 0; +var called = 0; - function callbackfn(prevVal) { - called++; - return prevVal; - } +function callbackfn(prevVal) { + called++; + return prevVal; +} assert.sameValue([11, 12].reduceRight(callbackfn, 100), 100, '[11, 12].reduceRight(callbackfn, 100)'); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-11.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-11.js index 50fe7d7aac..d6e3cfd1d7 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-11.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-11.js @@ -9,14 +9,14 @@ description: > parameter ---*/ - var testResult = false; +var testResult = false; - function callbackfn(prevVal, curVal) { - if (prevVal === 100) { - testResult = true; - } - return curVal > 10; - } +function callbackfn(prevVal, curVal) { + if (prevVal === 100) { + testResult = true; + } + return curVal > 10; +} assert.sameValue([11].reduceRight(callbackfn, 100), true, '[11].reduceRight(callbackfn, 100)'); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-12.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-12.js index c29286b57d..5d7a7b572a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-12.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-12.js @@ -9,16 +9,16 @@ description: > parameter ---*/ - var testResult = false; - var arr = [11, 12, 13]; - var initVal = 6.99; +var testResult = false; +var arr = [11, 12, 13]; +var initVal = 6.99; - function callbackfn(prevVal, curVal, idx) { - if (idx === 2) { - testResult = (prevVal === initVal); - } - return curVal > 10 && arguments[3][idx] === curVal; - } +function callbackfn(prevVal, curVal, idx) { + if (idx === 2) { + testResult = (prevVal === initVal); + } + return curVal > 10 && arguments[3][idx] === curVal; +} assert.sameValue(arr.reduceRight(callbackfn, initVal), true, 'arr.reduceRight(callbackfn, initVal)'); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-13.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-13.js index 39325da4ed..6fc2965d5a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-13.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-13.js @@ -9,16 +9,16 @@ description: > parameter ---*/ - var arr = [11, 12, 13]; - var initVal = 6.99; - var testResult = false; +var arr = [11, 12, 13]; +var initVal = 6.99; +var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 2) { - testResult = (prevVal === initVal); - } - return curVal > 10 && obj[idx] === curVal; - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 2) { + testResult = (prevVal === initVal); + } + return curVal > 10 && obj[idx] === curVal; +} assert.sameValue(arr.reduceRight(callbackfn, initVal), true, 'arr.reduceRight(callbackfn, initVal)'); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-14.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-14.js index 200649494e..07437dba51 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-14.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-14.js @@ -7,8 +7,8 @@ es5id: 15.4.4.22-9-c-ii-14 description: Array.prototype.reduceRight - callbackfn uses arguments ---*/ - function callbackfn() { - return arguments[0] === 100 && arguments[3][arguments[2]] === arguments[1]; - } +function callbackfn() { + return arguments[0] === 100 && arguments[3][arguments[2]] === arguments[1]; +} assert.sameValue([11].reduceRight(callbackfn, 100), true, '[11].reduceRight(callbackfn, 100)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-16.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-16.js index 101a63d5f2..401a680ec0 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-16.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-16.js @@ -9,15 +9,20 @@ description: > called on an Array-like object ---*/ - var testResult = false; +var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (prevVal === 8 || curVal === 8) { - testResult = true; - } - } +function callbackfn(prevVal, curVal, idx, obj) { + if (prevVal === 8 || curVal === 8) { + testResult = true; + } +} - var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 }; - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); +var obj = { + 0: 11, + 10: 12, + non_index_property: 8, + length: 20 +}; +Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); assert.sameValue(testResult, false, 'testResult'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-17.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-17.js index 0b8e5be999..b2823532e8 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-17.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-17.js @@ -9,19 +9,19 @@ description: > iteration is the result of previous iteration on an Array ---*/ - var arr = [11, 12, 13]; - var testResult = true; - var initVal = 6.99; - var preResult = initVal; +var arr = [11, 12, 13]; +var testResult = true; +var initVal = 6.99; +var preResult = initVal; - function callbackfn(prevVal, curVal, idx, obj) { - if (prevVal !== preResult) { - testResult = false; - } - preResult = curVal; - return curVal; - } +function callbackfn(prevVal, curVal, idx, obj) { + if (prevVal !== preResult) { + testResult = false; + } + preResult = curVal; + return curVal; +} - arr.reduceRight(callbackfn, initVal); +arr.reduceRight(callbackfn, initVal); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-18.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-18.js index 7e7098d40e..28d86867b7 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-18.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-18.js @@ -10,17 +10,17 @@ description: > Array ---*/ - var arr = [11, 12]; - var testResult = false; - var initVal = 6.99; +var arr = [11, 12]; +var testResult = false; +var initVal = 6.99; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === initVal); - } - return curVal; - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === initVal); + } + return curVal; +} - arr.reduceRight(callbackfn, initVal); +arr.reduceRight(callbackfn, initVal); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-19.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-19.js index 194a329176..991b82cf09 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-19.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-19.js @@ -10,15 +10,15 @@ description: > undefined when 'initialValue' is not present on an Array ---*/ - var arr = [11, 12, 13]; - var testResult = false; +var arr = [11, 12, 13]; +var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 13); - } - return curVal; - } - arr.reduceRight(callbackfn); +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 13); + } + return curVal; +} +arr.reduceRight(callbackfn); assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-2.js index 7324a06a84..238b1e2a3e 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-2.js @@ -9,17 +9,17 @@ description: > parameters (initialvalue passed) ---*/ - var bParCorrect = false; - var arr = [0, 1, true, null, new Object(), "five"]; - var initialValue = 5.5; +var bParCorrect = false; +var arr = [0, 1, true, null, new Object(), "five"]; +var initialValue = 5.5; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === obj.length - 1 && obj[idx] === curVal && prevVal === initialValue) - return curVal; - else if (idx + 1 < obj.length && obj[idx] === curVal && obj[idx + 1] === prevVal) - return curVal; - else - return false; - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === obj.length - 1 && obj[idx] === curVal && prevVal === initialValue) + return curVal; + else if (idx + 1 < obj.length && obj[idx] === curVal && obj[idx + 1] === prevVal) + return curVal; + else + return false; +} assert.sameValue(arr.reduceRight(callbackfn, initialValue), 0, 'arr.reduceRight(callbackfn, initialValue)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-20.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-20.js index f4b5470c69..09cf7e0999 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-20.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-20.js @@ -7,13 +7,17 @@ es5id: 15.4.4.22-9-c-ii-20 description: Array.prototype.reduceRight - undefined can be used as accumulator ---*/ - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return typeof prevVal === "undefined"; - } +var accessed = false; - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return typeof prevVal === "undefined"; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, undefined), true, 'Array.prototype.reduceRight.call(obj, callbackfn, undefined)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-21.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-21.js index 7f10e3b787..83f18c38c5 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-21.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-21.js @@ -7,13 +7,17 @@ es5id: 15.4.4.22-9-c-ii-21 description: Array.prototype.reduceRight - null can be used as accumulator ---*/ - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === null; - } +var accessed = false; - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === null; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, null), true, 'Array.prototype.reduceRight.call(obj, callbackfn, null)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-22.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-22.js index 10b20d9427..e130868f08 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-22.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-22.js @@ -9,13 +9,17 @@ description: > accumulator ---*/ - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === false; - } +var accessed = false; - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === false; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, false), true, 'Array.prototype.reduceRight.call(obj, callbackfn, false)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-23.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-23.js index 57cb524bde..dc7dba028e 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-23.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-23.js @@ -9,13 +9,17 @@ description: > accumulator ---*/ - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === 12; - } +var accessed = false; - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === 12; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 12), true, 'Array.prototype.reduceRight.call(obj, callbackfn, 12)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-24.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-24.js index 2326939fd0..768eb6a3dd 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-24.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-24.js @@ -9,13 +9,17 @@ description: > accumulator ---*/ - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === "hello_"; - } +var accessed = false; - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === "hello_"; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, "hello_"), true, 'Array.prototype.reduceRight.call(obj, callbackfn, "hello_")'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-25.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-25.js index 4de1b221a2..7d37c5f2ac 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-25.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-25.js @@ -9,14 +9,18 @@ description: > accumulator ---*/ - var accessed = false; - var objFunction = function () { }; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objFunction; - } +var accessed = false; +var objFunction = function() {}; - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objFunction; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, objFunction), true, 'Array.prototype.reduceRight.call(obj, callbackfn, objFunction)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-26.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-26.js index 485f17e109..e95896266c 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-26.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-26.js @@ -9,14 +9,18 @@ description: > accumulator ---*/ - var accessed = false; - var objArray = []; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objArray; - } +var accessed = false; +var objArray = []; - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objArray; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, objArray), true, 'Array.prototype.reduceRight.call(obj, callbackfn, objArray)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-27.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-27.js index 3414ccbc93..b5f187df0e 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-27.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-27.js @@ -9,14 +9,18 @@ description: > accumulator ---*/ - var accessed = false; - var objString = new String(); - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objString; - } +var accessed = false; +var objString = new String(); - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objString; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, objString), true, 'Array.prototype.reduceRight.call(obj, callbackfn, objString)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-28.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-28.js index 541ff7834c..e8f4b8bc06 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-28.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-28.js @@ -9,14 +9,18 @@ description: > accumulator ---*/ - var accessed = false; - var objBoolean = new Boolean(); - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objBoolean; - } +var accessed = false; +var objBoolean = new Boolean(); - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objBoolean; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, objBoolean), true, 'Array.prototype.reduceRight.call(obj, callbackfn, objBoolean)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-29.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-29.js index 852073958f..7194c1789b 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-29.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-29.js @@ -9,14 +9,18 @@ description: > accumulator ---*/ - var accessed = false; - var objNumber = new Number(); - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objNumber; - } +var accessed = false; +var objNumber = new Number(); - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objNumber; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, objNumber), true, 'Array.prototype.reduceRight.call(obj, callbackfn, objNumber)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-3.js index 7a53ea5627..86a77aa365 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-3.js @@ -7,16 +7,17 @@ es5id: 15.4.4.22-9-c-ii-3 description: Array.prototype.reduceRight - callbackfn takes 4 arguments ---*/ - var bCalled = false; - function callbackfn(prevVal, curVal, idx, obj) - { - bCalled = true; - if(prevVal === true && arguments.length === 4) - return true; - else - return false; - } - var arr = [0,1,2,3,4,5,6,7,8,9]; +var bCalled = false; -assert.sameValue(arr.reduceRight(callbackfn,true), true, 'arr.reduceRight(callbackfn,true)'); +function callbackfn(prevVal, curVal, idx, obj) +{ + bCalled = true; + if (prevVal === true && arguments.length === 4) + return true; + else + return false; +} +var arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + +assert.sameValue(arr.reduceRight(callbackfn, true), true, 'arr.reduceRight(callbackfn,true)'); assert.sameValue(bCalled, true, 'bCalled'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-30.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-30.js index c151604233..0df7790188 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-30.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-30.js @@ -9,13 +9,17 @@ description: > accumulator ---*/ - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === Math; - } +var accessed = false; - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === Math; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, Math), true, 'Array.prototype.reduceRight.call(obj, callbackfn, Math)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-31.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-31.js index c58777b282..092e60ecf7 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-31.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-31.js @@ -9,14 +9,18 @@ description: > accumulator ---*/ - var accessed = false; - var objDate = new Date(); - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objDate; - } +var accessed = false; +var objDate = new Date(); - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objDate; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, objDate), true, 'Array.prototype.reduceRight.call(obj, callbackfn, objDate)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-32.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-32.js index 08e8e42323..921bc654da 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-32.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-32.js @@ -9,14 +9,18 @@ description: > accumulator ---*/ - var accessed = false; - var objRegExp = new RegExp(); - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objRegExp; - } +var accessed = false; +var objRegExp = new RegExp(); - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objRegExp; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, objRegExp), true, 'Array.prototype.reduceRight.call(obj, callbackfn, objRegExp)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-33.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-33.js index 97419e156b..37a2bd4a68 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-33.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-33.js @@ -7,13 +7,17 @@ es5id: 15.4.4.22-9-c-ii-33 description: Array.prototype.reduceRight - the JSON can be used as accumulator ---*/ - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === JSON; - } +var accessed = false; - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === JSON; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, JSON), true, 'Array.prototype.reduceRight.call(obj, callbackfn, JSON)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-34.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-34.js index f384ce9109..72fcc0cc56 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-34.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-34.js @@ -9,14 +9,18 @@ description: > accumulator ---*/ - var accessed = false; - var objError = new RangeError(); - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objError; - } +var accessed = false; +var objError = new RangeError(); - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objError; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, objError), true, 'Array.prototype.reduceRight.call(obj, callbackfn, objError)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-35.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-35.js index 11d7428b73..db05c37e0d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-35.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-35.js @@ -9,19 +9,22 @@ description: > accumulator ---*/ - var accessed = false; - var arg; +var accessed = false; +var arg; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === arg; - } +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === arg; +} - var obj = { 0: 11, length: 1 }; +var obj = { + 0: 11, + length: 1 +}; - (function fun() { - arg = arguments; - }(10, 11, 12, 13)); +(function fun() { + arg = arguments; +}(10, 11, 12, 13)); assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, arg), true, 'Array.prototype.reduceRight.call(obj, callbackfn, arg)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-37.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-37.js index e8b37ab734..23314a32bd 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-37.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-37.js @@ -10,13 +10,17 @@ description: > ---*/ var global = this; - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === global; - } +var accessed = false; - var obj = { 0: 11, length: 1 }; +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === global; +} + +var obj = { + 0: 11, + length: 1 +}; assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, this), true, 'Array.prototype.reduceRight.call(obj, callbackfn, this)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-4-s.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-4-s.js index 5993872575..35efbafc9e 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-4-s.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-4-s.js @@ -10,13 +10,14 @@ description: > flags: [noStrict] ---*/ - var innerThisCorrect = false; - function callbackfn(prevVal, curVal, idx, obj) - { - "use strict"; - innerThisCorrect = this===undefined; - return true; - } - [0].reduceRight(callbackfn,true); +var innerThisCorrect = false; + +function callbackfn(prevVal, curVal, idx, obj) +{ + "use strict"; + innerThisCorrect = this === undefined; + return true; +} +[0].reduceRight(callbackfn, true); assert(innerThisCorrect, 'innerThisCorrect !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-4.js index 2fc5083b78..7dd1ce5ed0 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-4.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-4.js @@ -9,20 +9,20 @@ description: > numeric order ---*/ - var arr = [0, 1, 2, 3, 4, 5]; - var lastIdx = arr.length - 1; - var accessed = false; - var result = true; +var arr = [0, 1, 2, 3, 4, 5]; +var lastIdx = arr.length - 1; +var accessed = false; +var result = true; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - if (lastIdx !== idx) { - result = false; - } else { - lastIdx--; - } - } - arr.reduceRight(callbackfn, 1); +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + if (lastIdx !== idx) { + result = false; + } else { + lastIdx--; + } +} +arr.reduceRight(callbackfn, 1); assert(result, 'result !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-5.js index 8d3811a03e..ccb63b8118 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-5.js @@ -9,27 +9,27 @@ description: > iteration and not prior to starting the loop on an Array ---*/ - var arr = [11, 12, 13, 14]; - var kIndex = []; - var result = true; - var called = 0; +var arr = [11, 12, 13, 14]; +var kIndex = []; +var result = true; +var called = 0; - //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. - function callbackfn(preVal, curVal, idx, o) { - //Each position should be visited one time, which means k is accessed one time during iterations. - called++; - if (typeof kIndex[idx] === "undefined") { - //when current position is visited, its next index should has been visited. - if (idx !== arr.length - 1 && typeof kIndex[idx + 1] === "undefined") { - result = false; - } - kIndex[idx] = 1; - } else { - result = false; - } - } +//By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. +function callbackfn(preVal, curVal, idx, o) { + //Each position should be visited one time, which means k is accessed one time during iterations. + called++; + if (typeof kIndex[idx] === "undefined") { + //when current position is visited, its next index should has been visited. + if (idx !== arr.length - 1 && typeof kIndex[idx + 1] === "undefined") { + result = false; + } + kIndex[idx] = 1; + } else { + result = false; + } +} - arr.reduceRight(callbackfn, 1); +arr.reduceRight(callbackfn, 1); assert(result, 'result !== true'); assert.sameValue(called, 4, 'called'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-7.js index 2c4f536010..f6f26025d8 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-7.js @@ -9,21 +9,26 @@ description: > callbackfn terminate iteration ---*/ - var accessed = false; +var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx < 10) { - accessed = true; - } - if (idx === 10) { - throw new Test262Error("Exception occurred in callbackfn"); - } - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx < 10) { + accessed = true; + } + if (idx === 10) { + throw new Test262Error("Exception occurred in callbackfn"); + } +} - var obj = { 0: 11, 4: 10, 10: 8, length: 20 }; +var obj = { + 0: 11, + 4: 10, + 10: 8, + length: 20 +}; assert.throws(Test262Error, function() { - Array.prototype.reduceRight.call(obj, callbackfn, 1); + Array.prototype.reduceRight.call(obj, callbackfn, 1); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-8.js index 3625e8a4df..439445c5b6 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-8.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-8.js @@ -9,15 +9,20 @@ description: > previous iterations is observed ---*/ - var accessed = false; - var obj = { 0: 11, 1: 12, length: 2 }; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - if (idx === 1) { - obj[idx - 1] = 8; - } - return curVal > 10; - } +var accessed = false; +var obj = { + 0: 11, + 1: 12, + length: 2 +}; + +function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + if (idx === 1) { + obj[idx - 1] = 8; + } + return curVal > 10; +} assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 1), false, 'Array.prototype.reduceRight.call(obj, callbackfn, 1)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-9.js index 170d9d3284..c1dfba3289 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-9.js @@ -9,12 +9,12 @@ description: > parameter ---*/ - var called = 0; +var called = 0; - function callbackfn() { - called++; - return true; - } +function callbackfn() { + called++; + return true; +} assert.sameValue([11, 12].reduceRight(callbackfn, 11), true, '[11, 12].reduceRight(callbackfn, 11)'); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A1_T1.js b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A1_T1.js index 7ca4f7f6e3..fd092bbb99 100644 --- a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A1_T1.js +++ b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A1_T1.js @@ -26,7 +26,7 @@ if (reverse !== x) { } //CHECK#3 -x = new Array(1,2); +x = new Array(1, 2); var reverse = x.reverse(); if (reverse !== x) { $ERROR('#3: x = new Array(1,2); x.reverse() === x. Actual: ' + (reverse)); diff --git a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A1_T2.js b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A1_T2.js index 62f93f6e53..a488885d41 100644 --- a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A1_T2.js +++ b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A1_T2.js @@ -26,52 +26,52 @@ if (reverse !== x) { //CHECK#2 if (x[0] !== "-1") { - $ERROR('#2: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[0] === "-1". Actual: ' + (x[0])); + $ERROR('#2: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[0] === "-1". Actual: ' + (x[0])); } //CHECK#3 if (x[1] !== "NaN") { - $ERROR('#3: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[1] === "NaN". Actual: ' + (x[1])); + $ERROR('#3: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[1] === "NaN". Actual: ' + (x[1])); } //CHECK#4 if (x[2] !== undefined) { - $ERROR('#4: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[2] === undefined. Actual: ' + (x[2])); + $ERROR('#4: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[2] === undefined. Actual: ' + (x[2])); } //CHECK#5 if (x[3] !== undefined) { - $ERROR('#5: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[3] === undefined. Actual: ' + (x[3])); + $ERROR('#5: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[3] === undefined. Actual: ' + (x[3])); } //CHECK#6 if (x[4] !== undefined) { - $ERROR('#6: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[4] === undefined. Actual: ' + (x[4])); + $ERROR('#6: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[4] === undefined. Actual: ' + (x[4])); } //CHECK#7 if (x[5] !== undefined) { - $ERROR('#7: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[5] === undefined. Actual: ' + (x[5])); + $ERROR('#7: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[5] === undefined. Actual: ' + (x[5])); } //CHECK#8 if (x[6] !== undefined) { - $ERROR('#8: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[6] === undefined. Actual: ' + (x[6])); + $ERROR('#8: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[6] === undefined. Actual: ' + (x[6])); } //CHECK#9 if (x[7] !== Infinity) { - $ERROR('#9: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[7] === Infinity. Actual: ' + (x[7])); + $ERROR('#9: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[7] === Infinity. Actual: ' + (x[7])); } //CHECK#10 if (x[8] !== undefined) { - $ERROR('#10: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[8] === undefined. Actual: ' + (x[8])); + $ERROR('#10: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[8] === undefined. Actual: ' + (x[8])); } //CHECK#11 if (x[9] !== true) { - $ERROR('#11: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[9] === true. Actual: ' + (x[9])); + $ERROR('#11: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[9] === true. Actual: ' + (x[9])); } x.length = 9; @@ -83,45 +83,45 @@ if (reverse !== x) { //CHECK#12 if (x[0] !== undefined) { - $ERROR('#12: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[0] === undefined. Actual: ' + (x[0])); + $ERROR('#12: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[0] === undefined. Actual: ' + (x[0])); } //CHECK#13 if (x[1] !== Infinity) { - $ERROR('#13: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[1] === Infinity. Actual: ' + (x[1])); + $ERROR('#13: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[1] === Infinity. Actual: ' + (x[1])); } //CHECK#14 if (x[2] !== undefined) { - $ERROR('#14: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[2] === undefined. Actual: ' + (x[2])); + $ERROR('#14: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[2] === undefined. Actual: ' + (x[2])); } //CHECK#15 if (x[3] !== undefined) { - $ERROR('#15: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[3] === undefined. Actual: ' + (x[3])); + $ERROR('#15: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[3] === undefined. Actual: ' + (x[3])); } //CHECK#16 if (x[4] !== undefined) { - $ERROR('#16: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[4] === undefined. Actual: ' + (x[4])); + $ERROR('#16: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[4] === undefined. Actual: ' + (x[4])); } //CHECK#17 if (x[5] !== undefined) { - $ERROR('#17: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[5] === undefined. Actual: ' + (x[5])); + $ERROR('#17: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[5] === undefined. Actual: ' + (x[5])); } //CHECK#18 if (x[6] !== undefined) { - $ERROR('#18: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[6] === undefined. Actual: ' + (x[6])); + $ERROR('#18: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[6] === undefined. Actual: ' + (x[6])); } //CHECK#19 if (x[7] !== "NaN") { - $ERROR('#19: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[7] === "NaN". Actual: ' + (x[7])); + $ERROR('#19: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[7] === "NaN". Actual: ' + (x[7])); } //CHECK#20 if (x[8] !== "-1") { - $ERROR('#20: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[8] === "-1". Actual: ' + (x[8])); + $ERROR('#20: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[8] === "-1". Actual: ' + (x[8])); } diff --git a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A2_T1.js b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A2_T1.js index ec750f6264..3840475991 100644 --- a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A2_T1.js +++ b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A2_T1.js @@ -31,52 +31,52 @@ if (reverse !== obj) { //CHECK#2 if (obj[0] !== "-1") { - $ERROR('#2: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[0] === "-1". Actual: ' + (obj[0])); + $ERROR('#2: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[0] === "-1". Actual: ' + (obj[0])); } //CHECK#3 if (obj[1] !== "NaN") { - $ERROR('#3: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[1] === "NaN". Actual: ' + (obj[1])); + $ERROR('#3: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[1] === "NaN". Actual: ' + (obj[1])); } //CHECK#4 if (obj[2] !== undefined) { - $ERROR('#4: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[2] === undefined. Actual: ' + (obj[2])); + $ERROR('#4: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[2] === undefined. Actual: ' + (obj[2])); } //CHECK#5 if (obj[3] !== undefined) { - $ERROR('#5: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[3] === undefined. Actual: ' + (obj[3])); + $ERROR('#5: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[3] === undefined. Actual: ' + (obj[3])); } //CHECK#6 if (obj[4] !== undefined) { - $ERROR('#6: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[4] === undefined. Actual: ' + (obj[4])); + $ERROR('#6: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[4] === undefined. Actual: ' + (obj[4])); } //CHECK#7 if (obj[5] !== undefined) { - $ERROR('#7: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[5] === undefined. Actual: ' + (obj[5])); + $ERROR('#7: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[5] === undefined. Actual: ' + (obj[5])); } //CHECK#8 if (obj[6] !== undefined) { - $ERROR('#8: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[6] === undefined. Actual: ' + (obj[6])); + $ERROR('#8: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[6] === undefined. Actual: ' + (obj[6])); } //CHECK#9 if (obj[7] !== Infinity) { - $ERROR('#9: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[7] === Infinity. Actual: ' + (obj[7])); + $ERROR('#9: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[7] === Infinity. Actual: ' + (obj[7])); } //CHECK#10 if (obj[8] !== undefined) { - $ERROR('#10: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[8] === undefined. Actual: ' + (obj[8])); + $ERROR('#10: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[8] === undefined. Actual: ' + (obj[8])); } //CHECK#11 if (obj[9] !== true) { - $ERROR('#11: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[9] === true. Actual: ' + (obj[9])); + $ERROR('#11: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[9] === true. Actual: ' + (obj[9])); } obj.length = 9; @@ -88,45 +88,45 @@ if (reverse !== obj) { //CHECK#12 if (obj[0] !== undefined) { - $ERROR('#12: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[0] === undefined. Actual: ' + (obj[0])); + $ERROR('#12: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[0] === undefined. Actual: ' + (obj[0])); } //CHECK#13 if (obj[1] !== Infinity) { - $ERROR('#13: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[1] === Infinity. Actual: ' + (obj[1])); + $ERROR('#13: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[1] === Infinity. Actual: ' + (obj[1])); } //CHECK#14 if (obj[2] !== undefined) { - $ERROR('#14: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[2] === undefined. Actual: ' + (obj[2])); + $ERROR('#14: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[2] === undefined. Actual: ' + (obj[2])); } //CHECK#15 if (obj[3] !== undefined) { - $ERROR('#15: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[3] === undefined. Actual: ' + (obj[3])); + $ERROR('#15: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[3] === undefined. Actual: ' + (obj[3])); } //CHECK#16 if (obj[4] !== undefined) { - $ERROR('#16: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[4] === undefined. Actual: ' + (obj[4])); + $ERROR('#16: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[4] === undefined. Actual: ' + (obj[4])); } //CHECK#17 if (obj[5] !== undefined) { - $ERROR('#17: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[5] === undefined. Actual: ' + (obj[5])); + $ERROR('#17: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[5] === undefined. Actual: ' + (obj[5])); } //CHECK#18 if (obj[6] !== undefined) { - $ERROR('#18: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[6] === undefined. Actual: ' + (obj[6])); + $ERROR('#18: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[6] === undefined. Actual: ' + (obj[6])); } //CHECK#19 if (obj[7] !== "NaN") { - $ERROR('#19: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[7] === "NaN". Actual: ' + (obj[7])); + $ERROR('#19: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[7] === "NaN". Actual: ' + (obj[7])); } //CHECK#20 if (obj[8] !== "-1") { - $ERROR('#20: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[8] === "-1". Actual: ' + (obj[8])); + $ERROR('#20: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[8] === "-1". Actual: ' + (obj[8])); } diff --git a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A2_T2.js b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A2_T2.js index 2d521f1129..77693f71ce 100644 --- a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A2_T2.js +++ b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A2_T2.js @@ -31,52 +31,52 @@ if (reverse !== obj) { //CHECK#2 if (obj[0] !== "-1") { - $ERROR('#2: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[0] === "-1". Actual: ' + (obj[0])); + $ERROR('#2: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[0] === "-1". Actual: ' + (obj[0])); } //CHECK#3 if (obj[1] !== "NaN") { - $ERROR('#3: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[1] === "NaN". Actual: ' + (obj[1])); + $ERROR('#3: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[1] === "NaN". Actual: ' + (obj[1])); } //CHECK#4 if (obj[2] !== undefined) { - $ERROR('#4: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[2] === undefined. Actual: ' + (obj[2])); + $ERROR('#4: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[2] === undefined. Actual: ' + (obj[2])); } //CHECK#5 if (obj[3] !== undefined) { - $ERROR('#5: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[3] === undefined. Actual: ' + (obj[3])); + $ERROR('#5: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[3] === undefined. Actual: ' + (obj[3])); } //CHECK#6 if (obj[4] !== undefined) { - $ERROR('#6: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[4] === undefined. Actual: ' + (obj[4])); + $ERROR('#6: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[4] === undefined. Actual: ' + (obj[4])); } //CHECK#7 if (obj[5] !== undefined) { - $ERROR('#7: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[5] === undefined. Actual: ' + (obj[5])); + $ERROR('#7: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[5] === undefined. Actual: ' + (obj[5])); } //CHECK#8 if (obj[6] !== undefined) { - $ERROR('#8: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[6] === undefined. Actual: ' + (obj[6])); + $ERROR('#8: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[6] === undefined. Actual: ' + (obj[6])); } //CHECK#9 if (obj[7] !== Infinity) { - $ERROR('#9: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[7] === Infinity. Actual: ' + (obj[7])); + $ERROR('#9: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[7] === Infinity. Actual: ' + (obj[7])); } //CHECK#10 if (obj[8] !== undefined) { - $ERROR('#10: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[8] === undefined. Actual: ' + (obj[8])); + $ERROR('#10: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[8] === undefined. Actual: ' + (obj[8])); } //CHECK#11 if (obj[9] !== true) { - $ERROR('#11: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[9] === true. Actual: ' + (obj[9])); + $ERROR('#11: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[9] === true. Actual: ' + (obj[9])); } obj.length = new Number(9.5); @@ -88,45 +88,45 @@ if (reverse !== obj) { //CHECK#12 if (obj[0] !== undefined) { - $ERROR('#12: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[0] === undefined. Actual: ' + (obj[0])); + $ERROR('#12: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[0] === undefined. Actual: ' + (obj[0])); } //CHECK#13 if (obj[1] !== Infinity) { - $ERROR('#13: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[1] === Infinity. Actual: ' + (obj[1])); + $ERROR('#13: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[1] === Infinity. Actual: ' + (obj[1])); } //CHECK#14 if (obj[2] !== undefined) { - $ERROR('#14: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[2] === undefined. Actual: ' + (obj[2])); + $ERROR('#14: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[2] === undefined. Actual: ' + (obj[2])); } //CHECK#15 if (obj[3] !== undefined) { - $ERROR('#15: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[3] === undefined. Actual: ' + (obj[3])); + $ERROR('#15: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[3] === undefined. Actual: ' + (obj[3])); } //CHECK#16 if (obj[4] !== undefined) { - $ERROR('#16: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[4] === undefined. Actual: ' + (obj[4])); + $ERROR('#16: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[4] === undefined. Actual: ' + (obj[4])); } //CHECK#17 if (obj[5] !== undefined) { - $ERROR('#17: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[5] === undefined. Actual: ' + (obj[5])); + $ERROR('#17: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[5] === undefined. Actual: ' + (obj[5])); } //CHECK#18 if (obj[6] !== undefined) { - $ERROR('#18: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[6] === undefined. Actual: ' + (obj[6])); + $ERROR('#18: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[6] === undefined. Actual: ' + (obj[6])); } //CHECK#19 if (obj[7] !== "NaN") { - $ERROR('#19: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[7] === "NaN". Actual: ' + (obj[7])); + $ERROR('#19: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[7] === "NaN". Actual: ' + (obj[7])); } //CHECK#20 if (obj[8] !== "-1") { - $ERROR('#20: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[8] === "-1". Actual: ' + (obj[8])); + $ERROR('#20: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[8] === "-1". Actual: ' + (obj[8])); } diff --git a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A2_T3.js b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A2_T3.js index 1c41625f82..2fd9a2d2a8 100644 --- a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A2_T3.js +++ b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A2_T3.js @@ -31,52 +31,52 @@ if (reverse !== obj) { //CHECK#2 if (obj[0] !== "-1") { - $ERROR('#2: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[0] === "-1". Actual: ' + (obj[0])); + $ERROR('#2: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[0] === "-1". Actual: ' + (obj[0])); } //CHECK#3 if (obj[1] !== "NaN") { - $ERROR('#3: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[1] === "NaN". Actual: ' + (obj[1])); + $ERROR('#3: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[1] === "NaN". Actual: ' + (obj[1])); } //CHECK#4 if (obj[2] !== undefined) { - $ERROR('#4: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[2] === undefined. Actual: ' + (obj[2])); + $ERROR('#4: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[2] === undefined. Actual: ' + (obj[2])); } //CHECK#5 if (obj[3] !== undefined) { - $ERROR('#5: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[3] === undefined. Actual: ' + (obj[3])); + $ERROR('#5: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[3] === undefined. Actual: ' + (obj[3])); } //CHECK#6 if (obj[4] !== undefined) { - $ERROR('#6: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[4] === undefined. Actual: ' + (obj[4])); + $ERROR('#6: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[4] === undefined. Actual: ' + (obj[4])); } //CHECK#7 if (obj[5] !== undefined) { - $ERROR('#7: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[5] === undefined. Actual: ' + (obj[5])); + $ERROR('#7: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[5] === undefined. Actual: ' + (obj[5])); } //CHECK#8 if (obj[6] !== undefined) { - $ERROR('#8: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[6] === undefined. Actual: ' + (obj[6])); + $ERROR('#8: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[6] === undefined. Actual: ' + (obj[6])); } //CHECK#9 if (obj[7] !== Infinity) { - $ERROR('#9: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[7] === Infinity. Actual: ' + (obj[7])); + $ERROR('#9: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[7] === Infinity. Actual: ' + (obj[7])); } //CHECK#10 if (obj[8] !== undefined) { - $ERROR('#10: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[8] === undefined. Actual: ' + (obj[8])); + $ERROR('#10: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[8] === undefined. Actual: ' + (obj[8])); } //CHECK#11 if (obj[9] !== true) { - $ERROR('#11: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[9] === true. Actual: ' + (obj[9])); + $ERROR('#11: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[9] === true. Actual: ' + (obj[9])); } obj.length = new String("9"); @@ -88,45 +88,45 @@ if (reverse !== obj) { //CHECK#12 if (obj[0] !== undefined) { - $ERROR('#12: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[0] === undefined. Actual: ' + (obj[0])); + $ERROR('#12: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[0] === undefined. Actual: ' + (obj[0])); } //CHECK#13 if (obj[1] !== Infinity) { - $ERROR('#13: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[1] === Infinity. Actual: ' + (obj[1])); + $ERROR('#13: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[1] === Infinity. Actual: ' + (obj[1])); } //CHECK#14 if (obj[2] !== undefined) { - $ERROR('#14: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[2] === undefined. Actual: ' + (obj[2])); + $ERROR('#14: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[2] === undefined. Actual: ' + (obj[2])); } //CHECK#15 if (obj[3] !== undefined) { - $ERROR('#15: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[3] === undefined. Actual: ' + (obj[3])); + $ERROR('#15: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[3] === undefined. Actual: ' + (obj[3])); } //CHECK#16 if (obj[4] !== undefined) { - $ERROR('#16: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[4] === undefined. Actual: ' + (obj[4])); + $ERROR('#16: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[4] === undefined. Actual: ' + (obj[4])); } //CHECK#17 if (obj[5] !== undefined) { - $ERROR('#17: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[5] === undefined. Actual: ' + (obj[5])); + $ERROR('#17: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[5] === undefined. Actual: ' + (obj[5])); } //CHECK#18 if (obj[6] !== undefined) { - $ERROR('#18: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[6] === undefined. Actual: ' + (obj[6])); + $ERROR('#18: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[6] === undefined. Actual: ' + (obj[6])); } //CHECK#19 if (obj[7] !== "NaN") { - $ERROR('#19: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[7] === "NaN". Actual: ' + (obj[7])); + $ERROR('#19: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[7] === "NaN". Actual: ' + (obj[7])); } //CHECK#20 if (obj[8] !== "-1") { - $ERROR('#20: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[8] === "-1". Actual: ' + (obj[8])); + $ERROR('#20: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[8] === "-1". Actual: ' + (obj[8])); } diff --git a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A4_T1.js b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A4_T1.js index 82fa71a07d..44fefbf426 100644 --- a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A4_T1.js +++ b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A4_T1.js @@ -40,7 +40,9 @@ if (x[1] !== 1) { Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.reverse = Array.prototype.reverse; -x = {0:0}; +x = { + 0: 0 +}; x.reverse(); //CHECK#5 diff --git a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A4_T2.js b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A4_T2.js index f658651f46..942d287ad7 100644 --- a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A4_T2.js +++ b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A4_T2.js @@ -11,7 +11,7 @@ description: > ---*/ Array.prototype[1] = -1; -var x = [0,1]; +var x = [0, 1]; x.length = 2; x.reverse(); @@ -40,7 +40,10 @@ if (x[1] !== -1) { Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.reverse = Array.prototype.reverse; -x = {0:0,1:1}; +x = { + 0: 0, + 1: 1 +}; x.reverse(); //CHECK#5 diff --git a/test/built-ins/Array/prototype/reverse/length-exceeding-integer-limit-with-object.js b/test/built-ins/Array/prototype/reverse/length-exceeding-integer-limit-with-object.js index 2296861a50..94e53bb20b 100644 --- a/test/built-ins/Array/prototype/reverse/length-exceeding-integer-limit-with-object.js +++ b/test/built-ins/Array/prototype/reverse/length-exceeding-integer-limit-with-object.js @@ -11,20 +11,20 @@ info: | ... ---*/ -function StopReverse() { } +function StopReverse() {} // Object with large "length" property and no indexed properties in the uint32 range. var arrayLike = { - get "9007199254740990"() { + get "9007199254740990" () { throw new StopReverse(); }, - get "9007199254740991"() { + get "9007199254740991" () { $ERROR("Get 9007199254740991"); }, - get "9007199254740992"() { + get "9007199254740992" () { $ERROR("Get 9007199254740992"); }, - length: 2**53 + 2, + length: 2 ** 53 + 2, }; assert.throws(StopReverse, function() { diff --git a/test/built-ins/Array/prototype/reverse/length-exceeding-integer-limit-with-proxy.js b/test/built-ins/Array/prototype/reverse/length-exceeding-integer-limit-with-proxy.js index e4b45f4595..308eb5e192 100644 --- a/test/built-ins/Array/prototype/reverse/length-exceeding-integer-limit-with-proxy.js +++ b/test/built-ins/Array/prototype/reverse/length-exceeding-integer-limit-with-proxy.js @@ -8,7 +8,7 @@ description: > includes: [compareArray.js, proxyTrapsHelper.js] ---*/ -function StopReverse() { } +function StopReverse() {} var arrayLike = { 0: "zero", @@ -25,7 +25,7 @@ var arrayLike = { /* 9007199254740989: hole, */ 9007199254740990: "2**53-2", - length: 2**53 + 2, + length: 2 ** 53 + 2, }; var traps = []; @@ -106,7 +106,7 @@ assert.compareArray(traps, [ "Get:4", ]); -assert.sameValue(arrayLike.length, 2**53 + 2, "Length property is not modified"); +assert.sameValue(arrayLike.length, 2 ** 53 + 2, "Length property is not modified"); assert.sameValue(arrayLike[0], "2**53-2", "Property at index 0"); assert.sameValue(1 in arrayLike, false, "Property at index 1"); diff --git a/test/built-ins/Array/prototype/shift/S15.4.4.9_A1.1_T1.js b/test/built-ins/Array/prototype/shift/S15.4.4.9_A1.1_T1.js index f84a5392ee..b087c14b74 100644 --- a/test/built-ins/Array/prototype/shift/S15.4.4.9_A1.1_T1.js +++ b/test/built-ins/Array/prototype/shift/S15.4.4.9_A1.1_T1.js @@ -23,7 +23,7 @@ if (x.length !== 0) { } //CHECK#3 -var x = Array(1,2,3); +var x = Array(1, 2, 3); x.length = 0; var shift = x.shift(); if (shift !== undefined) { diff --git a/test/built-ins/Array/prototype/shift/S15.4.4.9_A1.2_T1.js b/test/built-ins/Array/prototype/shift/S15.4.4.9_A1.2_T1.js index 3fac087a29..b736fa0f34 100644 --- a/test/built-ins/Array/prototype/shift/S15.4.4.9_A1.2_T1.js +++ b/test/built-ins/Array/prototype/shift/S15.4.4.9_A1.2_T1.js @@ -11,7 +11,7 @@ description: Checking this use new Array() and [] ---*/ //CHECK#1 -var x = new Array(0,1,2,3); +var x = new Array(0, 1, 2, 3); var shift = x.shift(); if (shift !== 0) { $ERROR('#1: x = new Array(0,1,2,3); x.shift() === 0. Actual: ' + (shift)); diff --git a/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T1.js b/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T1.js index ea342a4697..caf6bcb180 100644 --- a/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T1.js +++ b/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T1.js @@ -18,15 +18,15 @@ obj.shift = Array.prototype.shift; if (obj.length !== undefined) { $ERROR('#0: var obj = {}; obj.length === undefined. Actual: ' + (obj.length)); } else { - //CHECK#1 - var shift = obj.shift(); -if (shift !== undefined) { - $ERROR('#1: var obj = {}; obj.shift = Array.prototype.shift; obj.shift() === undefined. Actual: ' + (shift)); - } - //CHECK#2 - if (obj.length !== 0) { - $ERROR('#2: var obj = {}; obj.shift = Array.prototype.shift; obj.shift(); obj.length === 0. Actual: ' + (obj.length)); - } + //CHECK#1 + var shift = obj.shift(); + if (shift !== undefined) { + $ERROR('#1: var obj = {}; obj.shift = Array.prototype.shift; obj.shift() === undefined. Actual: ' + (shift)); + } + //CHECK#2 + if (obj.length !== 0) { + $ERROR('#2: var obj = {}; obj.shift = Array.prototype.shift; obj.shift(); obj.length === 0. Actual: ' + (obj.length)); + } } //CHECK#3 diff --git a/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T2.js b/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T2.js index 2dc7695d29..af9768c912 100644 --- a/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T2.js +++ b/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T2.js @@ -50,7 +50,7 @@ if (shift !== undefined) { if (obj.length !== 0) { $ERROR('#8: var obj = {}; obj.length = -0; obj.shift = Array.prototype.shift; obj.shift(); obj.length === 0. Actual: ' + (obj.length)); } else { - if (1/obj.length !== Number.POSITIVE_INFINITY) { + if (1 / obj.length !== Number.POSITIVE_INFINITY) { $ERROR('#8: var obj = {}; obj.length = -0; obj.shift = Array.prototype.shift; obj.shift(); obj.length === +0. Actual: ' + (obj.length)); } } diff --git a/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T5.js b/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T5.js index f16915d791..51e927577b 100644 --- a/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T5.js +++ b/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T5.js @@ -17,7 +17,11 @@ obj.shift = Array.prototype.shift; //CHECK#1 obj[0] = -1; -obj.length = {valueOf: function() {return 1}}; +obj.length = { + valueOf: function() { + return 1 + } +}; var shift = obj.shift(); if (shift !== -1) { $ERROR('#1: obj[0] = -1; obj.length = {valueOf: function() {return 1}} obj.shift() === -1. Actual: ' + (shift)); @@ -25,7 +29,14 @@ if (shift !== -1) { //CHECK#2 obj[0] = -1; -obj.length = {valueOf: function() {return 1}, toString: function() {return 0}}; +obj.length = { + valueOf: function() { + return 1 + }, + toString: function() { + return 0 + } +}; var shift = obj.shift(); if (shift !== -1) { $ERROR('#0: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {return 0}} obj.shift() === -1. Actual: ' + (shift)); @@ -33,7 +44,14 @@ if (shift !== -1) { //CHECK#3 obj[0] = -1; -obj.length = {valueOf: function() {return 1}, toString: function() {return {}}}; +obj.length = { + valueOf: function() { + return 1 + }, + toString: function() { + return {} + } +}; var shift = obj.shift(); if (shift !== -1) { $ERROR('#3: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {return {}}} obj.shift() === -1. Actual: ' + (shift)); @@ -42,9 +60,16 @@ if (shift !== -1) { //CHECK#4 try { obj[0] = -1; - obj.length = {valueOf: function() {return 1}, toString: function() {throw "error"}}; + obj.length = { + valueOf: function() { + return 1 + }, + toString: function() { + throw "error" + } + }; var shift = obj.shift(); -if (shift !== -1) { + if (shift !== -1) { $ERROR('#4.1: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {throw "error"}}; obj.shift() === ",". Actual: ' + (shift)); } } @@ -58,7 +83,11 @@ catch (e) { //CHECK#5 obj[0] = -1; -obj.length = {toString: function() {return 0}}; +obj.length = { + toString: function() { + return 0 + } +}; var shift = obj.shift(); if (shift !== undefined) { $ERROR('#5: obj[0] = -1; obj.length = {toString: function() {return 0}} obj.shift() === undefined. Actual: ' + (shift)); @@ -66,7 +95,14 @@ if (shift !== undefined) { //CHECK#6 obj[0] = -1; -obj.length = {valueOf: function() {return {}}, toString: function() {return 0}} +obj.length = { + valueOf: function() { + return {} + }, + toString: function() { + return 0 + } +} var shift = obj.shift(); if (shift !== undefined) { $ERROR('#6: obj[0] = -1; obj.length = {valueOf: function() {return {}}, toString: function() {return 0}} obj.shift() === undefined. Actual: ' + (shift)); @@ -75,7 +111,14 @@ if (shift !== undefined) { //CHECK#7 try { obj[0] = -1; - obj.length = {valueOf: function() {throw "error"}, toString: function() {return 0}}; + obj.length = { + valueOf: function() { + throw "error" + }, + toString: function() { + return 0 + } + }; var shift = obj.shift(); $ERROR('#7.1: obj[0] = -1; obj.length = {valueOf: function() {throw "error"}, toString: function() {return 0}}; obj.shift() throw "error". Actual: ' + (shift)); } @@ -88,7 +131,14 @@ catch (e) { //CHECK#8 try { obj[0] = -1; - obj.length = {valueOf: function() {return {}}, toString: function() {return {}}}; + obj.length = { + valueOf: function() { + return {} + }, + toString: function() { + return {} + } + }; var shift = obj.shift(); $ERROR('#8.1: obj[0] = -1; obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.shift() throw TypeError. Actual: ' + (shift)); } diff --git a/test/built-ins/Array/prototype/shift/S15.4.4.9_A3_T3.js b/test/built-ins/Array/prototype/shift/S15.4.4.9_A3_T3.js index 60942b64a1..f1c786b210 100644 --- a/test/built-ins/Array/prototype/shift/S15.4.4.9_A3_T3.js +++ b/test/built-ins/Array/prototype/shift/S15.4.4.9_A3_T3.js @@ -27,10 +27,10 @@ if (obj.length !== 0) { //CHECK#3 if (obj[0] !== "x") { - $ERROR('#3: var obj = {}; obj.shift = Array.prototype.shift; obj[0] = "x"; obj[1] = "y"; obj.length = -4294967294; obj.shift(); obj[0] === "x". Actual: ' + (obj[0])); + $ERROR('#3: var obj = {}; obj.shift = Array.prototype.shift; obj[0] = "x"; obj[1] = "y"; obj.length = -4294967294; obj.shift(); obj[0] === "x". Actual: ' + (obj[0])); } //CHECK#4 if (obj[1] !== "y") { - $ERROR('#4: var obj = {}; obj.shift = Array.prototype.shift; obj[0] = "x" obj[1] = "y"; obj.length = -4294967294; obj.shift(); obj[1] === "y". Actual: ' + (obj[1])); + $ERROR('#4: var obj = {}; obj.shift = Array.prototype.shift; obj[0] = "x" obj[1] = "y"; obj.length = -4294967294; obj.shift(); obj[1] === "y". Actual: ' + (obj[1])); } diff --git a/test/built-ins/Array/prototype/shift/S15.4.4.9_A4_T1.js b/test/built-ins/Array/prototype/shift/S15.4.4.9_A4_T1.js index 3a7c667f3c..8b78546308 100644 --- a/test/built-ins/Array/prototype/shift/S15.4.4.9_A4_T1.js +++ b/test/built-ins/Array/prototype/shift/S15.4.4.9_A4_T1.js @@ -33,7 +33,9 @@ if (x[1] !== 1) { Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.shift = Array.prototype.shift; -x = {0:0}; +x = { + 0: 0 +}; //CHECK#4 var shift = x.shift(); diff --git a/test/built-ins/Array/prototype/shift/S15.4.4.9_A4_T2.js b/test/built-ins/Array/prototype/shift/S15.4.4.9_A4_T2.js index 703c32e109..20fb5644e3 100644 --- a/test/built-ins/Array/prototype/shift/S15.4.4.9_A4_T2.js +++ b/test/built-ins/Array/prototype/shift/S15.4.4.9_A4_T2.js @@ -11,7 +11,7 @@ description: > ---*/ Array.prototype[1] = -1; -var x = [0,1]; +var x = [0, 1]; x.length = 2; //CHECK#1 @@ -33,7 +33,10 @@ if (x[1] !== -1) { Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.shift = Array.prototype.shift; -x = {0:0,1:1}; +x = { + 0: 0, + 1: 1 +}; //CHECK#4 var shift = x.shift(); diff --git a/test/built-ins/Array/prototype/slice/15.4.4.10-10-c-ii-1.js b/test/built-ins/Array/prototype/slice/15.4.4.10-10-c-ii-1.js index bd1c365821..ec1f509d3a 100644 --- a/test/built-ins/Array/prototype/slice/15.4.4.10-10-c-ii-1.js +++ b/test/built-ins/Array/prototype/slice/15.4.4.10-10-c-ii-1.js @@ -9,15 +9,15 @@ description: > index property (read-only) exists in Array.prototype (Step 10.c.ii) ---*/ - var arrObj = [1, 2, 3]; +var arrObj = [1, 2, 3]; - Object.defineProperty(Array.prototype, "0", { - value: "test", - writable: false, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + value: "test", + writable: false, + configurable: true +}); - var newArr = arrObj.slice(0, 1); +var newArr = arrObj.slice(0, 1); assert(newArr.hasOwnProperty("0"), 'newArr.hasOwnProperty("0") !== true'); assert.sameValue(newArr[0], 1, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T1.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T1.js index 567f24e6d4..befb1fd88c 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T1.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T1.js @@ -10,8 +10,8 @@ es5id: 15.4.4.10_A1.1_T1 description: length > end > start = 0 ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(0,3); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(0, 3); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T2.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T2.js index 42027f84c2..5955eb054e 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T2.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T2.js @@ -10,8 +10,8 @@ es5id: 15.4.4.10_A1.1_T2 description: length > end = start > 0 ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(3,3); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(3, 3); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T3.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T3.js index 29b2074ed8..1967fdbca4 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T3.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T3.js @@ -10,8 +10,8 @@ es5id: 15.4.4.10_A1.1_T3 description: length > start > end > 0 ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(4,3); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(4, 3); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T4.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T4.js index 7191ed8e2c..719d7634c5 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T4.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T4.js @@ -10,8 +10,8 @@ es5id: 15.4.4.10_A1.1_T4 description: length = end = start > 0 ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(5,5); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(5, 5); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T5.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T5.js index b5ccf10648..6c6e24b859 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T5.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T5.js @@ -10,8 +10,8 @@ es5id: 15.4.4.10_A1.1_T5 description: length = end > start > 0 ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(3,5); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(3, 5); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T6.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T6.js index c66a6bddf7..63a86046ab 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T6.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T6.js @@ -10,8 +10,8 @@ es5id: 15.4.4.10_A1.1_T6 description: length > end > start > 0; ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(2,4); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(2, 4); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T7.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T7.js index 5e1585a525..158c4e01d5 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T7.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T7.js @@ -10,8 +10,8 @@ es5id: 15.4.4.10_A1.1_T7 description: end > length > start > 0 ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(3,6); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(3, 6); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T1.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T1.js index efac0d4156..f79bd3d4fe 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T1.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T1.js @@ -10,8 +10,8 @@ es5id: 15.4.4.10_A1.2_T1 description: length > end = abs(start), start < 0 ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(-3,3); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(-3, 3); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T2.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T2.js index f424caee99..ef60e55af9 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T2.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T2.js @@ -10,8 +10,8 @@ es5id: 15.4.4.10_A1.2_T2 description: length = end > abs(start), start < 0 ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(-1,5); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(-1, 5); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T3.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T3.js index 8b6018424b..c598e86791 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T3.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T3.js @@ -10,8 +10,8 @@ es5id: 15.4.4.10_A1.2_T3 description: abs(start) = length > end > 0, start < 0 ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(-5,1); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(-5, 1); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T4.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T4.js index cddd4790b8..c12138e367 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T4.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T4.js @@ -10,8 +10,8 @@ es5id: 15.4.4.10_A1.2_T4 description: abs(start) > length = end > 0, start < 0 ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(-9,5); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(-9, 5); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T1.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T1.js index b5d84984f7..664ed6861a 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T1.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T1.js @@ -10,8 +10,8 @@ es5id: 15.4.4.10_A1.3_T1 description: length > abs(end) > start = 0, end < 0 ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(0,-2); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(0, -2); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T2.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T2.js index 0b4c0c2bc1..761cb1266d 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T2.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T2.js @@ -10,8 +10,8 @@ es5id: 15.4.4.10_A1.3_T2 description: length > abs(end) > start > 0, end < 0 ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(1,-4); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(1, -4); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T3.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T3.js index f14a223e39..37f75f8cb1 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T3.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T3.js @@ -10,8 +10,8 @@ es5id: 15.4.4.10_A1.3_T3 description: length = abs(end) > start = 0, end < 0 ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(0,-5); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(0, -5); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T4.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T4.js index f544b49f5e..c62284187e 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T4.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T4.js @@ -10,8 +10,8 @@ es5id: 15.4.4.10_A1.3_T4 description: abs(end) > length > start > 0, end < 0 ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(4,-9); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(4, -9); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T1.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T1.js index 91919d2072..ac01bd21b0 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T1.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T1.js @@ -10,8 +10,8 @@ es5id: 15.4.4.10_A1.4_T1 description: -length = start < end < 0 ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(-5,-2); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(-5, -2); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T2.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T2.js index b0d7084648..a08595272a 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T2.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T2.js @@ -10,8 +10,8 @@ es5id: 15.4.4.10_A1.4_T2 description: -length < start < end < 0 ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(-3,-1); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(-3, -1); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T3.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T3.js index 222609a983..0942b395b2 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T3.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T3.js @@ -10,8 +10,8 @@ es5id: 15.4.4.10_A1.4_T3 description: start < -length < end < 0 ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(-9,-1); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(-9, -1); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T4.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T4.js index cb326f2506..3536e83a97 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T4.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T4.js @@ -10,8 +10,8 @@ es5id: 15.4.4.10_A1.4_T4 description: start = end < -length ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(-6,-6); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(-6, -6); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.5_T1.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.5_T1.js index dc61d20fad..47fc27eafe 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.5_T1.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.5_T1.js @@ -8,7 +8,7 @@ es5id: 15.4.4.10_A1.5_T1 description: end === undefined ---*/ -var x = [0,1,2,3,4]; +var x = [0, 1, 2, 3, 4]; var arr = x.slice(3, undefined); //CHECK#1 diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.5_T2.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.5_T2.js index 7bdeb39832..d6423de98c 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.5_T2.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.5_T2.js @@ -8,7 +8,7 @@ es5id: 15.4.4.10_A1.5_T2 description: end is absent ---*/ -var x = [0,1,2,3,4]; +var x = [0, 1, 2, 3, 4]; var arr = x.slice(-2); //CHECK#1 diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T1.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T1.js index d81cd4a98a..ceecbe2ae4 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T1.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T1.js @@ -8,8 +8,8 @@ es5id: 15.4.4.10_A2.1_T1 description: start is not integer ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(2.5,4); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(2.5, 4); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T2.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T2.js index 6c86d2e502..be2087bab3 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T2.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T2.js @@ -8,8 +8,8 @@ es5id: 15.4.4.10_A2.1_T2 description: start = NaN ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(NaN,3); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(NaN, 3); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T3.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T3.js index d61be15bf8..41514e0279 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T3.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T3.js @@ -8,8 +8,8 @@ es5id: 15.4.4.10_A2.1_T3 description: start = Infinity ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(Number.POSITIVE_INFINITY,3); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(Number.POSITIVE_INFINITY, 3); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T4.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T4.js index 86c49a99a6..7d1f0fc99b 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T4.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T4.js @@ -8,8 +8,8 @@ es5id: 15.4.4.10_A2.1_T4 description: start = -Infinity ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(Number.NEGATIVE_INFINITY,3); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(Number.NEGATIVE_INFINITY, 3); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T5.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T5.js index 57e496f09c..e0c60b2fea 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T5.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T5.js @@ -8,8 +8,15 @@ es5id: 15.4.4.10_A2.1_T5 description: ToInteger use ToNumber ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice({valueOf: function() {return 0}, toString: function() {return 3}},3); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice({ + valueOf: function() { + return 0 + }, + toString: function() { + return 3 + } +}, 3); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T1.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T1.js index 5614b6d5ae..b5274f83b3 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T1.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T1.js @@ -8,8 +8,8 @@ es5id: 15.4.4.10_A2.2_T1 description: end is not integer ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(2,4.5); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(2, 4.5); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T2.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T2.js index 1ba6d49717..ab712d9ba1 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T2.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T2.js @@ -8,8 +8,8 @@ es5id: 15.4.4.10_A2.2_T2 description: end = NaN ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(0,NaN); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(0, NaN); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T3.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T3.js index 71a12e4c5e..31c4a03593 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T3.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T3.js @@ -8,8 +8,8 @@ es5id: 15.4.4.10_A2.2_T3 description: end = Infinity ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(0,Number.POSITIVE_INFINITY); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(0, Number.POSITIVE_INFINITY); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T4.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T4.js index b4e12693c4..d5f4063e89 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T4.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T4.js @@ -8,8 +8,8 @@ es5id: 15.4.4.10_A2.2_T4 description: end = -Infinity ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(0,Number.NEGATIVE_INFINITY); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(0, Number.NEGATIVE_INFINITY); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T5.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T5.js index 17e113c6b9..78affa8a2c 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T5.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T5.js @@ -8,8 +8,15 @@ es5id: 15.4.4.10_A2.2_T5 description: ToInteger use ToNumber ---*/ -var x = [0,1,2,3,4]; -var arr = x.slice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); +var x = [0, 1, 2, 3, 4]; +var arr = x.slice(0, { + valueOf: function() { + return 3 + }, + toString: function() { + return 0 + } +}); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T1.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T1.js index 2bb88ee450..05fb643f1c 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T1.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T1.js @@ -20,7 +20,7 @@ obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; -var arr = obj.slice(0,3); +var arr = obj.slice(0, 3); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T2.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T2.js index bf6dbdc529..0971b1a476 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T2.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T2.js @@ -20,7 +20,7 @@ obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; -var arr = obj.slice(-5,3); +var arr = obj.slice(-5, 3); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T3.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T3.js index 2d0ef0d240..9214694c6a 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T3.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T3.js @@ -20,7 +20,7 @@ obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; -var arr = obj.slice(0,-2); +var arr = obj.slice(0, -2); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T4.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T4.js index d1aa9d2586..398423039f 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T4.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T4.js @@ -20,7 +20,7 @@ obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; -var arr = obj.slice(-5,-2); +var arr = obj.slice(-5, -2); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T1.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T1.js index 1a4ad0bb16..63b69324ba 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T1.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T1.js @@ -15,10 +15,10 @@ obj[4294967295] = "y"; obj.length = 4294967296; try { - var arr = obj.slice(0,4294967296); + var arr = obj.slice(0, 4294967296); $ERROR('#1: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; var arr = obj.slice(0,4294967296); lead to throwing exception.'); } catch (e) { if (!(e instanceof RangeError)) { - $ERROR('#1.1: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; var arr = obj.slice(0,4294967296); lead to throwing exception. Exception is instance of RangeError. Actual: exception is '+e); + $ERROR('#1.1: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; var arr = obj.slice(0,4294967296); lead to throwing exception. Exception is instance of RangeError. Actual: exception is ' + e); } } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T2.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T2.js index 7c65b5fbe8..d6d1c630f2 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T2.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T2.js @@ -15,10 +15,10 @@ obj[4294967296] = "y"; obj.length = 4294967297; try { - var arr = obj.slice(0,4294967297); + var arr = obj.slice(0, 4294967297); $ERROR('#1: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = "x"; obj[4294967296] = "y"; obj.length = 4294967297; var arr = obj.slice(0,4294967297); lead to throwing exception.'); } catch (e) { if (!(e instanceof RangeError)) { - $ERROR('#1.1: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = "x"; obj[4294967296] = "y"; obj.length = 4294967297; var arr = obj.slice(0,4294967297); lead to throwing exception. Exception is instance of RangeError. Actual: exception is '+e); + $ERROR('#1.1: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = "x"; obj[4294967296] = "y"; obj.length = 4294967297; var arr = obj.slice(0,4294967297); lead to throwing exception. Exception is instance of RangeError. Actual: exception is ' + e); } } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T3.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T3.js index a5b78f6f08..95da2f2238 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T3.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T3.js @@ -12,7 +12,7 @@ var obj = {}; obj.slice = Array.prototype.slice; obj[4294967294] = "x"; obj.length = -1; -var arr = obj.slice(4294967294,4294967295); +var arr = obj.slice(4294967294, 4294967295); //CHECK#1 if (arr.length !== 0) { @@ -21,5 +21,5 @@ if (arr.length !== 0) { //CHECK#3 if (arr[0] !== undefined) { - $ERROR('#3: var obj = {}; obj.slice = Array.prototype.slice; obj[4294967294] = "x"; obj.length = 4294967295; var arr = obj.slice(4294967294,4294967295); arr[0] === undefined. Actual: ' + (arr[0])); + $ERROR('#3: var obj = {}; obj.slice = Array.prototype.slice; obj[4294967294] = "x"; obj.length = 4294967295; var arr = obj.slice(4294967294,4294967295); arr[0] === undefined. Actual: ' + (arr[0])); } diff --git a/test/built-ins/Array/prototype/slice/create-non-array.js b/test/built-ins/Array/prototype/slice/create-non-array.js index 9061638d0f..d1cbc45859 100644 --- a/test/built-ins/Array/prototype/slice/create-non-array.js +++ b/test/built-ins/Array/prototype/slice/create-non-array.js @@ -16,7 +16,9 @@ info: | 4. If isArray is false, return ? ArrayCreate(length). ---*/ -var obj = { length: 0 }; +var obj = { + length: 0 +}; var callCount = 0; var result; Object.defineProperty(obj, 'constructor', { diff --git a/test/built-ins/Array/prototype/slice/length-exceeding-integer-limit-proxied-array.js b/test/built-ins/Array/prototype/slice/length-exceeding-integer-limit-proxied-array.js index 1d9f80606d..d1839760a1 100644 --- a/test/built-ins/Array/prototype/slice/length-exceeding-integer-limit-proxied-array.js +++ b/test/built-ins/Array/prototype/slice/length-exceeding-integer-limit-proxied-array.js @@ -30,27 +30,27 @@ array["9007199254740991"] = "9007199254740991"; var proxy = new Proxy(array, { get(t, pk, r) { if (pk === "length") - return 2**53 + 2; + return 2 ** 53 + 2; return Reflect.get(t, pk, r); } }); var result = Array.prototype.slice.call(proxy, 9007199254740989); -assert.compareArray(result, [ "9007199254740989", "9007199254740990" ], - "slice(9007199254740989)"); +assert.compareArray(result, ["9007199254740989", "9007199254740990"], + "slice(9007199254740989)"); var result = Array.prototype.slice.call(proxy, 9007199254740989, 9007199254740990); -assert.compareArray(result, [ "9007199254740989" ], - "slice(9007199254740989, 9007199254740990)"); +assert.compareArray(result, ["9007199254740989"], + "slice(9007199254740989, 9007199254740990)"); var result = Array.prototype.slice.call(proxy, 9007199254740989, 9007199254740996); -assert.compareArray(result, [ "9007199254740989", "9007199254740990" ], - "slice(9007199254740989, 9007199254740996)"); +assert.compareArray(result, ["9007199254740989", "9007199254740990"], + "slice(9007199254740989, 9007199254740996)"); var result = Array.prototype.slice.call(proxy, -2); -assert.compareArray(result, [ "9007199254740989", "9007199254740990" ], - "slice(-2)"); +assert.compareArray(result, ["9007199254740989", "9007199254740990"], + "slice(-2)"); var result = Array.prototype.slice.call(proxy, -2, -1); -assert.compareArray(result, [ "9007199254740989" ], - "slice(-2, -1)"); +assert.compareArray(result, ["9007199254740989"], + "slice(-2, -1)"); diff --git a/test/built-ins/Array/prototype/slice/length-exceeding-integer-limit.js b/test/built-ins/Array/prototype/slice/length-exceeding-integer-limit.js index 2fa32db97c..d3b4292881 100644 --- a/test/built-ins/Array/prototype/slice/length-exceeding-integer-limit.js +++ b/test/built-ins/Array/prototype/slice/length-exceeding-integer-limit.js @@ -23,25 +23,25 @@ var arrayLike = { "9007199254740989": "9007199254740989", "9007199254740990": "9007199254740990", "9007199254740991": "9007199254740991", - length: 2**53 + 2, + length: 2 ** 53 + 2, }; var result = Array.prototype.slice.call(arrayLike, 9007199254740989); -assert.compareArray(result, [ "9007199254740989", "9007199254740990" ], - "slice(9007199254740989)"); +assert.compareArray(result, ["9007199254740989", "9007199254740990"], + "slice(9007199254740989)"); var result = Array.prototype.slice.call(arrayLike, 9007199254740989, 9007199254740990); -assert.compareArray(result, [ "9007199254740989" ], - "slice(9007199254740989, 9007199254740990)"); +assert.compareArray(result, ["9007199254740989"], + "slice(9007199254740989, 9007199254740990)"); var result = Array.prototype.slice.call(arrayLike, 9007199254740989, 9007199254740996); -assert.compareArray(result, [ "9007199254740989", "9007199254740990" ], - "slice(9007199254740989, 9007199254740996)"); +assert.compareArray(result, ["9007199254740989", "9007199254740990"], + "slice(9007199254740989, 9007199254740996)"); var result = Array.prototype.slice.call(arrayLike, -2); -assert.compareArray(result, [ "9007199254740989", "9007199254740990" ], - "slice(-2)"); +assert.compareArray(result, ["9007199254740989", "9007199254740990"], + "slice(-2)"); var result = Array.prototype.slice.call(arrayLike, -2, -1); -assert.compareArray(result, [ "9007199254740989" ], - "slice(-2, -1)"); +assert.compareArray(result, ["9007199254740989"], + "slice(-2, -1)"); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-1-1.js b/test/built-ins/Array/prototype/some/15.4.4.17-1-1.js index 216ca2186f..d4f780dfae 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-1-1.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-1-1.js @@ -9,5 +9,5 @@ description: Array.prototype.some applied to undefined throws a TypeError assert.throws(TypeError, function() { - Array.prototype.some.call(undefined); + Array.prototype.some.call(undefined); }); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-1-10.js b/test/built-ins/Array/prototype/some/15.4.4.17-1-10.js index 7c6c28469a..b0bf38a18c 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-1-10.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-1-10.js @@ -7,11 +7,11 @@ es5id: 15.4.4.17-1-10 description: Array.prototype.some applied to the Math object ---*/ - function callbackfn(val, idx, obj) { - return '[object Math]' === Object.prototype.toString.call(obj); - } +function callbackfn(val, idx, obj) { + return '[object Math]' === Object.prototype.toString.call(obj); +} - Math.length = 1; - Math[0] = 1; +Math.length = 1; +Math[0] = 1; assert(Array.prototype.some.call(Math, callbackfn), 'Array.prototype.some.call(Math, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-1-11.js b/test/built-ins/Array/prototype/some/15.4.4.17-1-11.js index 79081ad78d..d61f9594be 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-1-11.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-1-11.js @@ -7,13 +7,13 @@ es5id: 15.4.4.17-1-11 description: Array.prototype.some applied to Date object ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof Date; - } +function callbackfn(val, idx, obj) { + return obj instanceof Date; +} - var obj = new Date(); - obj.length = 2; - obj[0] = 11; - obj[1] = 9; +var obj = new Date(); +obj.length = 2; +obj[0] = 11; +obj[1] = 9; assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-1-12.js b/test/built-ins/Array/prototype/some/15.4.4.17-1-12.js index e34099ca7c..905cf42746 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-1-12.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-1-12.js @@ -7,13 +7,13 @@ es5id: 15.4.4.17-1-12 description: Array.prototype.some applied to RegExp object ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof RegExp; - } +function callbackfn(val, idx, obj) { + return obj instanceof RegExp; +} - var obj = new RegExp(); - obj.length = 2; - obj[0] = 11; - obj[1] = 9; +var obj = new RegExp(); +obj.length = 2; +obj[0] = 11; +obj[1] = 9; assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-1-13.js b/test/built-ins/Array/prototype/some/15.4.4.17-1-13.js index 650afc630c..55105713d5 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-1-13.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-1-13.js @@ -7,11 +7,11 @@ es5id: 15.4.4.17-1-13 description: Array.prototype.some applied to the JSON object ---*/ - function callbackfn(val, idx, obj) { - return '[object JSON]' === Object.prototype.toString.call(obj); - } +function callbackfn(val, idx, obj) { + return '[object JSON]' === Object.prototype.toString.call(obj); +} - JSON.length = 1; - JSON[0] = 1; +JSON.length = 1; +JSON[0] = 1; assert(Array.prototype.some.call(JSON, callbackfn), 'Array.prototype.some.call(JSON, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-1-14.js b/test/built-ins/Array/prototype/some/15.4.4.17-1-14.js index 292ab95afb..8218287846 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-1-14.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-1-14.js @@ -7,12 +7,12 @@ es5id: 15.4.4.17-1-14 description: Array.prototype.some applied to Error object ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof Error; - } +function callbackfn(val, idx, obj) { + return obj instanceof Error; +} - var obj = new Error(); - obj.length = 1; - obj[0] = 1; +var obj = new Error(); +obj.length = 1; +obj[0] = 1; assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-1-15.js b/test/built-ins/Array/prototype/some/15.4.4.17-1-15.js index d4622f376d..27cfa61dbe 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-1-15.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-1-15.js @@ -7,12 +7,12 @@ es5id: 15.4.4.17-1-15 description: Array.prototype.some applied to the Arguments object ---*/ - function callbackfn(val, idx, obj) { - return '[object Arguments]' === Object.prototype.toString.call(obj); - } +function callbackfn(val, idx, obj) { + return '[object Arguments]' === Object.prototype.toString.call(obj); +} - var obj = (function () { - return arguments; - }("a", "b")); +var obj = (function() { + return arguments; +}("a", "b")); assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-1-2.js b/test/built-ins/Array/prototype/some/15.4.4.17-1-2.js index bdcf9c45cd..abc12eef8d 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-1-2.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-1-2.js @@ -9,5 +9,5 @@ description: Array.prototype.some applied to null throws a TypeError assert.throws(TypeError, function() { - Array.prototype.some.call(null); + Array.prototype.some.call(null); }); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-1-3.js b/test/built-ins/Array/prototype/some/15.4.4.17-1-3.js index 49c698f379..38edf932d9 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-1-3.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-1-3.js @@ -7,11 +7,11 @@ es5id: 15.4.4.17-1-3 description: Array.prototype.some applied to boolean primitive ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof Boolean; - } +function callbackfn(val, idx, obj) { + return obj instanceof Boolean; +} - Boolean.prototype[0] = 1; - Boolean.prototype.length = 1; +Boolean.prototype[0] = 1; +Boolean.prototype.length = 1; assert(Array.prototype.some.call(false, callbackfn), 'Array.prototype.some.call(false, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-1-4.js b/test/built-ins/Array/prototype/some/15.4.4.17-1-4.js index d17988608a..e025ac0c29 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-1-4.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-1-4.js @@ -7,13 +7,13 @@ es5id: 15.4.4.17-1-4 description: Array.prototype.some applied to Boolean object ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof Boolean; - } +function callbackfn(val, idx, obj) { + return obj instanceof Boolean; +} - var obj = new Boolean(true); - obj.length = 2; - obj[0] = 11; - obj[1] = 9; +var obj = new Boolean(true); +obj.length = 2; +obj[0] = 11; +obj[1] = 9; assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-1-5.js b/test/built-ins/Array/prototype/some/15.4.4.17-1-5.js index ce0483b517..827d030efd 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-1-5.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-1-5.js @@ -7,11 +7,11 @@ es5id: 15.4.4.17-1-5 description: Array.prototype.some applied to number primitive ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof Number; - } +function callbackfn(val, idx, obj) { + return obj instanceof Number; +} - Number.prototype[1] = true; - Number.prototype.length = 2; +Number.prototype[1] = true; +Number.prototype.length = 2; assert(Array.prototype.some.call(5, callbackfn), 'Array.prototype.some.call(5, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-1-6.js b/test/built-ins/Array/prototype/some/15.4.4.17-1-6.js index a5c84bfe59..78791585ec 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-1-6.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-1-6.js @@ -7,13 +7,13 @@ es5id: 15.4.4.17-1-6 description: Array.prototype.some applied to Number object ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof Number; - } +function callbackfn(val, idx, obj) { + return obj instanceof Number; +} - var obj = new Number(-128); - obj.length = 2; - obj[0] = 11; - obj[1] = 9; +var obj = new Number(-128); +obj.length = 2; +obj[0] = 11; +obj[1] = 9; assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-1-7.js b/test/built-ins/Array/prototype/some/15.4.4.17-1-7.js index c44c66dc3e..f69a384e39 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-1-7.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-1-7.js @@ -7,8 +7,8 @@ es5id: 15.4.4.17-1-7 description: Array.prototype.some applied to applied to string primitive ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof String; - } +function callbackfn(val, idx, obj) { + return obj instanceof String; +} assert(Array.prototype.some.call("hello\nw_orld\\!", callbackfn), 'Array.prototype.some.call("hello\nw_orld\\!", callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-1-8.js b/test/built-ins/Array/prototype/some/15.4.4.17-1-8.js index bbef0f62b1..4a439b90ef 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-1-8.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-1-8.js @@ -7,10 +7,10 @@ es5id: 15.4.4.17-1-8 description: Array.prototype.some applied to String object ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof String; - } +function callbackfn(val, idx, obj) { + return obj instanceof String; +} - var obj = new String("hello\nw_orld\\!"); +var obj = new String("hello\nw_orld\\!"); assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-1-9.js b/test/built-ins/Array/prototype/some/15.4.4.17-1-9.js index 3dd74e3021..866d6f61b8 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-1-9.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-1-9.js @@ -7,14 +7,14 @@ es5id: 15.4.4.17-1-9 description: Array.prototype.some applied to Function object ---*/ - function callbackfn(val, idx, obj) { - return obj instanceof Function; - } +function callbackfn(val, idx, obj) { + return obj instanceof Function; +} - var obj = function (a, b) { - return a + b; - }; - obj[0] = 11; - obj[1] = 9; +var obj = function(a, b) { + return a + b; +}; +obj[0] = 11; +obj[1] = 9; assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-1.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-1.js index b8d3aec50d..aa8eeca34c 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-1.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-1.js @@ -9,20 +9,20 @@ description: > Array-like object ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var obj = { - 0: 9, - 1: 11, - 2: 12, - length: 2 - }; +var obj = { + 0: 9, + 1: 11, + 2: 12, + length: 2 +}; assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-10.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-10.js index 29409cea90..5a97e40fd9 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-10.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-10.js @@ -9,30 +9,30 @@ description: > on an Array-like object ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(proto, "length", { + get: function() { + return 2; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[0] = 9; - child[1] = 11; - child[2] = 12; +var child = new Con(); +child[0] = 9; +child[1] = 11; +child[2] = 12; assert(Array.prototype.some.call(child, callbackfn1), 'Array.prototype.some.call(child, callbackfn1) !== true'); assert.sameValue(Array.prototype.some.call(child, callbackfn2), false, 'Array.prototype.some.call(child, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-11.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-11.js index 41b817a873..0406211196 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-11.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-11.js @@ -9,21 +9,21 @@ description: > without a get function on an Array-like object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var obj = { - 0: 11, - 1: 12 - }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); +var obj = { + 0: 11, + 1: 12 +}; +Object.defineProperty(obj, "length", { + set: function() {}, + configurable: true +}); assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-12.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-12.js index df83ae028b..0f4f5077fd 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-12.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-12.js @@ -10,25 +10,28 @@ description: > Array-like object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - Object.defineProperty(Object.prototype, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(Object.prototype, "length", { + get: function() { + return 2; + }, + configurable: true +}); - var obj = { 0: 11, 1: 12 }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); +var obj = { + 0: 11, + 1: 12 +}; +Object.defineProperty(obj, "length", { + set: function() {}, + configurable: true +}); assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-13.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-13.js index d16ce11487..568c277050 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-13.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-13.js @@ -9,25 +9,25 @@ description: > without a get function on an Array-like object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var proto = {}; - Object.defineProperty(proto, "length", { - set: function () { }, - configurable: true - }); +var proto = {}; +Object.defineProperty(proto, "length", { + set: function() {}, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[0] = 11; - child[1] = 12; +var child = new Con(); +child[0] = 11; +child[1] = 12; assert.sameValue(Array.prototype.some.call(child, callbackfn), false, 'Array.prototype.some.call(child, callbackfn)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-14.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-14.js index ce43f05a32..78ee06b3e7 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-14.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-14.js @@ -9,14 +9,17 @@ description: > Array-like object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-17.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-17.js index 67829327e3..21eb5febac 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-17.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-17.js @@ -9,18 +9,18 @@ description: > implements its own property get method ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var func = function (a, b) { - arguments[2] = 12; - return Array.prototype.some.call(arguments, callbackfn1) && - !Array.prototype.some.call(arguments, callbackfn2); - }; +var func = function(a, b) { + arguments[2] = 12; + return Array.prototype.some.call(arguments, callbackfn1) && + !Array.prototype.some.call(arguments, callbackfn2); +}; assert(func(9, 11), 'func(9, 11) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-18.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-18.js index e640da588e..336a943e4e 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-18.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-18.js @@ -9,17 +9,17 @@ description: > own property get method ---*/ - function callbackfn1(val, idx, obj) { - return parseInt(val, 10) > 1; - } +function callbackfn1(val, idx, obj) { + return parseInt(val, 10) > 1; +} - function callbackfn2(val, idx, obj) { - return parseInt(val, 10) > 2; - } +function callbackfn2(val, idx, obj) { + return parseInt(val, 10) > 2; +} - var str = new String("12"); +var str = new String("12"); - String.prototype[2] = "3"; +String.prototype[2] = "3"; assert(Array.prototype.some.call(str, callbackfn1), 'Array.prototype.some.call(str, callbackfn1) !== true'); assert.sameValue(Array.prototype.some.call(str, callbackfn2), false, 'Array.prototype.some.call(str, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-19.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-19.js index a299cbbc78..07c1ada28b 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-19.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-19.js @@ -9,20 +9,20 @@ description: > its own property get method ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var fun = function (a, b) { - return a + b; - }; - fun[0] = 9; - fun[1] = 11; - fun[2] = 12; +var fun = function(a, b) { + return a + b; +}; +fun[0] = 9; +fun[1] = 11; +fun[2] = 12; assert(Array.prototype.some.call(fun, callbackfn1), 'Array.prototype.some.call(fun, callbackfn1) !== true'); assert.sameValue(Array.prototype.some.call(fun, callbackfn2), false, 'Array.prototype.some.call(fun, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-2.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-2.js index e546927edb..e8d870de64 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-2.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-2.js @@ -7,15 +7,15 @@ es5id: 15.4.4.17-2-2 description: Array.prototype.some - 'length' is own data property on an Array ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - Array.prototype[2] = 12; +Array.prototype[2] = 12; assert([9, 11].some(callbackfn1), '[9, 11].some(callbackfn1) !== true'); assert.sameValue([9, 11].some(callbackfn2), false, '[9, 11].some(callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-3.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-3.js index d2ef52b08b..f663fb2742 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-3.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-3.js @@ -9,24 +9,26 @@ description: > overrides an inherited data property on an Array-like object ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var proto = { length: 3 }; +var proto = { + length: 3 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 2; - child[0] = 9; - child[1] = 11; - child[2] = 12; +var child = new Con(); +child.length = 2; +child[0] = 9; +child[1] = 11; +child[2] = 12; assert(Array.prototype.some.call(child, callbackfn1), 'Array.prototype.some.call(child, callbackfn1) !== true'); assert.sameValue(Array.prototype.some.call(child, callbackfn2), false, 'Array.prototype.some.call(child, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-4.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-4.js index e3461b6b2b..b966fb8c8b 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-4.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-4.js @@ -9,18 +9,19 @@ description: > overrides an inherited data property on an array ---*/ - var arrProtoLen = 0; - function callbackfn1(val, idx, obj) { - return val > 10; - } +var arrProtoLen = 0; - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - arrProtoLen = Array.prototype.length; - Array.prototype.length = 0; - Array.prototype[2] = 12; +function callbackfn2(val, idx, obj) { + return val > 11; +} + +arrProtoLen = Array.prototype.length; +Array.prototype.length = 0; +Array.prototype[2] = 12; assert([9, 11].some(callbackfn1), '[9, 11].some(callbackfn1) !== true'); assert.sameValue([9, 11].some(callbackfn2), false, '[9, 11].some(callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-5.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-5.js index af407300f3..6433283d2a 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-5.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-5.js @@ -9,35 +9,35 @@ description: > overrides an inherited accessor property on an Array-like object ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 3; - }, - configurable: true - }); +Object.defineProperty(proto, "length", { + get: function() { + return 3; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - Object.defineProperty(child, "length", { - value: 2, - configurable: true - }); +var child = new Con(); +Object.defineProperty(child, "length", { + value: 2, + configurable: true +}); - child[0] = 9; - child[1] = 11; - child[2] = 12; +child[0] = 9; +child[1] = 11; +child[2] = 12; assert(Array.prototype.some.call(child, callbackfn1), 'Array.prototype.some.call(child, callbackfn1) !== true'); assert.sameValue(Array.prototype.some.call(child, callbackfn2), false, 'Array.prototype.some.call(child, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-6.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-6.js index c559436e50..2b322c6257 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-6.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-6.js @@ -9,23 +9,25 @@ description: > an Array-like object ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var proto = { length: 2 }; +var proto = { + length: 2 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[0] = 9; - child[1] = 11; - child[2] = 12; +var child = new Con(); +child[0] = 9; +child[1] = 11; +child[2] = 12; assert(Array.prototype.some.call(child, callbackfn1), 'Array.prototype.some.call(child, callbackfn1) !== true'); assert.sameValue(Array.prototype.some.call(child, callbackfn2), false, 'Array.prototype.some.call(child, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-7.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-7.js index 2231966742..0a3e4b4e68 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-7.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-7.js @@ -9,26 +9,26 @@ description: > Array-like object ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var obj = { }; +var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return 2; + }, + configurable: true +}); - obj[0] = 9; - obj[1] = 11; - obj[2] = 12; +obj[0] = 9; +obj[1] = 11; +obj[2] = 12; assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-8.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-8.js index 4fd06784b1..9e23a93810 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-8.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-8.js @@ -9,31 +9,33 @@ description: > overrides an inherited data property on an Array-like object ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var proto = { length: 3 }; +var proto = { + length: 3 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); +var child = new Con(); - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(child, "length", { + get: function() { + return 2; + }, + configurable: true +}); - child[0] = 9; - child[1] = 11; - child[2] = 12; +child[0] = 9; +child[1] = 11; +child[2] = 12; assert(Array.prototype.some.call(child, callbackfn1), 'Array.prototype.some.call(child, callbackfn1) !== true'); assert.sameValue(Array.prototype.some.call(child, callbackfn2), false, 'Array.prototype.some.call(child, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-9.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-9.js index efd0405f07..c670d9a8d5 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-9.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-9.js @@ -9,38 +9,38 @@ description: > overrides an inherited accessor property on an Array-like object ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 3; - }, - configurable: true - }); +Object.defineProperty(proto, "length", { + get: function() { + return 3; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); +var child = new Con(); - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(child, "length", { + get: function() { + return 2; + }, + configurable: true +}); - child[0] = 9; - child[1] = 11; - child[2] = 12; +child[0] = 9; +child[1] = 11; +child[2] = 12; assert(Array.prototype.some.call(child, callbackfn1), 'Array.prototype.some.call(child, callbackfn1) !== true'); assert.sameValue(Array.prototype.some.call(child, callbackfn2), false, 'Array.prototype.some.call(child, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-1.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-1.js index 75dd251336..8f93e82c57 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-1.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-1.js @@ -7,14 +7,17 @@ es5id: 15.4.4.17-3-1 description: Array.prototype.some - value of 'length' is undefined ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var obj = { 0: 11, length: undefined }; +var obj = { + 0: 11, + length: undefined +}; assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-10.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-10.js index 042091cbff..ef0361216a 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-10.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-10.js @@ -7,14 +7,17 @@ es5id: 15.4.4.17-3-10 description: Array.prototype.some - value of 'length' is a number (value is NaN) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var obj = { 0: 11, length: NaN }; +var obj = { + 0: 11, + length: NaN +}; assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-11.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-11.js index 0c0dc91bda..fa97906421 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-11.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-11.js @@ -9,15 +9,20 @@ description: > number ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var obj = { 0: 9, 1: 11, 2: 12, length: "2" }; +var obj = { + 0: 9, + 1: 11, + 2: 12, + length: "2" +}; assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-12.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-12.js index 5308096de9..ac407faa9f 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-12.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-12.js @@ -9,15 +9,20 @@ description: > number ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var obj = { 0: 9, 1: 11, 2: 12, length: "-4294967294" }; +var obj = { + 0: 9, + 1: 11, + 2: 12, + length: "-4294967294" +}; assert.sameValue(Array.prototype.some.call(obj, callbackfn1), false, 'Array.prototype.some.call(obj, callbackfn1)'); assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-13.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-13.js index 127405c684..dcaa0d724f 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-13.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-13.js @@ -9,15 +9,20 @@ description: > number ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var obj = { 0: 9, 1: 11, 2: 12, length: "2.5" }; +var obj = { + 0: 9, + 1: 11, + 2: 12, + length: "2.5" +}; assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-14.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-14.js index ac471bf34d..77607bfcaf 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-14.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-14.js @@ -7,16 +7,25 @@ es5id: 15.4.4.17-3-14 description: Array.prototype.some - 'length' is a string containing +/-Infinity ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var objOne = { 0: 11, length: "Infinity" }; - var objTwo = { 0: 11, length: "+Infinity" }; - var objThree = { 0: 11, length: "-Infinity" }; +var objOne = { + 0: 11, + length: "Infinity" +}; +var objTwo = { + 0: 11, + length: "+Infinity" +}; +var objThree = { + 0: 11, + length: "-Infinity" +}; assert(Array.prototype.some.call(objOne, callbackfn), 'Array.prototype.some.call(objOne, callbackfn) !== true'); assert(Array.prototype.some.call(objTwo, callbackfn), 'Array.prototype.some.call(objTwo, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-15.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-15.js index 08a39ca38f..a74c4bcebd 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-15.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-15.js @@ -9,15 +9,20 @@ description: > exponential number ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var obj = { 0: 9, 1: 11, 2: 12, length: "2E0" }; +var obj = { + 0: 9, + 1: 11, + 2: 12, + length: "2E0" +}; assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-16.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-16.js index 86173aca78..057f068765 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-16.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-16.js @@ -7,15 +7,20 @@ es5id: 15.4.4.17-3-16 description: Array.prototype.some - 'length' is a string containing a hex number ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var obj = { 0: 9, 1: 11, 2: 12, length: "0x0002" }; +var obj = { + 0: 9, + 1: 11, + 2: 12, + length: "0x0002" +}; assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-17.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-17.js index cf2759e88f..857fa9a373 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-17.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-17.js @@ -9,15 +9,20 @@ description: > with leading zeros ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var obj = { 0: 9, 1: 11, 2: 12, length: "0002.00" }; +var obj = { + 0: 9, + 1: 11, + 2: 12, + length: "0002.00" +}; assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-18.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-18.js index a8924f21ff..13de82ccd0 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-18.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-18.js @@ -9,14 +9,18 @@ description: > convert to a number ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var obj = { 0: 11, 1: 21, length: "two" }; +var obj = { + 0: 11, + 1: 21, + length: "two" +}; assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-19.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-19.js index dddf8132dc..c8521e83c3 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-19.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-19.js @@ -9,27 +9,27 @@ description: > own toString method ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var toStringAccessed = false; - var obj = { - 0: 9, - 1: 11, - 2: 12, +var toStringAccessed = false; +var obj = { + 0: 9, + 1: 11, + 2: 12, - length: { - toString: function () { - toStringAccessed = true; - return '2'; - } - } - }; + length: { + toString: function() { + toStringAccessed = true; + return '2'; + } + } +}; assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-2.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-2.js index 3b90cbdd1b..2898ce5ae7 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-2.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-2.js @@ -9,15 +9,19 @@ description: > (length overridden to true(type conversion)) ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var obj = { 0: 11, 1: 12, length: true }; +var obj = { + 0: 11, + 1: 12, + length: true +}; assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-20.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-20.js index af023ef5e8..9464bc45e2 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-20.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-20.js @@ -9,27 +9,27 @@ description: > own valueOf method ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var valueOfAccessed = false; +var valueOfAccessed = false; - var obj = { - 0: 9, - 1: 11, - 2: 12, - length: { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - } - }; +var obj = { + 0: 9, + 1: 11, + 2: 12, + length: { + valueOf: function() { + valueOfAccessed = true; + return 2; + } + } +}; assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-21.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-21.js index cb1926df05..c0d6aa9c83 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-21.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-21.js @@ -10,32 +10,32 @@ description: > returns a string ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var toStringAccessed = false; - var valueOfAccessed = false; +var toStringAccessed = false; +var valueOfAccessed = false; - var obj = { - 0: 9, - 1: 11, - 2: 12, - length: { - valueOf: function () { - valueOfAccessed = true; - return {}; - }, - toString: function () { - toStringAccessed = true; - return '2'; - } - } - }; +var obj = { + 0: 9, + 1: 11, + 2: 12, + length: { + valueOf: function() { + valueOfAccessed = true; + return {}; + }, + toString: function() { + toStringAccessed = true; + return '2'; + } + } +}; assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-22.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-22.js index a166c39f73..1dc3f2b006 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-22.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-22.js @@ -10,32 +10,32 @@ description: > primitive values ---*/ - var callbackfnAccessed = false; - var toStringAccessed = false; - var valueOfAccessed = false; +var callbackfnAccessed = false; +var toStringAccessed = false; +var valueOfAccessed = false; - function callbackfn(val, idx, obj) { - callbackfnAccessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + callbackfnAccessed = true; + return val > 10; +} - var obj = { - 0: 11, - 1: 12, +var obj = { + 0: 11, + 1: 12, - length: { - valueOf: function () { - valueOfAccessed = true; - return {}; - }, - toString: function () { - toStringAccessed = true; - return {}; - } - } - }; + length: { + valueOf: function() { + valueOfAccessed = true; + return {}; + }, + toString: function() { + toStringAccessed = true; + return {}; + } + } +}; assert.throws(TypeError, function() { - Array.prototype.some.call(obj, callbackfn); + Array.prototype.some.call(obj, callbackfn); }); assert(toStringAccessed, 'toStringAccessed !== true'); assert(valueOfAccessed, 'valueOfAccessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-23.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-23.js index 29c6dfbbd5..ec119aec48 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-23.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-23.js @@ -9,40 +9,40 @@ description: > is an object with an own toString and inherited valueOf methods ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var valueOfAccessed = false; - var toStringAccessed = false; +var valueOfAccessed = false; +var toStringAccessed = false; - var proto = { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - }; +var proto = { + valueOf: function() { + valueOfAccessed = true; + return 2; + } +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); +var child = new Con(); - child.toString = function () { - toStringAccessed = true; - return '1'; - }; +child.toString = function() { + toStringAccessed = true; + return '1'; +}; - var obj = { - 0: 9, - 1: 11, - 2: 12, - length: child - }; +var obj = { + 0: 9, + 1: 11, + 2: 12, + length: child +}; assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-24.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-24.js index fd95a3234c..562d7fdf15 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-24.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-24.js @@ -9,20 +9,20 @@ description: > non-integer, ensure truncation occurs in the proper direction ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var obj = { - 0: 9, - 10: 11, - 11: 12, - length: 11.5 - }; +var obj = { + 0: 9, + 10: 11, + 11: 12, + length: 11.5 +}; assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-25.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-25.js index ef10bed265..e1916896b9 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-25.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-25.js @@ -7,20 +7,20 @@ es5id: 15.4.4.17-3-25 description: Array.prototype.some - value of 'length' is a negative non-integer ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var obj = { - 0: 9, - 1: 11, - 2: 12, - length: -4294967294.5 - }; +var obj = { + 0: 9, + 1: 11, + 2: 12, + length: -4294967294.5 +}; assert.sameValue(Array.prototype.some.call(obj, callbackfn1), false, 'Array.prototype.some.call(obj, callbackfn1)'); assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-28.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-28.js index 31d402e2d1..b470634177 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-28.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-28.js @@ -7,17 +7,17 @@ es5id: 15.4.4.17-3-28 description: Array.prototype.some - value of 'length' is boundary value (2^32) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var obj = { - 0: 12, - length: 4294967296 - }; +var obj = { + 0: 12, + length: 4294967296 +}; assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-29.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-29.js index eeca40a0bd..132a0ec3b9 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-29.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-29.js @@ -9,19 +9,19 @@ description: > 1) ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var obj = { - 0: 11, - 1: 12, - length: 4294967297 - }; +var obj = { + 0: 11, + 1: 12, + length: 4294967297 +}; assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); assert(Array.prototype.some.call(obj, callbackfn2), 'Array.prototype.some.call(obj, callbackfn2) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-3.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-3.js index 7699537640..97637f6a7b 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-3.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-3.js @@ -7,14 +7,17 @@ es5id: 15.4.4.17-3-3 description: Array.prototype.some - value of 'length' is a number (value is 0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var obj = { 0: 11, length: 0 }; +var obj = { + 0: 11, + length: 0 +}; assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-4.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-4.js index cfcc27fc30..3a35aa1497 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-4.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-4.js @@ -7,14 +7,17 @@ es5id: 15.4.4.17-3-4 description: Array.prototype.some - value of 'length' is a number (value is +0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var obj = { 0: 11, length: +0 }; +var obj = { + 0: 11, + length: +0 +}; assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-5.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-5.js index 27d31dea75..2eddf9891a 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-5.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-5.js @@ -7,14 +7,17 @@ es5id: 15.4.4.17-3-5 description: Array.prototype.some - value of 'length' is a number (value is -0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var obj = { 0: 11, length: -0 }; +var obj = { + 0: 11, + length: -0 +}; assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-6.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-6.js index 053e096a98..c53b2808f3 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-6.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-6.js @@ -9,15 +9,20 @@ description: > positive) ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var obj = { 0: 9, 1: 11, 2: 12, length: 2 }; +var obj = { + 0: 9, + 1: 11, + 2: 12, + length: 2 +}; assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-7.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-7.js index 31de3aa25c..fcfdbecf29 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-7.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-7.js @@ -9,15 +9,20 @@ description: > negative) ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var obj = { 0: 9, 1: 11, 2: 12, length: -4294967294 }; +var obj = { + 0: 9, + 1: 11, + 2: 12, + length: -4294967294 +}; assert.sameValue(Array.prototype.some.call(obj, callbackfn1), false, 'Array.prototype.some.call(obj, callbackfn1)'); assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-8.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-8.js index f5496a481f..6946b1899b 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-8.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-8.js @@ -9,14 +9,17 @@ description: > Infinity) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var obj = { 0: 11, length: Infinity }; +var obj = { + 0: 11, + length: Infinity +}; assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-9.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-9.js index c65f458c0d..c0b2c5c15f 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-9.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-9.js @@ -9,14 +9,17 @@ description: > -Infinity) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var obj = { 0: 11, length: -Infinity }; +var obj = { + 0: 11, + length: -Infinity +}; assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-4-1.js b/test/built-ins/Array/prototype/some/15.4.4.17-4-1.js index 9ff74cac0a..30976864ef 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-4-1.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-4-1.js @@ -7,7 +7,7 @@ es5id: 15.4.4.17-4-1 description: Array.prototype.some throws TypeError if callbackfn is undefined ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.some(); + arr.some(); }); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-4-10.js b/test/built-ins/Array/prototype/some/15.4.4.17-4-10.js index 345f1474c3..3300ce5321 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-4-10.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-4-10.js @@ -9,15 +9,18 @@ description: > was thrown by step 2 ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - Object.defineProperty(obj, "length", { - get: function () { - throw new Test262Error(); - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + throw new Test262Error(); + }, + configurable: true +}); assert.throws(Test262Error, function() { - Array.prototype.some.call(obj, undefined); + Array.prototype.some.call(obj, undefined); }); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-4-11.js b/test/built-ins/Array/prototype/some/15.4.4.17-4-11.js index 0eec6e6c39..d0c7e6a74d 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-4-11.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-4-11.js @@ -9,19 +9,22 @@ description: > was thrown by step 3 ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - throw new Test262Error(); - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + toString: function() { + throw new Test262Error(); + } + }; + }, + configurable: true +}); assert.throws(Test262Error, function() { - Array.prototype.some.call(obj, undefined); + Array.prototype.some.call(obj, undefined); }); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-4-12.js b/test/built-ins/Array/prototype/some/15.4.4.17-4-12.js index a7d7c1f707..156090da39 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-4-12.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-4-12.js @@ -7,8 +7,8 @@ es5id: 15.4.4.17-4-12 description: Array.prototype.some - 'callbackfn' is a function ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} assert([9, 11].some(callbackfn), '[9, 11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-4-15.js b/test/built-ins/Array/prototype/some/15.4.4.17-4-15.js index ef372ed699..c46be1588f 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-4-15.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-4-15.js @@ -9,26 +9,26 @@ description: > passing undefined for callbackfn ---*/ - var obj = { }; - var lengthAccessed = false; - var loopAccessed = false; +var obj = {}; +var lengthAccessed = false; +var loopAccessed = false; - Object.defineProperty(obj, "length", { - get: function () { - lengthAccessed = true; - return 20; - }, - configurable: true - }); - Object.defineProperty(obj, "0", { - get: function () { - loopAccessed = true; - return 10; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + lengthAccessed = true; + return 20; + }, + configurable: true +}); +Object.defineProperty(obj, "0", { + get: function() { + loopAccessed = true; + return 10; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.some.call(obj); + Array.prototype.some.call(obj); }); assert(lengthAccessed, 'lengthAccessed !== true'); assert.sameValue(loopAccessed, false, 'loopAccessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-4-2.js b/test/built-ins/Array/prototype/some/15.4.4.17-4-2.js index 8d200ecceb..260caee75c 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-4-2.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-4-2.js @@ -9,7 +9,7 @@ description: > unreferenced ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(ReferenceError, function() { - arr.some(foo); + arr.some(foo); }); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-4-3.js b/test/built-ins/Array/prototype/some/15.4.4.17-4-3.js index 79c8e45fdf..74b4e4acc7 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-4-3.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-4-3.js @@ -7,7 +7,7 @@ es5id: 15.4.4.17-4-3 description: Array.prototype.some throws TypeError if callbackfn is null ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.some(null); + arr.some(null); }); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-4-4.js b/test/built-ins/Array/prototype/some/15.4.4.17-4-4.js index 9530cb7816..ef357be267 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-4-4.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-4-4.js @@ -7,7 +7,7 @@ es5id: 15.4.4.17-4-4 description: Array.prototype.some throws TypeError if callbackfn is boolean ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.some(true); + arr.some(true); }); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-4-5.js b/test/built-ins/Array/prototype/some/15.4.4.17-4-5.js index ac6df1f87a..7a281a2295 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-4-5.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-4-5.js @@ -7,7 +7,7 @@ es5id: 15.4.4.17-4-5 description: Array.prototype.some throws TypeError if callbackfn is number ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.some(5); + arr.some(5); }); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-4-6.js b/test/built-ins/Array/prototype/some/15.4.4.17-4-6.js index 530cfb4e1b..7339b3cc4f 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-4-6.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-4-6.js @@ -7,7 +7,7 @@ es5id: 15.4.4.17-4-6 description: Array.prototype.some throws TypeError if callbackfn is string ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.some("abc"); + arr.some("abc"); }); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-4-7.js b/test/built-ins/Array/prototype/some/15.4.4.17-4-7.js index be4508eeb6..06105fd1eb 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-4-7.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-4-7.js @@ -9,7 +9,7 @@ description: > without a Call internal method ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.some(new Object()); + arr.some(new Object()); }); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-4-8.js b/test/built-ins/Array/prototype/some/15.4.4.17-4-8.js index ea4f929348..4735534bd5 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-4-8.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-4-8.js @@ -9,18 +9,21 @@ description: > when an exception occurs ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - var accessed = false; +var accessed = false; - Object.defineProperty(obj, "length", { - get: function () { - accessed = true; - return 2; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + accessed = true; + return 2; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.some.call(obj, null); + Array.prototype.some.call(obj, null); }); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-4-9.js b/test/built-ins/Array/prototype/some/15.4.4.17-4-9.js index ba37bfec5d..7e77733591 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-4-9.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-4-9.js @@ -9,22 +9,25 @@ description: > when an exception occurs ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - var accessed = false; +var accessed = false; - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - accessed = true; - return "2"; - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + toString: function() { + accessed = true; + return "2"; + } + }; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.some.call(obj, null); + Array.prototype.some.call(obj, null); }); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-1-s.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-1-s.js index 737db1039b..f94bc04c65 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-1-s.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-1-s.js @@ -8,14 +8,14 @@ description: Array.prototype.some - thisArg not passed to strict callbackfn flags: [noStrict] ---*/ - var innerThisCorrect = false; +var innerThisCorrect = false; - function callbackfn(val, idx, obj) { - "use strict"; - innerThisCorrect = this===undefined; - return true; - } +function callbackfn(val, idx, obj) { + "use strict"; + innerThisCorrect = this === undefined; + return true; +} - [1].some(callbackfn); +[1].some(callbackfn); assert(innerThisCorrect, 'innerThisCorrect !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-1.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-1.js index bbbac58dbf..9effb1bb12 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-1.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-1.js @@ -9,13 +9,13 @@ flags: [noStrict] ---*/ (function() { - this._15_4_4_17_5_1 = false; - var _15_4_4_17_5_1 = true; + this._15_4_4_17_5_1 = false; + var _15_4_4_17_5_1 = true; - function callbackfn(val, idx, obj) { - return this._15_4_4_17_5_1; - } - var arr = [1]; + function callbackfn(val, idx, obj) { + return this._15_4_4_17_5_1; + } + var arr = [1]; -assert.sameValue(arr.some(callbackfn), false, 'arr.some(callbackfn)'); + assert.sameValue(arr.some(callbackfn), false, 'arr.some(callbackfn)'); })(); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-10.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-10.js index b30a41be92..7b9f0b960e 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-10.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-10.js @@ -7,10 +7,10 @@ es5id: 15.4.4.17-5-10 description: Array.prototype.some - Array Object can be used as thisArg ---*/ - var objArray = []; +var objArray = []; - function callbackfn(val, idx, obj) { - return this === objArray; - } +function callbackfn(val, idx, obj) { + return this === objArray; +} assert([11].some(callbackfn, objArray), '[11].some(callbackfn, objArray) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-11.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-11.js index 03e69a4aeb..19c1305d52 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-11.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-11.js @@ -7,10 +7,10 @@ es5id: 15.4.4.17-5-11 description: Array.prototype.some - String object can be used as thisArg ---*/ - var objString = new String(); +var objString = new String(); - function callbackfn(val, idx, obj) { - return this === objString; - } +function callbackfn(val, idx, obj) { + return this === objString; +} assert([11].some(callbackfn, objString), '[11].some(callbackfn, objString) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-12.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-12.js index 79f3e73ee5..7f908ab7f1 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-12.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-12.js @@ -7,10 +7,10 @@ es5id: 15.4.4.17-5-12 description: Array.prototype.some - Boolean object can be used as thisArg ---*/ - var objBoolean = new Boolean(); +var objBoolean = new Boolean(); - function callbackfn(val, idx, obj) { - return this === objBoolean; - } +function callbackfn(val, idx, obj) { + return this === objBoolean; +} assert([11].some(callbackfn, objBoolean), '[11].some(callbackfn, objBoolean) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-13.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-13.js index ec80e4d63f..d5d94de657 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-13.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-13.js @@ -7,10 +7,10 @@ es5id: 15.4.4.17-5-13 description: Array.prototype.some - Number object can be used as thisArg ---*/ - var objNumber = new Number(); +var objNumber = new Number(); - function callbackfn(val, idx, obj) { - return this === objNumber; - } +function callbackfn(val, idx, obj) { + return this === objNumber; +} assert([11].some(callbackfn, objNumber), '[11].some(callbackfn, objNumber) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-14.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-14.js index 41ce9be978..93e4deb575 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-14.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-14.js @@ -7,8 +7,8 @@ es5id: 15.4.4.17-5-14 description: Array.prototype.some - the Math object can be used as thisArg ---*/ - function callbackfn(val, idx, obj) { - return this === Math; - } +function callbackfn(val, idx, obj) { + return this === Math; +} assert([11].some(callbackfn, Math), '[11].some(callbackfn, Math) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-15.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-15.js index 9bca4cb95e..1456812266 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-15.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-15.js @@ -7,10 +7,10 @@ es5id: 15.4.4.17-5-15 description: Array.prototype.some - Date object can be used as thisArg ---*/ - var objDate = new Date(); +var objDate = new Date(); - function callbackfn(val, idx, obj) { - return this === objDate; - } +function callbackfn(val, idx, obj) { + return this === objDate; +} assert([11].some(callbackfn, objDate), '[11].some(callbackfn, objDate) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-16.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-16.js index 122b6abf64..e9a56f636b 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-16.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-16.js @@ -7,10 +7,10 @@ es5id: 15.4.4.17-5-16 description: Array.prototype.some - RegExp object can be used as thisArg ---*/ - var objRegExp = new RegExp(); +var objRegExp = new RegExp(); - function callbackfn(val, idx, obj) { - return this === objRegExp; - } +function callbackfn(val, idx, obj) { + return this === objRegExp; +} assert([11].some(callbackfn, objRegExp), '[11].some(callbackfn, objRegExp) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-17.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-17.js index 344f84d9ec..27ec167f4c 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-17.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-17.js @@ -7,8 +7,8 @@ es5id: 15.4.4.17-5-17 description: Array.prototype.some - the JSON object can be used as thisArg ---*/ - function callbackfn(val, idx, obj) { - return this === JSON; - } +function callbackfn(val, idx, obj) { + return this === JSON; +} assert([11].some(callbackfn, JSON), '[11].some(callbackfn, JSON) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-18.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-18.js index 5d6a3dccde..338b3c0dd4 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-18.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-18.js @@ -7,10 +7,10 @@ es5id: 15.4.4.17-5-18 description: Array.prototype.some - Error object can be used as thisArg ---*/ - var objError = new RangeError(); +var objError = new RangeError(); - function callbackfn(val, idx, obj) { - return this === objError; - } +function callbackfn(val, idx, obj) { + return this === objError; +} assert([11].some(callbackfn, objError), '[11].some(callbackfn, objError) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-19.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-19.js index 6e702f470c..03815a02d2 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-19.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-19.js @@ -7,14 +7,14 @@ es5id: 15.4.4.17-5-19 description: Array.prototype.some - the Arguments object can be used as thisArg ---*/ - var arg; +var arg; - function callbackfn(val, idx, obj) { - return this === arg; - } +function callbackfn(val, idx, obj) { + return this === arg; +} - (function fun() { - arg = arguments; - }(1, 2, 3)); +(function fun() { + arg = arguments; +}(1, 2, 3)); assert([11].some(callbackfn, arg), '[11].some(callbackfn, arg) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-2.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-2.js index 76776201d4..e0142b343a 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-2.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-2.js @@ -7,14 +7,15 @@ es5id: 15.4.4.17-5-2 description: Array.prototype.some - thisArg is Object ---*/ - var res = false; - var o = new Object(); - o.res = true; - function callbackfn(val, idx, obj) - { - return this.res; - } +var res = false; +var o = new Object(); +o.res = true; - var arr = [1]; +function callbackfn(val, idx, obj) +{ + return this.res; +} + +var arr = [1]; assert.sameValue(arr.some(callbackfn, o), true, 'arr.some(callbackfn, o)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-21.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-21.js index 974c7f0e8d..e80fe9b22e 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-21.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-21.js @@ -8,8 +8,9 @@ description: Array.prototype.some - the global object can be used as thisArg ---*/ var global = this; - function callbackfn(val, idx, obj) { - return this === global; - } + +function callbackfn(val, idx, obj) { + return this === global; +} assert([11].some(callbackfn, this), '[11].some(callbackfn, global) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-22.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-22.js index e61e97a4ae..4480983121 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-22.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-22.js @@ -7,8 +7,8 @@ es5id: 15.4.4.17-5-22 description: Array.prototype.some - boolean primitive can be used as thisArg ---*/ - function callbackfn(val, idx, obj) { - return this.valueOf() === false; - } +function callbackfn(val, idx, obj) { + return this.valueOf() === false; +} assert([11].some(callbackfn, false), '[11].some(callbackfn, false) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-23.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-23.js index 3ded5ff259..a5f030fafe 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-23.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-23.js @@ -7,8 +7,8 @@ es5id: 15.4.4.17-5-23 description: Array.prototype.some - number primitive can be used as thisArg ---*/ - function callbackfn(val, idx, obj) { - return this.valueOf() === 101; - } +function callbackfn(val, idx, obj) { + return this.valueOf() === 101; +} assert([11].some(callbackfn, 101), '[11].some(callbackfn, 101) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-24.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-24.js index 5daa055f11..a1d268d09b 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-24.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-24.js @@ -7,8 +7,8 @@ es5id: 15.4.4.17-5-24 description: Array.prototype.some - string primitive can be used as thisArg ---*/ - function callbackfn(val, idx, obj) { - return this.valueOf() === "abc"; - } +function callbackfn(val, idx, obj) { + return this.valueOf() === "abc"; +} assert([11].some(callbackfn, "abc"), '[11].some(callbackfn, "abc") !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-25.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-25.js index a20dcd8ad5..2c7c60a5a4 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-25.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-25.js @@ -8,15 +8,15 @@ description: Array.prototype.some - thisArg not passed flags: [noStrict] ---*/ - function innerObj() { - this._15_4_4_17_5_25 = true; - var _15_4_4_17_5_25 = false; +function innerObj() { + this._15_4_4_17_5_25 = true; + var _15_4_4_17_5_25 = false; - function callbackfn(val, idx, obj) { - return this._15_4_4_17_5_25; - } - var arr = [1]; - this.retVal = !arr.some(callbackfn); - } + function callbackfn(val, idx, obj) { + return this._15_4_4_17_5_25; + } + var arr = [1]; + this.retVal = !arr.some(callbackfn); +} assert(new innerObj().retVal, 'new innerObj().retVal !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-3.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-3.js index 69a2180ccc..6e5d2f245e 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-3.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-3.js @@ -7,14 +7,15 @@ es5id: 15.4.4.17-5-3 description: Array.prototype.some - thisArg is Array ---*/ - var res = false; - var a = new Array(); - a.res = true; - function callbackfn(val, idx, obj) - { - return this.res; - } +var res = false; +var a = new Array(); +a.res = true; - var arr = [1]; +function callbackfn(val, idx, obj) +{ + return this.res; +} + +var arr = [1]; assert.sameValue(arr.some(callbackfn, a), true, 'arr.some(callbackfn, a)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-4.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-4.js index 95351bc9ab..32e813992a 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-4.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-4.js @@ -9,15 +9,16 @@ description: > template(prototype) ---*/ - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } +var res = false; - function foo(){} - foo.prototype.res = true; - var f = new foo(); - var arr = [1]; +function callbackfn(val, idx, obj) +{ + return this.res; +} -assert.sameValue(arr.some(callbackfn,f), true, 'arr.some(callbackfn,f)'); +function foo() {} +foo.prototype.res = true; +var f = new foo(); +var arr = [1]; + +assert.sameValue(arr.some(callbackfn, f), true, 'arr.some(callbackfn,f)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-5.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-5.js index 3831816431..6b946e865a 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-5.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-5.js @@ -7,15 +7,16 @@ es5id: 15.4.4.17-5-5 description: Array.prototype.some - thisArg is object from object template ---*/ - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } +var res = false; - function foo(){} - var f = new foo(); - f.res = true; - var arr = [1]; +function callbackfn(val, idx, obj) +{ + return this.res; +} -assert.sameValue(arr.some(callbackfn,f), true, 'arr.some(callbackfn,f)'); +function foo() {} +var f = new foo(); +f.res = true; +var arr = [1]; + +assert.sameValue(arr.some(callbackfn, f), true, 'arr.some(callbackfn,f)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-6.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-6.js index f7213225c0..e0d0749176 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-6.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-6.js @@ -7,14 +7,15 @@ es5id: 15.4.4.17-5-6 description: Array.prototype.some - thisArg is function ---*/ - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } +var res = false; - function foo(){} - foo.res = true; - var arr = [1]; +function callbackfn(val, idx, obj) +{ + return this.res; +} -assert.sameValue(arr.some(callbackfn,foo), true, 'arr.some(callbackfn,foo)'); +function foo() {} +foo.res = true; +var arr = [1]; + +assert.sameValue(arr.some(callbackfn, foo), true, 'arr.some(callbackfn,foo)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-7.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-7.js index f4198a8b06..ae6c1fd3d6 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-7.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-7.js @@ -7,8 +7,8 @@ es5id: 15.4.4.17-5-7 description: Array.prototype.some - built-in functions can be used as thisArg ---*/ - function callbackfn(val, idx, obj) { - return this === eval; - } +function callbackfn(val, idx, obj) { + return this === eval; +} assert([11].some(callbackfn, eval), '[11].some(callbackfn, eval) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-9.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-9.js index 501906bf9a..155ab3fd2a 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-9.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-9.js @@ -7,10 +7,10 @@ es5id: 15.4.4.17-5-9 description: Array.prototype.some - Function Object can be used as thisArg ---*/ - var objFunction = function () { }; +var objFunction = function() {}; - function callbackfn(val, idx, obj) { - return this === objFunction; - } +function callbackfn(val, idx, obj) { + return this === objFunction; +} assert([11].some(callbackfn, objFunction), '[11].some(callbackfn, objFunction) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-1.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-1.js index 5935681cbc..081c7a7889 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-1.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-1.js @@ -9,19 +9,19 @@ description: > it is called ---*/ - var calledForThree = false; +var calledForThree = false; - function callbackfn(val, idx, obj) - { - arr[2] = 3; - if(val !== 3) - calledForThree = true; +function callbackfn(val, idx, obj) +{ + arr[2] = 3; + if (val !== 3) + calledForThree = true; - return false; - } + return false; +} - var arr = [1,2,,4,5]; +var arr = [1, 2, , 4, 5]; - var val = arr.some(callbackfn); +var val = arr.some(callbackfn); assert(calledForThree, 'calledForThree !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-2.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-2.js index 8429933e08..117aeb7386 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-2.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-2.js @@ -9,16 +9,16 @@ description: > after it is called ---*/ - function callbackfn(val, idx, obj) - { - arr[4] = 6; - if(val < 6) - return false; - else - return true; - } +function callbackfn(val, idx, obj) +{ + arr[4] = 6; + if (val < 6) + return false; + else + return true; +} - var arr = [1,2,3,4,5]; +var arr = [1, 2, 3, 4, 5]; assert.sameValue(arr.some(callbackfn), true, 'arr.some(callbackfn)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-3.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-3.js index d27cbb211c..8b193f9333 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-3.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-3.js @@ -9,16 +9,16 @@ description: > it is called ---*/ - function callbackfn(val, idx, obj) - { - delete arr[2]; - if(val !== 3) - return false; - else - return true; - } +function callbackfn(val, idx, obj) +{ + delete arr[2]; + if (val !== 3) + return false; + else + return true; +} - var arr = [1,2,3,4,5]; +var arr = [1, 2, 3, 4, 5]; assert.sameValue(arr.some(callbackfn), false, 'arr.some(callbackfn)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-4.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-4.js index 5b060256f5..7d683efcf8 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-4.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-4.js @@ -9,16 +9,16 @@ description: > Array.length is decreased ---*/ - function callbackfn(val, idx, obj) - { - arr.length = 3; - if(val < 4) - return false; - else - return true; - } +function callbackfn(val, idx, obj) +{ + arr.length = 3; + if (val < 4) + return false; + else + return true; +} - var arr = [1,2,3,4,6]; +var arr = [1, 2, 3, 4, 6]; assert.sameValue(arr.some(callbackfn), false, 'arr.some(callbackfn)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-5.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-5.js index 89a9a1770e..19fbb07fc5 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-5.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-5.js @@ -9,18 +9,18 @@ description: > sparse array ---*/ - function callbackfn(val, idx, obj) - { - arr[1000] = 5; - if(val < 5) - return false; - else - return true; - } +function callbackfn(val, idx, obj) +{ + arr[1000] = 5; + if (val < 5) + return false; + else + return true; +} - var arr = new Array(10); - arr[1] = 1; - arr[2] = 2; +var arr = new Array(10); +arr[1] = 1; +arr[2] = 2; assert.sameValue(arr.some(callbackfn), false, 'arr.some(callbackfn)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-6.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-6.js index e8da5fae68..a5f38a483b 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-6.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-6.js @@ -9,20 +9,20 @@ description: > call when same index is also present in prototype ---*/ - function callbackfn(val, idx, obj) - { - delete arr[4]; - if(val < 5) - return false; - else - return true; - } +function callbackfn(val, idx, obj) +{ + delete arr[4]; + if (val < 5) + return false; + else + return true; +} - Array.prototype[4] = 5; - var arr = [1,2,3,4,5]; +Array.prototype[4] = 5; +var arr = [1, 2, 3, 4, 5]; - var res = arr.some(callbackfn) ; - delete Array.prototype[4]; +var res = arr.some(callbackfn); +delete Array.prototype[4]; assert.sameValue(res, true, 'res'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-8.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-8.js index e257955c9c..2712e0c85b 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-8.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-8.js @@ -7,14 +7,18 @@ es5id: 15.4.4.17-7-8 description: Array.prototype.some - no observable effects occur if length is 0 ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var obj = { 0: 11, 1: 12, length: 0 }; +var obj = { + 0: 11, + 1: 12, + length: 0 +}; assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-9.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-9.js index 312351df04..d07c519b08 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-9.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-9.js @@ -9,22 +9,26 @@ description: > of iterations ---*/ - var called = 0; +var called = 0; - function callbackfn(val, idx, obj) { - called++; - return val > 10; - } +function callbackfn(val, idx, obj) { + called++; + return val > 10; +} - var obj = { 0: 9, 2: 12, length: 3 }; +var obj = { + 0: 9, + 2: 12, + length: 3 +}; - Object.defineProperty(obj, "1", { - get: function () { - obj.length = 2; - return 8; - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + obj.length = 2; + return 8; + }, + configurable: true +}); assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); assert.sameValue(called, 3, 'called'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-1.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-1.js index 997bac9825..b6b52b0996 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-1.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-1.js @@ -9,15 +9,16 @@ description: > been assigned values ---*/ - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - return false; - } +var callCnt = 0; - var arr = new Array(10); - arr[1] = undefined; - arr.some(callbackfn); +function callbackfn(val, idx, obj) +{ + callCnt++; + return false; +} + +var arr = new Array(10); +arr[1] = undefined; +arr.some(callbackfn); assert.sameValue(callCnt, 1, 'callCnt'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-10.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-10.js index acddf79b86..008b55632c 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-10.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-10.js @@ -9,22 +9,26 @@ description: > prototype index property not to be visited on an Array-like Object ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx === 1; - } - var arr = { 2: 2, length: 20 }; +var accessed = false; - Object.defineProperty(arr, "0", { - get: function () { - delete Object.prototype[1]; - return 0; - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + accessed = true; + return idx === 1; +} +var arr = { + 2: 2, + length: 20 +}; - Object.prototype[1] = 1; +Object.defineProperty(arr, "0", { + get: function() { + delete Object.prototype[1]; + return 0; + }, + configurable: true +}); + +Object.prototype[1] = 1; assert.sameValue(Array.prototype.some.call(arr, callbackfn), false, 'Array.prototype.some.call(arr, callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-11.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-11.js index e7f1170a9e..3e457ac48e 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-11.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-11.js @@ -9,22 +9,23 @@ description: > prototype index property not to be visited on an Array ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx === 1; - } - var arr = [0, , 2]; +var accessed = false; - Object.defineProperty(arr, "0", { - get: function () { - delete Array.prototype[1]; - return 0; - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + accessed = true; + return idx === 1; +} +var arr = [0, , 2]; - Array.prototype[1] = 1; +Object.defineProperty(arr, "0", { + get: function() { + delete Array.prototype[1]; + return 0; + }, + configurable: true +}); + +Array.prototype[1] = 1; assert.sameValue(arr.some(callbackfn), false, 'arr.some(callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-12.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-12.js index e575c9fd6d..2eeb1e90c1 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-12.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-12.js @@ -10,23 +10,28 @@ description: > Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - return true; - } else { - return false; - } - } - var arr = { 0: 0, 1: 111, 2: 2, length: 10 }; +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + return true; + } else { + return false; + } +} +var arr = { + 0: 0, + 1: 111, + 2: 2, + length: 10 +}; - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); - Object.prototype[1] = 1; +Object.prototype[1] = 1; assert(Array.prototype.some.call(arr, callbackfn), 'Array.prototype.some.call(arr, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-13.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-13.js index 4f1afb3af3..c15b1fade7 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-13.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-13.js @@ -9,23 +9,23 @@ description: > property causes prototype index property to be visited on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - return true; - } else { - return false; - } - } - var arr = [0, 111, 2]; +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + return true; + } else { + return false; + } +} +var arr = [0, 111, 2]; - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); - Array.prototype[1] = 1; +Array.prototype[1] = 1; assert(arr.some(callbackfn), 'arr.some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-14.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-14.js index db0bf87e45..ebcb32a565 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-14.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-14.js @@ -9,20 +9,21 @@ description: > property not to be visited ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx === 3; - } - var arr = [0, 1, 2, "last"]; +var accessed = false; - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 3; - return 0; - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + accessed = true; + return idx === 3; +} +var arr = [0, 1, 2, "last"]; + +Object.defineProperty(arr, "0", { + get: function() { + arr.length = 3; + return 0; + }, + configurable: true +}); assert.sameValue(arr.some(callbackfn), false, 'arr.some(callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-15.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-15.js index 7c46475047..69f8f9a6c0 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-15.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-15.js @@ -9,28 +9,28 @@ description: > property causes prototype index property to be visited ---*/ - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "prototype") { - return true; - } else { - return false; - } - } - var arr = [0, 1, 2]; +function callbackfn(val, idx, obj) { + if (idx === 2 && val === "prototype") { + return true; + } else { + return false; + } +} +var arr = [0, 1, 2]; - Object.defineProperty(Array.prototype, "2", { - get: function () { - return "prototype"; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "2", { + get: function() { + return "prototype"; + }, + configurable: true +}); - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + arr.length = 2; + return 1; + }, + configurable: true +}); assert(arr.some(callbackfn), 'arr.some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-16.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-16.js index 21fb924b08..86c3b3c000 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-16.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-16.js @@ -10,29 +10,29 @@ description: > flags: [noStrict] ---*/ - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "unconfigurable") { - return true; - } else { - return false; - } - } +function callbackfn(val, idx, obj) { + if (idx === 2 && val === "unconfigurable") { + return true; + } else { + return false; + } +} - var arr = [0, 1, 2]; +var arr = [0, 1, 2]; - Object.defineProperty(arr, "2", { - get: function () { - return "unconfigurable"; - }, - configurable: false - }); +Object.defineProperty(arr, "2", { + get: function() { + return "unconfigurable"; + }, + configurable: false +}); - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + arr.length = 2; + return 1; + }, + configurable: true +}); assert(arr.some(callbackfn), 'arr.some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-2.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-2.js index e1dedd4116..abf9b78b98 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-2.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-2.js @@ -7,22 +7,22 @@ es5id: 15.4.4.17-7-b-2 description: Array.prototype.some - added properties in step 2 are visible here ---*/ - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "length") { - return true; - } else { - return false; - } - } +function callbackfn(val, idx, obj) { + if (idx === 2 && val === "length") { + return true; + } else { + return false; + } +} - var arr = { }; +var arr = {}; - Object.defineProperty(arr, "length", { - get: function () { - arr[2] = "length"; - return 3; - }, - configurable: true - }); +Object.defineProperty(arr, "length", { + get: function() { + arr[2] = "length"; + return 3; + }, + configurable: true +}); assert(Array.prototype.some.call(arr, callbackfn), 'Array.prototype.some.call(arr, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-3.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-3.js index fa54b0595c..2193d2469b 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-3.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-3.js @@ -9,20 +9,24 @@ description: > here ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx === 2; - } - var arr = { 2: 6.99, 8: 19}; +var accessed = false; - Object.defineProperty(arr, "length", { - get: function () { - delete arr[2]; - return 10; - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + accessed = true; + return idx === 2; +} +var arr = { + 2: 6.99, + 8: 19 +}; + +Object.defineProperty(arr, "length", { + get: function() { + delete arr[2]; + return 10; + }, + configurable: true +}); assert.sameValue(Array.prototype.some.call(arr, callbackfn), false, 'Array.prototype.some.call(arr, callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-4.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-4.js index 2f3a8122dd..8b02ca3362 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-4.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-4.js @@ -9,27 +9,29 @@ description: > current position are visited on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - return true; - } else { - return false; - } - } +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + return true; + } else { + return false; + } +} - var arr = { length: 2 }; +var arr = { + length: 2 +}; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(arr, "1", { + get: function() { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); assert(Array.prototype.some.call(arr, callbackfn), 'Array.prototype.some.call(arr, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-5.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-5.js index c808200a94..ab0a8e637e 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-5.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-5.js @@ -9,27 +9,27 @@ description: > current position are visited on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - return true; - } else { - return false; - } - } +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + return true; + } else { + return false; + } +} - var arr = [0, , 2]; +var arr = [0, , 2]; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(arr, "1", { + get: function() { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); assert(arr.some(callbackfn), 'arr.some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-6.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-6.js index b57354dc52..804282bc15 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-6.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-6.js @@ -9,26 +9,28 @@ description: > current position are visited on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 6.99) { - return true; - } else { - return false; - } - } - var arr = { length: 2 }; +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 6.99) { + return true; + } else { + return false; + } +} +var arr = { + length: 2 +}; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(Object.prototype, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); assert(Array.prototype.some.call(arr, callbackfn), 'Array.prototype.some.call(arr, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-7.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-7.js index 5dd76771be..921e832ae0 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-7.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-7.js @@ -9,26 +9,26 @@ description: > current position are visited on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 6.99) { - return true; - } else { - return false; - } - } - var arr = [0, , 2]; +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 6.99) { + return true; + } else { + return false; + } +} +var arr = [0, , 2]; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(Array.prototype, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); assert(arr.some(callbackfn), 'arr.some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-8.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-8.js index b99ca81540..0ec7f33936 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-8.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-8.js @@ -9,27 +9,30 @@ description: > not to be visited on an Array-like object ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx === 1; - } - var arr = { length: 2 }; +var accessed = false; - Object.defineProperty(arr, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + accessed = true; + return idx === 1; +} +var arr = { + length: 2 +}; - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + return 6.99; + }, + configurable: true +}); + +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); assert.sameValue(Array.prototype.some.call(arr, callbackfn), false, 'Array.prototype.some.call(arr, callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-9.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-9.js index 389a129ad5..42272384d6 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-9.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-9.js @@ -9,27 +9,28 @@ description: > not to be visited on an Array ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx === 1; - } - var arr = [1, 2]; +var accessed = false; - Object.defineProperty(arr, "1", { - get: function () { - return "6.99"; - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + accessed = true; + return idx === 1; +} +var arr = [1, 2]; - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + return "6.99"; + }, + configurable: true +}); + +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); assert.sameValue(arr.some(callbackfn), false, 'arr.some(callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-1.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-1.js index 7d22a36d5f..4f4115e587 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-1.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-1.js @@ -9,15 +9,18 @@ description: > property on an Array-like object ---*/ - var kValue = {}; +var kValue = {}; - function callbackfn(val, idx, obj) { - if (idx === 5) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 5) { + return val === kValue; + } + return false; +} - var obj = { 5: kValue, length: 100 }; +var obj = { + 5: kValue, + length: 100 +}; assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-10.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-10.js index 32488b4883..85226cf16c 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-10.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-10.js @@ -9,22 +9,22 @@ description: > property on an Array ---*/ - var kValue = "abc"; +var kValue = "abc"; - function callbackfn(val, idx, obj) { - if (idx === 10) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 10) { + return val === kValue; + } + return false; +} - var arr = []; +var arr = []; - Object.defineProperty(arr, "10", { - get: function () { - return kValue; - }, - configurable: true - }); +Object.defineProperty(arr, "10", { + get: function() { + return kValue; + }, + configurable: true +}); assert(arr.some(callbackfn), 'arr.some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-11.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-11.js index bbd62f9dcb..f0c2c4a150 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-11.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-11.js @@ -10,28 +10,30 @@ description: > Array-like object ---*/ - var kValue = "abc"; +var kValue = "abc"; - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + return val === kValue; + } + return false; +} - var proto = { 1: 6 }; +var proto = { + 1: 6 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 10; +var child = new Con(); +child.length = 10; - Object.defineProperty(child, "1", { - get: function () { - return kValue; - }, - configurable: true - }); +Object.defineProperty(child, "1", { + get: function() { + return kValue; + }, + configurable: true +}); assert(Array.prototype.some.call(child, callbackfn), 'Array.prototype.some.call(child, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-12.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-12.js index 94c83d5545..753d317a6d 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-12.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-12.js @@ -9,23 +9,23 @@ description: > property that overrides an inherited data property on an Array ---*/ - var kValue = "abc"; +var kValue = "abc"; - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + return val === kValue; + } + return false; +} - var arr = []; +var arr = []; - Array.prototype[1] = 100; - Object.defineProperty(arr, "1", { - get: function () { - return kValue; - }, - configurable: true - }); +Array.prototype[1] = 100; +Object.defineProperty(arr, "1", { + get: function() { + return kValue; + }, + configurable: true +}); assert(arr.some(callbackfn), 'arr.some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-13.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-13.js index 329d300014..e358b560c7 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-13.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-13.js @@ -10,36 +10,36 @@ description: > Array-like object ---*/ - var kValue = "abc"; +var kValue = "abc"; - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + return val === kValue; + } + return false; +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "1", { - get: function () { - return 5; - }, - configurable: true - }); +Object.defineProperty(proto, "1", { + get: function() { + return 5; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 10; +var child = new Con(); +child.length = 10; - Object.defineProperty(child, "1", { - get: function () { - return kValue; - }, - configurable: true - }); +Object.defineProperty(child, "1", { + get: function() { + return kValue; + }, + configurable: true +}); assert(Array.prototype.some.call(child, callbackfn), 'Array.prototype.some.call(child, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-14.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-14.js index b96e60a535..bdb2d85ab3 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-14.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-14.js @@ -9,28 +9,28 @@ description: > property that overrides an inherited accessor property on an Array ---*/ - var kValue = "abc"; +var kValue = "abc"; - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + return val === kValue; + } + return false; +} - var arr = []; - Object.defineProperty(arr, "1", { - get: function () { - return kValue; - }, - configurable: true - }); +var arr = []; +Object.defineProperty(arr, "1", { + get: function() { + return kValue; + }, + configurable: true +}); - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 10; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "1", { + get: function() { + return 10; + }, + configurable: true +}); assert(arr.some(callbackfn), 'arr.some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-15.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-15.js index 7f862aaad3..f357611b9b 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-15.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-15.js @@ -9,28 +9,28 @@ description: > accessor property on an Array-like object ---*/ - var kValue = "abc"; +var kValue = "abc"; - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + return val === kValue; + } + return false; +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "1", { - get: function () { - return kValue; - }, - configurable: true - }); +Object.defineProperty(proto, "1", { + get: function() { + return kValue; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 20; +var child = new Con(); +child.length = 20; assert(Array.prototype.some.call(child, callbackfn), 'Array.prototype.some.call(child, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-16.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-16.js index ee3cf2adb0..f610a757ff 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-16.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-16.js @@ -9,20 +9,20 @@ description: > accessor property on an Array ---*/ - var kValue = "abc"; +var kValue = "abc"; - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + return val === kValue; + } + return false; +} - Object.defineProperty(Array.prototype, "1", { - get: function () { - return kValue; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "1", { + get: function() { + return kValue; + }, + configurable: true +}); assert([, , ].some(callbackfn), '[, , ].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-17.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-17.js index b4113bdbcd..f3206fd63b 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-17.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-17.js @@ -9,17 +9,19 @@ description: > property without a get function on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1) { - return typeof val === "undefined"; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + return typeof val === "undefined"; + } + return false; +} - var obj = { length: 2 }; - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); +var obj = { + length: 2 +}; +Object.defineProperty(obj, "1", { + set: function() {}, + configurable: true +}); assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-18.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-18.js index 41742e9815..55f64f688a 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-18.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-18.js @@ -9,18 +9,18 @@ description: > property without a get function on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return typeof val === "undefined"; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return typeof val === "undefined"; + } + return false; +} - var arr = []; +var arr = []; - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(arr, "0", { + set: function() {}, + configurable: true +}); assert(arr.some(callbackfn), 'arr.some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-19.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-19.js index 7d45a55238..859dc40228 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-19.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-19.js @@ -10,19 +10,21 @@ description: > accessor property on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1) { - return typeof val === "undefined"; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + return typeof val === "undefined"; + } + return false; +} - var obj = { length: 2 }; - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); +var obj = { + length: 2 +}; +Object.defineProperty(obj, "1", { + set: function() {}, + configurable: true +}); - Object.prototype[1] = 10; +Object.prototype[1] = 10; assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-2.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-2.js index cd3c2ced72..543d15db45 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-2.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-2.js @@ -9,13 +9,13 @@ description: > property on an Array ---*/ - var kValue = {}; +var kValue = {}; - function callbackfn(val, idx, obj) { - if (idx === 0) { - return kValue === val; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return kValue === val; + } + return false; +} assert([kValue].some(callbackfn), '[kValue].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-20.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-20.js index 320cb9899c..d39314005b 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-20.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-20.js @@ -10,20 +10,20 @@ description: > accessor property on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return typeof val === "undefined"; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return typeof val === "undefined"; + } + return false; +} - var arr = []; +var arr = []; - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(arr, "0", { + set: function() {}, + configurable: true +}); - Array.prototype[0] = 100; +Array.prototype[0] = 100; assert(arr.some(callbackfn), 'arr.some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-21.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-21.js index 18fc2abe15..3365018fc6 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-21.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-21.js @@ -9,23 +9,23 @@ description: > accessor property without a get function on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1) { - return typeof val === "undefined"; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + return typeof val === "undefined"; + } + return false; +} - var proto = {}; - Object.defineProperty(proto, "1", { - set: function () { }, - configurable: true - }); +var proto = {}; +Object.defineProperty(proto, "1", { + set: function() {}, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 2; +var child = new Con(); +child.length = 2; assert(Array.prototype.some.call(child, callbackfn), 'Array.prototype.some.call(child, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-22.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-22.js index a6086840bc..5635c65aaa 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-22.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-22.js @@ -9,16 +9,16 @@ description: > accessor property without a get function on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return typeof val === "undefined"; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return typeof val === "undefined"; + } + return false; +} - Object.defineProperty(Array.prototype, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + set: function() {}, + configurable: true +}); assert([, ].some(callbackfn), '[, ].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-25.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-25.js index 87a76dd0be..fe7a12aad8 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-25.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-25.js @@ -10,15 +10,15 @@ description: > less than number of parameters) ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 11; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 11; + } + return false; +} - var func = function (a, b) { - return Array.prototype.some.call(arguments, callbackfn); - }; +var func = function(a, b) { + return Array.prototype.some.call(arguments, callbackfn); +}; assert(func(11), 'func(11) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-26.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-26.js index 626c4fec94..8a0dd4b0ff 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-26.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-26.js @@ -10,24 +10,24 @@ description: > number of parameters) ---*/ - var firstResult = false; - var secondResult = false; +var firstResult = false; +var secondResult = false; - function callbackfn(val, idx, obj) { - if (idx === 0) { - firstResult = (val === 11); - return false; - } else if (idx === 1) { - secondResult = (val === 9); - return false; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + firstResult = (val === 11); + return false; + } else if (idx === 1) { + secondResult = (val === 9); + return false; + } else { + return true; + } +} - var func = function (a, b) { - return Array.prototype.some.call(arguments, callbackfn); - }; +var func = function(a, b) { + return Array.prototype.some.call(arguments, callbackfn); +}; assert.sameValue(func(11, 9), false, 'func(11, 9)'); assert(firstResult, 'firstResult !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-27.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-27.js index de0a66b251..f54a10f05b 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-27.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-27.js @@ -10,28 +10,28 @@ description: > greater than number of parameters) ---*/ - var firstResult = false; - var secondResult = false; - var thirdResult = false; +var firstResult = false; +var secondResult = false; +var thirdResult = false; - function callbackfn(val, idx, obj) { - if (idx === 0) { - firstResult = (val === 11); - return false; - } else if (idx === 1) { - secondResult = (val === 12); - return false; - } else if (idx === 2) { - thirdResult = (val === 9); - return false; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + firstResult = (val === 11); + return false; + } else if (idx === 1) { + secondResult = (val === 12); + return false; + } else if (idx === 2) { + thirdResult = (val === 9); + return false; + } else { + return true; + } +} - var func = function (a, b) { - return Array.prototype.some.call(arguments, callbackfn); - }; +var func = function(a, b) { + return Array.prototype.some.call(arguments, callbackfn); +}; assert.sameValue(func(11, 12, 9), false, 'func(11, 12, 9)'); assert(firstResult, 'firstResult !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-28.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-28.js index da8a40f1e5..8e423c6155 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-28.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-28.js @@ -9,32 +9,32 @@ description: > iterations is observed on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val === 12; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + return val === 12; + } + return false; +} - var arr = []; - var helpVerifyVar = 11; +var arr = []; +var helpVerifyVar = 11; - Object.defineProperty(arr, "1", { - get: function () { - return helpVerifyVar; - }, - set: function (args) { - helpVerifyVar = args; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + return helpVerifyVar; + }, + set: function(args) { + helpVerifyVar = args; + }, + configurable: true +}); - Object.defineProperty(arr, "0", { - get: function () { - arr[1] = 12; - return 9; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + arr[1] = 12; + return 9; + }, + configurable: true +}); assert(arr.some(callbackfn), 'arr.some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-29.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-29.js index 416660ba05..ac802b1128 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-29.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-29.js @@ -9,32 +9,34 @@ description: > iterations on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val === 12; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + return val === 12; + } + return false; +} - var obj = { length: 2 }; - var helpVerifyVar = 11; +var obj = { + length: 2 +}; +var helpVerifyVar = 11; - Object.defineProperty(obj, "1", { - get: function () { - return helpVerifyVar; - }, - set: function (args) { - helpVerifyVar = args; - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + return helpVerifyVar; + }, + set: function(args) { + helpVerifyVar = args; + }, + configurable: true +}); - Object.defineProperty(obj, "0", { - get: function () { - obj[1] = 12; - return 11; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + obj[1] = 12; + return 11; + }, + configurable: true +}); assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-3.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-3.js index e9b625ee73..0552315762 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-3.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-3.js @@ -10,22 +10,24 @@ description: > Array-like object ---*/ - var kValue = "abc"; +var kValue = "abc"; - function callbackfn(val, idx, obj) { - if (idx === 5) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 5) { + return val === kValue; + } + return false; +} - var proto = { 5: 100 }; +var proto = { + 5: 100 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[5] = kValue; - child.length = 10; +var child = new Con(); +child[5] = kValue; +child.length = 10; assert(Array.prototype.some.call(child, callbackfn), 'Array.prototype.some.call(child, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-30.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-30.js index 9803d35761..4ce67a0b6c 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-30.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-30.js @@ -9,22 +9,25 @@ description: > terminate iteration on an Array-like object ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - if (idx > 1) { - accessed = true; - } - return true; - } +var accessed = false; - var obj = { length: 20 }; - Object.defineProperty(obj, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + if (idx > 1) { + accessed = true; + } + return true; +} + +var obj = { + length: 20 +}; +Object.defineProperty(obj, "1", { + get: function() { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true +}); assert.throws(RangeError, function() { - Array.prototype.some.call(obj, callbackfn); + Array.prototype.some.call(obj, callbackfn); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-31.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-31.js index 5fe12afb7a..9d9cc00c1c 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-31.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-31.js @@ -9,23 +9,24 @@ description: > terminate iteration on an Array ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - if (idx > 0) { - accessed = true; - } - return true; - } +var accessed = false; - var arr = []; - arr[10] = 100; - Object.defineProperty(arr, "0", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + if (idx > 0) { + accessed = true; + } + return true; +} + +var arr = []; +arr[10] = 100; +Object.defineProperty(arr, "0", { + get: function() { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true +}); assert.throws(RangeError, function() { - arr.some(callbackfn); + arr.some(callbackfn); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-4.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-4.js index 8312a515b6..64dd495a9b 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-4.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-4.js @@ -9,15 +9,15 @@ description: > property that overrides an inherited data property on an Array ---*/ - var kValue = "abc"; +var kValue = "abc"; - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; +} - Array.prototype[0] = 11; +Array.prototype[0] = 11; assert([kValue].some(callbackfn), '[kValue].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-5.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-5.js index 5d2c92a761..d8fcfaf35a 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-5.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-5.js @@ -10,32 +10,32 @@ description: > Array-like object ---*/ - var kValue = 1000; +var kValue = 1000; - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "0", { - get: function () { - return 5; - }, - configurable: true - }); +Object.defineProperty(proto, "0", { + get: function() { + return 5; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 2; - Object.defineProperty(child, "0", { - value: kValue, - configurable: true - }); +var child = new Con(); +child.length = 2; +Object.defineProperty(child, "0", { + value: kValue, + configurable: true +}); assert(Array.prototype.some.call(child, callbackfn), 'Array.prototype.some.call(child, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-6.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-6.js index 19eece5654..ef5da14095 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-6.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-6.js @@ -9,20 +9,20 @@ description: > property that overrides an inherited accessor property on an Array ---*/ - var kValue = 1000; +var kValue = 1000; - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; +} - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 9; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return 9; + }, + configurable: true +}); assert([kValue].some(callbackfn), '[kValue].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-7.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-7.js index fe4c1e892d..f346f92524 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-7.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-7.js @@ -9,21 +9,23 @@ description: > property on an Array-like object ---*/ - var kValue = 'abc'; +var kValue = 'abc'; - function callbackfn(val, idx, obj) { - if (5 === idx) { - return kValue === val; - } - return false; - } +function callbackfn(val, idx, obj) { + if (5 === idx) { + return kValue === val; + } + return false; +} - var proto = { 5: kValue }; +var proto = { + 5: kValue +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 10; +var child = new Con(); +child.length = 10; assert(Array.prototype.some.call(child, callbackfn), 'Array.prototype.some.call(child, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-8.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-8.js index 7fdcc88161..fb71d4fc7e 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-8.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-8.js @@ -9,15 +9,15 @@ description: > property on an Array ---*/ - var kValue = {}; +var kValue = {}; - function callbackfn(val, idx, obj) { - if (0 === idx) { - return kValue === val; - } - return false; - } +function callbackfn(val, idx, obj) { + if (0 === idx) { + return kValue === val; + } + return false; +} - Array.prototype[0] = kValue; +Array.prototype[0] = kValue; assert([, ].some(callbackfn), '[, ].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-9.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-9.js index fe3819dddd..2081432745 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-9.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-9.js @@ -9,22 +9,24 @@ description: > property on an Array-like object ---*/ - var kValue = "abc"; +var kValue = "abc"; - function callbackfn(val, idx, obj) { - if (idx === 10) { - return val === kValue; - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx === 10) { + return val === kValue; + } + return false; +} - var obj = { length: 20 }; +var obj = { + length: 20 +}; - Object.defineProperty(obj, "10", { - get: function () { - return kValue; - }, - configurable: true - }); +Object.defineProperty(obj, "10", { + get: function() { + return kValue; + }, + configurable: true +}); assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-1.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-1.js index 5d83fff70b..c865faae21 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-1.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-1.js @@ -7,15 +7,15 @@ es5id: 15.4.4.17-7-c-ii-1 description: Array.prototype.some - callbackfn called with correct parameters ---*/ - function callbackfn(val, idx, obj) - { - if(obj[idx] === val) - return false; - else - return true; - } +function callbackfn(val, idx, obj) +{ + if (obj[idx] === val) + return false; + else + return true; +} - var arr = [0,1,2,3,4,5,6,7,8,9]; +var arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; assert.sameValue(arr.some(callbackfn), false, 'arr.some(callbackfn)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-10.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-10.js index b7bbd6e847..13301777ba 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-10.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-10.js @@ -7,8 +7,8 @@ es5id: 15.4.4.17-7-c-ii-10 description: Array.prototype.some - callbackfn is called with 1 formal parameter ---*/ - function callbackfn(val) { - return val > 10; - } +function callbackfn(val) { + return val > 10; +} assert([11, 12].some(callbackfn), '[11, 12].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-11.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-11.js index c67f164527..3bf00f445a 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-11.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-11.js @@ -7,8 +7,8 @@ es5id: 15.4.4.17-7-c-ii-11 description: Array.prototype.some - callbackfn is called with 2 formal parameter ---*/ - function callbackfn(val, idx) { - return val > 10 && arguments[2][idx] === val; - } +function callbackfn(val, idx) { + return val > 10 && arguments[2][idx] === val; +} assert([9, 12].some(callbackfn), '[9, 12].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-12.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-12.js index 9fcb899c65..a892afde59 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-12.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-12.js @@ -7,8 +7,8 @@ es5id: 15.4.4.17-7-c-ii-12 description: Array.prototype.some - callbackfn is called with 3 formal parameter ---*/ - function callbackfn(val, idx, obj) { - return val > 10 && obj[idx] === val; - } +function callbackfn(val, idx, obj) { + return val > 10 && obj[idx] === val; +} assert([9, 12].some(callbackfn), '[9, 12].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-13.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-13.js index 6d61b65b61..6917e26355 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-13.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-13.js @@ -9,8 +9,8 @@ description: > get parameter value ---*/ - function callbackfn() { - return arguments[2][arguments[1]] === arguments[0]; - } +function callbackfn() { + return arguments[2][arguments[1]] === arguments[0]; +} assert([9, 12].some(callbackfn), '[9, 12].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-16.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-16.js index c1f58e55a1..d6fb5d60bc 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-16.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-16.js @@ -9,10 +9,13 @@ description: > when 'T' is not an object ('T' is a boolean primitive) ---*/ - function callbackfn(val, idx, obj) { - return this.valueOf() === false; - } +function callbackfn(val, idx, obj) { + return this.valueOf() === false; +} - var obj = { 0: 11, length: 1 }; +var obj = { + 0: 11, + length: 1 +}; assert(Array.prototype.some.call(obj, callbackfn, false), 'Array.prototype.some.call(obj, callbackfn, false) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-17.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-17.js index 85a7f5b2ef..198346eb6e 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-17.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-17.js @@ -9,10 +9,13 @@ description: > when T is not an object (T is a number primitive) ---*/ - function callbackfn(val, idx, obj) { - return this.valueOf() === 5; - } +function callbackfn(val, idx, obj) { + return this.valueOf() === 5; +} - var obj = { 0: 11, length: 1 }; +var obj = { + 0: 11, + length: 1 +}; assert(Array.prototype.some.call(obj, callbackfn, 5), 'Array.prototype.some.call(obj, callbackfn, 5) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-18.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-18.js index e8edeec025..9498f8079c 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-18.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-18.js @@ -9,10 +9,14 @@ description: > when T is not an object (T is a string primitive) ---*/ - function callbackfn(val, idx, obj) { - return this.valueOf() === "hello!"; - } +function callbackfn(val, idx, obj) { + return this.valueOf() === "hello!"; +} - var obj = { 0: 11, 1: 9, length: 2 }; +var obj = { + 0: 11, + 1: 9, + length: 2 +}; assert(Array.prototype.some.call(obj, callbackfn, "hello!"), 'Array.prototype.some.call(obj, callbackfn, "hello!") !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-19.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-19.js index 2e8a6f2130..4d0063e47b 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-19.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-19.js @@ -7,14 +7,19 @@ es5id: 15.4.4.17-7-c-ii-19 description: Array.prototype.some - non-indexed properties are not called ---*/ - var called = 0; +var called = 0; - function callbackfn(val, idx, obj) { - called++; - return val === 11; - } +function callbackfn(val, idx, obj) { + called++; + return val === 11; +} - var obj = { 0: 9, 10: 8, non_index_property: 11, length: 20 }; +var obj = { + 0: 9, + 10: 8, + non_index_property: 11, + length: 20 +}; assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-2.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-2.js index 0546acaa13..be738c154f 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-2.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-2.js @@ -7,16 +7,16 @@ es5id: 15.4.4.17-7-c-ii-2 description: Array.prototype.some - callbackfn takes 3 arguments ---*/ - function callbackfn(val, idx, obj) - { - if(arguments.length === 3) //verify if callbackfn was called with 3 parameters - return false; - else - return true; - } +function callbackfn(val, idx, obj) +{ + if (arguments.length === 3) //verify if callbackfn was called with 3 parameters + return false; + else + return true; +} - var arr = [0,1,true,null,new Object(),"five"]; - arr[999999] = -6.6; +var arr = [0, 1, true, null, new Object(), "five"]; +arr[999999] = -6.6; assert.sameValue(arr.some(callbackfn), false, 'arr.some(callbackfn)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-20.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-20.js index 342f98b380..899fb2efb7 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-20.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-20.js @@ -9,12 +9,17 @@ description: > (thisArg is correct) ---*/ - var thisArg = { threshold: 10 }; +var thisArg = { + threshold: 10 +}; - function callbackfn(val, idx, obj) { - return this === thisArg; - } +function callbackfn(val, idx, obj) { + return this === thisArg; +} - var obj = { 0: 11, length: 2 }; +var obj = { + 0: 11, + length: 2 +}; assert(Array.prototype.some.call(obj, callbackfn, thisArg), 'Array.prototype.some.call(obj, callbackfn, thisArg) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-21.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-21.js index 2e95550123..31d3af3b03 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-21.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-21.js @@ -9,21 +9,25 @@ description: > (kValue is correct) ---*/ - var firstIndex = false; - var secondIndex = false; +var firstIndex = false; +var secondIndex = false; - function callbackfn(val, idx, obj) { - if (idx === 0) { - firstIndex = (val === 11); - return false; - } - if (idx === 1) { - secondIndex = (val === 12); - return false; - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + firstIndex = (val === 11); + return false; + } + if (idx === 1) { + secondIndex = (val === 12); + return false; + } +} - var obj = { 0: 11, 1: 12, length: 2 }; +var obj = { + 0: 11, + 1: 12, + length: 2 +}; assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); assert(firstIndex, 'firstIndex !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-22.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-22.js index 00f6a963c1..e01efeac2b 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-22.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-22.js @@ -9,21 +9,25 @@ description: > (the index k is correct) ---*/ - var firstIndex = false; - var secondIndex = false; +var firstIndex = false; +var secondIndex = false; - function callbackfn(val, idx, obj) { - if (val === 11) { - firstIndex = (idx === 0); - return false; - } - if (val === 12) { - secondIndex = (idx === 1); - return false; - } - } +function callbackfn(val, idx, obj) { + if (val === 11) { + firstIndex = (idx === 0); + return false; + } + if (val === 12) { + secondIndex = (idx === 1); + return false; + } +} - var obj = { 0: 11, 1: 12, length: 2 }; +var obj = { + 0: 11, + 1: 12, + length: 2 +}; assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); assert(firstIndex, 'firstIndex !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-23.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-23.js index b5baef3173..58c4b0ef2c 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-23.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-23.js @@ -9,10 +9,14 @@ description: > (this object O is correct) ---*/ - var obj = { 0: 11, 1: 12, length: 2 }; +var obj = { + 0: 11, + 1: 12, + length: 2 +}; - function callbackfn(val, idx, o) { - return obj === o; - } +function callbackfn(val, idx, o) { + return obj === o; +} assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-3.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-3.js index 8e784584d6..fb0265b5e2 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-3.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-3.js @@ -9,17 +9,18 @@ description: > returns true ---*/ - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - if(idx > 5) - return true; - else - return false; - } +var callCnt = 0; - var arr = [0,1,2,3,4,5,6,7,8,9]; +function callbackfn(val, idx, obj) +{ + callCnt++; + if (idx > 5) + return true; + else + return false; +} + +var arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; assert.sameValue(arr.some(callbackfn), true, 'arr.some(callbackfn)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-4.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-4.js index c9c277ef3a..8642acfdbc 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-4.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-4.js @@ -9,19 +9,19 @@ description: > order ---*/ - var arr = [0, 1, 2, 3, 4, 5]; - var lastIdx = 0; - var called = 0; +var arr = [0, 1, 2, 3, 4, 5]; +var lastIdx = 0; +var called = 0; - function callbackfn(val, idx, o) { - called++; - if (lastIdx !== idx) { - return true; - } else { - lastIdx++; - return false; - } - } +function callbackfn(val, idx, o) { + called++; + if (lastIdx !== idx) { + return true; + } else { + lastIdx++; + return false; + } +} assert.sameValue(arr.some(callbackfn), false, 'arr.some(callbackfn)'); assert.sameValue(arr.length, called, 'arr.length'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-5.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-5.js index bfac0f4681..5b80ddcded 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-5.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-5.js @@ -9,21 +9,21 @@ description: > and not prior to starting the loop ---*/ - var kIndex = []; +var kIndex = []; - //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. - function callbackfn(val, idx, obj) { - //Each position should be visited one time, which means k is accessed one time during iterations. - if (typeof kIndex[idx] === "undefined") { - //when current position is visited, its previous index should has been visited. - if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") { - return true; - } - kIndex[idx] = 1; - return false; - } else { - return true; - } - } +//By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. +function callbackfn(val, idx, obj) { + //Each position should be visited one time, which means k is accessed one time during iterations. + if (typeof kIndex[idx] === "undefined") { + //when current position is visited, its previous index should has been visited. + if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") { + return true; + } + kIndex[idx] = 1; + return false; + } else { + return true; + } +} assert.sameValue([11, 12, 13, 14].some(callbackfn, undefined), false, '[11, 12, 13, 14].some(callbackfn, undefined)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-6.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-6.js index 8700b391a5..f67b3e415c 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-6.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-6.js @@ -7,11 +7,14 @@ es5id: 15.4.4.17-7-c-ii-6 description: Array.prototype.some - arguments to callbackfn are self consistent ---*/ - var obj = { 0: 11, length: 1 }; - var thisArg = {}; +var obj = { + 0: 11, + length: 1 +}; +var thisArg = {}; - function callbackfn() { - return this === thisArg && arguments[0] === 11 && arguments[1] === 0 && arguments[2] === obj; - } +function callbackfn() { + return this === thisArg && arguments[0] === 11 && arguments[1] === 0 && arguments[2] === obj; +} assert(Array.prototype.some.call(obj, callbackfn, thisArg), 'Array.prototype.some.call(obj, callbackfn, thisArg) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-7.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-7.js index a8742d69f2..ff362211be 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-7.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-7.js @@ -9,20 +9,25 @@ description: > terminate iteration ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - if (idx > 0) { - accessed = true; - } - if (idx === 0) { - throw new Error("Exception occurred in callbackfn"); - } - return false; - } +function callbackfn(val, idx, obj) { + if (idx > 0) { + accessed = true; + } + if (idx === 0) { + throw new Error("Exception occurred in callbackfn"); + } + return false; +} - var obj = { 0: 9, 1: 100, 10: 11, length: 20 }; +var obj = { + 0: 9, + 1: 100, + 10: 11, + length: 20 +}; assert.throws(Error, function() { - Array.prototype.some.call(obj, callbackfn); + Array.prototype.some.call(obj, callbackfn); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-8.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-8.js index 9c926f28a9..451d0b3d37 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-8.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-8.js @@ -9,13 +9,17 @@ description: > iterations is observed ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - obj[idx + 1] = 11; - } - return val > 10; - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + obj[idx + 1] = 11; + } + return val > 10; +} - var obj = { 0: 9, 1: 8, length: 2 }; +var obj = { + 0: 9, + 1: 8, + length: 2 +}; assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-9.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-9.js index a49cd35a6a..b9c6c8eda9 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-9.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-9.js @@ -7,8 +7,8 @@ es5id: 15.4.4.17-7-c-ii-9 description: Array.prototype.some - callbackfn is called with 0 formal parameter ---*/ - function callbackfn() { - return true; - } +function callbackfn() { + return true; +} assert([11, 12].some(callbackfn), '[11, 12].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-1.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-1.js index 5acfb38bf3..4e2074291e 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-1.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-1.js @@ -7,14 +7,17 @@ es5id: 15.4.4.17-7-c-iii-1 description: Array.prototype.some - return value of callbackfn is undefined ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return undefined; - } +function callbackfn(val, idx, obj) { + accessed = true; + return undefined; +} - var obj = { 0: 11, length: 2 }; +var obj = { + 0: 11, + length: 2 +}; assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-10.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-10.js index 0b26acd258..d561708440 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-10.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-10.js @@ -9,8 +9,8 @@ description: > (value is Infinity) ---*/ - function callbackfn(val, idx, obj) { - return Infinity; - } +function callbackfn(val, idx, obj) { + return Infinity; +} assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-11.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-11.js index e17e0f6ff5..1defdc292c 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-11.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-11.js @@ -9,8 +9,8 @@ description: > (value is -Infinity) ---*/ - function callbackfn(val, idx, obj) { - return -Infinity; - } +function callbackfn(val, idx, obj) { + return -Infinity; +} assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-12.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-12.js index 1eaab0e8aa..adfd8efbf5 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-12.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-12.js @@ -9,11 +9,11 @@ description: > (value is NaN) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return NaN; - } +function callbackfn(val, idx, obj) { + accessed = true; + return NaN; +} assert.sameValue([11].some(callbackfn), false, '[11].some(callbackfn)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-13.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-13.js index 5690c14b48..2e20fa5ba0 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-13.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-13.js @@ -9,12 +9,12 @@ description: > string ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return ""; - } +function callbackfn(val, idx, obj) { + accessed = true; + return ""; +} assert.sameValue([11].some(callbackfn), false, '[11].some(callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-14.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-14.js index c0776e90f2..a15cbed88a 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-14.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-14.js @@ -9,8 +9,8 @@ description: > string ---*/ - function callbackfn(val, idx, obj) { - return "non-empty string"; - } +function callbackfn(val, idx, obj) { + return "non-empty string"; +} assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-15.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-15.js index 37974b816e..1de47b0a3e 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-15.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-15.js @@ -9,8 +9,8 @@ description: > object ---*/ - function callbackfn(val, idx, obj) { - return function () { }; - } +function callbackfn(val, idx, obj) { + return function() {}; +} assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-16.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-16.js index dc3c10f897..f0b7db75d4 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-16.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-16.js @@ -9,8 +9,8 @@ description: > object ---*/ - function callbackfn(val, idx, obj) { - return new Array(10); - } +function callbackfn(val, idx, obj) { + return new Array(10); +} assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-17.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-17.js index ba9188b146..a2be9ec374 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-17.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-17.js @@ -9,8 +9,8 @@ description: > object ---*/ - function callbackfn(val, idx, obj) { - return new String(); - } +function callbackfn(val, idx, obj) { + return new String(); +} assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-18.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-18.js index 871b4a2171..7d273f4ec4 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-18.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-18.js @@ -9,8 +9,8 @@ description: > object ---*/ - function callbackfn(val, idx, obj) { - return new Boolean(); - } +function callbackfn(val, idx, obj) { + return new Boolean(); +} assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-19.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-19.js index 0c71f54867..a87205ead3 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-19.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-19.js @@ -9,8 +9,8 @@ description: > object ---*/ - function callbackfn(val, idx, obj) { - return new Number(); - } +function callbackfn(val, idx, obj) { + return new Number(); +} assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-2.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-2.js index 19318e4b67..b52aff5276 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-2.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-2.js @@ -7,14 +7,17 @@ es5id: 15.4.4.17-7-c-iii-2 description: Array.prototype.some - return value of callbackfn is null ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return null; - } +function callbackfn(val, idx, obj) { + accessed = true; + return null; +} - var obj = { 0: 11, length: 2 }; +var obj = { + 0: 11, + length: 2 +}; assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-20.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-20.js index 481f06fc78..2911f87bcb 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-20.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-20.js @@ -9,8 +9,8 @@ description: > object ---*/ - function callbackfn(val, idx, obj) { - return Math; - } +function callbackfn(val, idx, obj) { + return Math; +} assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-21.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-21.js index 04a02a0da6..068cd5d0da 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-21.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-21.js @@ -7,8 +7,8 @@ es5id: 15.4.4.17-7-c-iii-21 description: Array.prototype.some - return value of callbackfn is a Date object ---*/ - function callbackfn(val, idx, obj) { - return new Date(); - } +function callbackfn(val, idx, obj) { + return new Date(); +} assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-22.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-22.js index 706a94dad8..b71d846358 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-22.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-22.js @@ -9,8 +9,8 @@ description: > object ---*/ - function callbackfn(val, idx, obj) { - return new RegExp(); - } +function callbackfn(val, idx, obj) { + return new RegExp(); +} assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-23.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-23.js index d906757530..c0316a94b4 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-23.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-23.js @@ -9,8 +9,8 @@ description: > object ---*/ - function callbackfn(val, idx, obj) { - return JSON; - } +function callbackfn(val, idx, obj) { + return JSON; +} assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-24.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-24.js index 55f76e23dc..f8ff2dc7f4 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-24.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-24.js @@ -9,8 +9,8 @@ description: > object ---*/ - function callbackfn(val, idx, obj) { - return new EvalError(); - } +function callbackfn(val, idx, obj) { + return new EvalError(); +} assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-25.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-25.js index b3aaf63669..f0237397db 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-25.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-25.js @@ -9,8 +9,8 @@ description: > object ---*/ - function callbackfn(val, idx, obj) { - return arguments; - } +function callbackfn(val, idx, obj) { + return arguments; +} assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-26.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-26.js index e8119a33dc..d96e7e7834 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-26.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-26.js @@ -10,8 +10,9 @@ description: > ---*/ var global = this; - function callbackfn(val, idx, obj) { - return global; - } + +function callbackfn(val, idx, obj) { + return global; +} assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-28.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-28.js index 3206596514..e971d690dd 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-28.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-28.js @@ -7,37 +7,40 @@ es5id: 15.4.4.17-7-c-iii-28 description: Array.prototype.some - true prevents further side effects ---*/ - var result = false; - function callbackfn(val, idx, obj) { - if (idx > 1) { - result = true; - } - return val > 10; - } +var result = false; - var obj = { length: 20 }; +function callbackfn(val, idx, obj) { + if (idx > 1) { + result = true; + } + return val > 10; +} - Object.defineProperty(obj, "0", { - get: function () { - return 8; - }, - configurable: true - }); +var obj = { + length: 20 +}; - Object.defineProperty(obj, "1", { - get: function () { - return 11; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + return 8; + }, + configurable: true +}); - Object.defineProperty(obj, "2", { - get: function () { - result = true; - return 11; - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + return 11; + }, + configurable: true +}); + +Object.defineProperty(obj, "2", { + get: function() { + result = true; + return 11; + }, + configurable: true +}); assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); assert.sameValue(result, false, 'result'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-29.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-29.js index cb3c75c0d0..d0d8b0cdea 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-29.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-29.js @@ -9,8 +9,8 @@ description: > callbackfn is treated as true value ---*/ - function callbackfn() { - return new Boolean(false); - } +function callbackfn() { + return new Boolean(false); +} assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-3.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-3.js index b5c6ee0eeb..ab3d088db4 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-3.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-3.js @@ -9,14 +9,17 @@ description: > (value is false) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return false; - } +function callbackfn(val, idx, obj) { + accessed = true; + return false; +} - var obj = { 0: 11, length: 2 }; +var obj = { + 0: 11, + length: 2 +}; assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-4.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-4.js index ff056a3259..9b885029ce 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-4.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-4.js @@ -9,10 +9,13 @@ description: > (value is true) ---*/ - function callbackfn(val, idx, obj) { - return true; - } +function callbackfn(val, idx, obj) { + return true; +} - var obj = { 0: 11, length: 2 }; +var obj = { + 0: 11, + length: 2 +}; assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-5.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-5.js index 6b0b20e3d5..f67054b66a 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-5.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-5.js @@ -9,12 +9,12 @@ description: > (value is 0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return 0; - } +function callbackfn(val, idx, obj) { + accessed = true; + return 0; +} assert.sameValue([11].some(callbackfn), false, '[11].some(callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-6.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-6.js index f54c2e9a78..af66994245 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-6.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-6.js @@ -9,12 +9,12 @@ description: > (value is +0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return +0; - } +function callbackfn(val, idx, obj) { + accessed = true; + return +0; +} assert.sameValue([11].some(callbackfn), false, '[11].some(callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-7.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-7.js index eae2d4fcba..ddb2d1df61 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-7.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-7.js @@ -9,12 +9,12 @@ description: > (value is -0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return -0; - } +function callbackfn(val, idx, obj) { + accessed = true; + return -0; +} assert.sameValue([11].some(callbackfn), false, '[11].some(callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-8.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-8.js index a5fc01f223..ce91332001 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-8.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-8.js @@ -9,8 +9,8 @@ description: > (value is positive number) ---*/ - function callbackfn(val, idx, obj) { - return 5; - } +function callbackfn(val, idx, obj) { + return 5; +} assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-9.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-9.js index 2d966cbd02..3f389202c6 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-9.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-9.js @@ -9,8 +9,8 @@ description: > (value is negative number) ---*/ - function callbackfn(val, idx, obj) { - return -5; - } +function callbackfn(val, idx, obj) { + return -5; +} assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-8-1.js b/test/built-ins/Array/prototype/some/15.4.4.17-8-1.js index 0546141f50..d37fa7cb25 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-8-1.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-8-1.js @@ -7,7 +7,7 @@ es5id: 15.4.4.17-8-1 description: Array.prototype.some returns false if 'length' is 0 (empty array) ---*/ - function cb(){} - var i = [].some(cb); +function cb() {} +var i = [].some(cb); assert.sameValue(i, false, 'i'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-8-10.js b/test/built-ins/Array/prototype/some/15.4.4.17-8-10.js index d3da6def0d..bb8b38ba1e 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-8-10.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-8-10.js @@ -7,19 +7,20 @@ es5id: 15.4.4.17-8-10 description: Array.prototype.some - subclassed array when length is reduced ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 2; +foo.prototype = new Array(1, 2, 3); - function cb(val) - { - if(val > 2) - return true; - else - return false; - } - var i = f.some(cb); +function foo() {} +var f = new foo(); +f.length = 2; + +function cb(val) +{ + if (val > 2) + return true; + else + return false; +} +var i = f.some(cb); assert.sameValue(i, false, 'i'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-8-11.js b/test/built-ins/Array/prototype/some/15.4.4.17-8-11.js index 8d5f1a786c..c5914d1a6d 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-8-11.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-8-11.js @@ -9,14 +9,15 @@ description: > return false ---*/ - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - return false; - } +var callCnt = 0; - var arr = [0,1,2,3,4,5,6,7,8,9]; +function callbackfn(val, idx, obj) +{ + callCnt++; + return false; +} + +var arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; assert.sameValue(arr.some(callbackfn), false, 'arr.some(callbackfn)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-8-12.js b/test/built-ins/Array/prototype/some/15.4.4.17-8-12.js index 5912e36c42..0ba4ed10fb 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-8-12.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-8-12.js @@ -9,12 +9,12 @@ description: > called on ---*/ - function callbackfn(val, idx, obj) - { - return true; - } - var arr = [1,2,3,4,5]; - arr.some(callbackfn); +function callbackfn(val, idx, obj) +{ + return true; +} +var arr = [1, 2, 3, 4, 5]; +arr.some(callbackfn); assert.sameValue(arr[0], 1, 'arr[0]'); assert.sameValue(arr[1], 2, 'arr[1]'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-8-13.js b/test/built-ins/Array/prototype/some/15.4.4.17-8-13.js index 7ef5af8be4..863317f984 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-8-13.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-8-13.js @@ -7,16 +7,17 @@ es5id: 15.4.4.17-8-13 description: Array.prototype.some doesn't visit expandos ---*/ - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - return false; - } +var callCnt = 0; - var arr = [0,1,2,3,4,5,6,7,8,9]; - arr["i"] = 10; - arr[true] = 11; +function callbackfn(val, idx, obj) +{ + callCnt++; + return false; +} + +var arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; +arr["i"] = 10; +arr[true] = 11; assert.sameValue(arr.some(callbackfn), false, 'arr.some(callbackfn)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-8-2.js b/test/built-ins/Array/prototype/some/15.4.4.17-8-2.js index da760e8945..90ab6cb602 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-8-2.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-8-2.js @@ -9,13 +9,14 @@ description: > Array, length overridden to null (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = null; +foo.prototype = new Array(1, 2, 3); - function cb(){} - var i = f.some(cb); +function foo() {} +var f = new foo(); +f.length = null; + +function cb() {} +var i = f.some(cb); assert.sameValue(i, false, 'i'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-8-3.js b/test/built-ins/Array/prototype/some/15.4.4.17-8-3.js index f35fe21966..efe0afb0c0 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-8-3.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-8-3.js @@ -9,13 +9,14 @@ description: > Array, length overridden to false (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = false; +foo.prototype = new Array(1, 2, 3); - function cb(){} - var i = f.some(cb); +function foo() {} +var f = new foo(); +f.length = false; + +function cb() {} +var i = f.some(cb); assert.sameValue(i, false, 'i'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-8-4.js b/test/built-ins/Array/prototype/some/15.4.4.17-8-4.js index 5b6d7153e1..32bfde4080 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-8-4.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-8-4.js @@ -9,13 +9,14 @@ description: > Array, length overridden to 0 (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 0; +foo.prototype = new Array(1, 2, 3); - function cb(){} - var i = f.some(cb); +function foo() {} +var f = new foo(); +f.length = 0; + +function cb() {} +var i = f.some(cb); assert.sameValue(i, false, 'i'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-8-5.js b/test/built-ins/Array/prototype/some/15.4.4.17-8-5.js index e66aa48029..1e2fe9b3bf 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-8-5.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-8-5.js @@ -9,13 +9,14 @@ description: > Array, length overridden to '0' (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = '0'; +foo.prototype = new Array(1, 2, 3); - function cb(){} - var i = f.some(cb); +function foo() {} +var f = new foo(); +f.length = '0'; + +function cb() {} +var i = f.some(cb); assert.sameValue(i, false, 'i'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-8-6.js b/test/built-ins/Array/prototype/some/15.4.4.17-8-6.js index 5607fad05c..546c43f500 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-8-6.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-8-6.js @@ -9,15 +9,20 @@ description: > Array, length overridden with obj with valueOf) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - var o = { valueOf: function () { return 0;}}; - f.length = o; +function foo() {} +var f = new foo(); - function cb(){} - var i = f.some(cb); +var o = { + valueOf: function() { + return 0; + } +}; +f.length = o; + +function cb() {} +var i = f.some(cb); assert.sameValue(i, false, 'i'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-8-7.js b/test/built-ins/Array/prototype/some/15.4.4.17-8-7.js index c483ee3d6e..1b4d757c00 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-8-7.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-8-7.js @@ -9,21 +9,26 @@ description: > Array, length overridden with obj w/o valueOf (toString)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - var o = { toString: function () { return '0';}}; - f.length = o; +function foo() {} +var f = new foo(); - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. +var o = { + toString: function() { + return '0'; + } +}; +f.length = o; - function cb(){} - var i = f.some(cb); +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. + +function cb() {} +var i = f.some(cb); assert.sameValue(i, false, 'i'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-8-8.js b/test/built-ins/Array/prototype/some/15.4.4.17-8-8.js index 14dd2908f9..1365c1fafb 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-8-8.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-8-8.js @@ -9,28 +9,29 @@ description: > Array, length overridden with [] ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - f.length = []; +function foo() {} +var f = new foo(); - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. +f.length = []; - function cb(){} - var i = f.some(cb); +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. +// +// The toString( ) method on Array converts the array elements to strings, +// then returns the result of concatenating these strings, with commas in +// between. An array with no elements converts to the empty string, which +// converts to the number 0. If an array has a single element that is a +// number n, the array converts to a string representation of n, which is +// then converted back to n itself. If an array contains more than one element, +// or if its one element is not a number, the array converts to NaN. + +function cb() {} +var i = f.some(cb); assert.sameValue(i, false, 'i'); diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.2_T2.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.2_T2.js index 4dbefaaf61..b432109787 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.2_T2.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.2_T2.js @@ -11,7 +11,7 @@ es5id: 15.4.4.11_A1.2_T2 description: If comparefn is not undefined ---*/ -var myComparefn = function(x,y) { +var myComparefn = function(x, y) { if (x === undefined) return -1; if (y === undefined) return 1; return 0; diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.4_T2.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.4_T2.js index 2a141dba51..0f6a273571 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.4_T2.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.4_T2.js @@ -10,7 +10,7 @@ es5id: 15.4.4.11_A1.4_T2 description: If comparefn is not undefined ---*/ -var myComparefn = function(x,y) { +var myComparefn = function(x, y) { if (x === undefined) return -1; if (y === undefined) return 1; return 0; diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.5_T1.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.5_T1.js index 334aa6263e..321b6f63ff 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.5_T1.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.5_T1.js @@ -8,7 +8,7 @@ es5id: 15.4.4.11_A1.5_T1 description: Checking sort() and sort(undefined) ---*/ -var x = new Array(1,0); +var x = new Array(1, 0); x.sort(); //CHECK#1 @@ -26,7 +26,7 @@ if (x[1] !== 1) { $ERROR('#3: var x = new Array(1,0); x.sort(); x[1] === 1. Actual: ' + (x[1])); } -var x = new Array(1,0); +var x = new Array(1, 0); x.sort(undefined); //CHECK#4 diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.1_T2.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.1_T2.js index 336bcadfff..044858b0ab 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.1_T2.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.1_T2.js @@ -12,7 +12,7 @@ description: Checking RUSSIAN ALPHABET ---*/ var alphabetR = ["ё", "я", "ю", "э", "ь", "ы", "ъ", "щ", "ш", "ч", "ц", "х", "ф", "у", "т", "с", "р", "П", "О", "Н", "М", "Л", "К", "Й", "И", "З", "Ж", "Е", "Д", "Г", "В", "Б", "А"]; -var alphabet = ["А", "Б", "В", "Г", "Д", "Е", "Ж", "З", "И", "Й", "К", "Л", "М", "Н", "О", "П", "р", "с", "т", "у", "ф", "х", "ц", "ч", "ш", "щ", "ъ", "ы", "ь", "э", "ю", "я", "ё"]; +var alphabet = ["А", "Б", "В", "Г", "Д", "Е", "Ж", "З", "И", "Й", "К", "Л", "М", "Н", "О", "П", "р", "с", "т", "у", "ф", "х", "ц", "ч", "ш", "щ", "ъ", "ы", "ь", "э", "ю", "я", "ё"]; //CHECK#1 alphabetR.sort(); diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.1_T3.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.1_T3.js index de262fd3ca..c2bfb06155 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.1_T3.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.1_T3.js @@ -11,9 +11,16 @@ es5id: 15.4.4.11_A2.1_T3 description: Checking ToString operator ---*/ -var obj = {valueOf: function() {return 1}, toString: function() {return -2}}; +var obj = { + valueOf: function() { + return 1 + }, + toString: function() { + return -2 + } +}; var alphabetR = [undefined, 2, 1, "X", -1, "a", true, obj, NaN, Infinity]; -var alphabet = [-1, obj, 1, 2, Infinity, NaN, "X", "a", true, undefined]; +var alphabet = [-1, obj, 1, 2, Infinity, NaN, "X", "a", true, undefined]; //CHECK#1 alphabetR.sort(); diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.2_T1.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.2_T1.js index 537e1be33d..771eba4c84 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.2_T1.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.2_T1.js @@ -9,9 +9,9 @@ description: Checking ENGLISH ALPHABET ---*/ var alphabetR = ["z", "y", "x", "w", "v", "u", "t", "s", "r", "q", "p", "o", "n", "M", "L", "K", "J", "I", "H", "G", "F", "E", "D", "C", "B", "A"]; -var alphabet = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]; +var alphabet = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]; -var myComparefn = function(x,y) { +var myComparefn = function(x, y) { var xS = String(x); var yS = String(y); if (xS < yS) return 1 diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.2_T2.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.2_T2.js index 2c67068aef..0075ca2990 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.2_T2.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.2_T2.js @@ -9,9 +9,9 @@ description: Checking RUSSIAN ALPHABET ---*/ var alphabetR = ["ё", "я", "ю", "э", "ь", "ы", "ъ", "щ", "ш", "ч", "ц", "х", "ф", "у", "т", "с", "р", "П", "О", "Н", "М", "Л", "К", "Й", "И", "З", "Ж", "Е", "Д", "Г", "В", "Б", "А"]; -var alphabet = ["А", "Б", "В", "Г", "Д", "Е", "Ж", "З", "И", "Й", "К", "Л", "М", "Н", "О", "П", "р", "с", "т", "у", "ф", "х", "ц", "ч", "ш", "щ", "ъ", "ы", "ь", "э", "ю", "я", "ё"]; +var alphabet = ["А", "Б", "В", "Г", "Д", "Е", "Ж", "З", "И", "Й", "К", "Л", "М", "Н", "О", "П", "р", "с", "т", "у", "ф", "х", "ц", "ч", "ш", "щ", "ъ", "ы", "ь", "э", "ю", "я", "ё"]; -var myComparefn = function(x,y) { +var myComparefn = function(x, y) { var xS = String(x); var yS = String(y); if (xS < yS) return 1 diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.2_T3.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.2_T3.js index ddc5354f08..6e5df4ec45 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.2_T3.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.2_T3.js @@ -8,11 +8,18 @@ es5id: 15.4.4.11_A2.2_T3 description: Checking ToString operator ---*/ -var obj = {valueOf: function() {return 1}, toString: function() {return -2}}; +var obj = { + valueOf: function() { + return 1 + }, + toString: function() { + return -2 + } +}; var alphabetR = [undefined, 2, 1, "X", -1, "a", true, obj, NaN, Infinity]; var alphabet = [true, "a", "X", NaN, Infinity, 2, 1, obj, -1, undefined]; -var myComparefn = function(x,y) { +var myComparefn = function(x, y) { var xS = String(x); var yS = String(y); if (xS < yS) return 1 diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A3_T1.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A3_T1.js index d4598f7c03..c8fe6d58f2 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A3_T1.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A3_T1.js @@ -10,15 +10,33 @@ es5id: 15.4.4.11_A3_T1 description: If comparefn is undefined, use SortCompare operator ---*/ -var obj = {valueOf: function() {return 1}, toString: function() {return -2}}; -var alphabetR = {0:undefined, 1:2, 2:1, 3:"X", 4:-1, 5:"a", 6:true, 7:obj, 8:NaN, 9:Infinity}; +var obj = { + valueOf: function() { + return 1 + }, + toString: function() { + return -2 + } +}; +var alphabetR = { + 0: undefined, + 1: 2, + 2: 1, + 3: "X", + 4: -1, + 5: "a", + 6: true, + 7: obj, + 8: NaN, + 9: Infinity +}; alphabetR.sort = Array.prototype.sort; alphabetR.length = 10; var alphabet = [-1, obj, 1, 2, Infinity, NaN, "X", "a", true, undefined]; alphabetR.sort(); - //CHECK#0 +//CHECK#0 alphabetR.getClass = Object.prototype.toString; if (alphabetR.getClass() !== "[object " + "Object" + "]") { $ERROR('#0: alphabetR.sort() is Object object, not Array object'); diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A3_T2.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A3_T2.js index e5c56d65d3..5da87d3d43 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A3_T2.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A3_T2.js @@ -10,13 +10,31 @@ es5id: 15.4.4.11_A3_T2 description: If comparefn is not undefined ---*/ -var obj = {valueOf: function() {return 1}, toString: function() {return -2}}; -var alphabetR = {0:undefined, 1:2, 2:1, 3:"X", 4:-1, 5:"a", 6:true, 7:obj, 8:NaN, 9:Infinity}; +var obj = { + valueOf: function() { + return 1 + }, + toString: function() { + return -2 + } +}; +var alphabetR = { + 0: undefined, + 1: 2, + 2: 1, + 3: "X", + 4: -1, + 5: "a", + 6: true, + 7: obj, + 8: NaN, + 9: Infinity +}; alphabetR.sort = Array.prototype.sort; alphabetR.length = 10; var alphabet = [true, "a", "X", NaN, Infinity, 2, 1, obj, -1, undefined]; - var myComparefn = function(x,y) { +var myComparefn = function(x, y) { var xS = String(x); var yS = String(y); if (xS < yS) return 1 @@ -26,7 +44,7 @@ var alphabet = [true, "a", "X", NaN, Infinity, 2, 1, obj, -1, undefined]; alphabetR.sort(myComparefn); - //CHECK#0 +//CHECK#0 alphabetR.getClass = Object.prototype.toString; if (alphabetR.getClass() !== "[object " + "Object" + "]") { $ERROR('#0: alphabetR.sort() is Object object, not Array object'); diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A5_T1.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A5_T1.js index b1549f26e6..32ddbcd187 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A5_T1.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A5_T1.js @@ -9,14 +9,14 @@ description: comparefn function throw "error" ---*/ //CHECK#1 -var myComparefn = function(x,y) { +var myComparefn = function(x, y) { throw "error"; } -var x = [1,0]; +var x = [1, 0]; try { x.sort(myComparefn) $ERROR('#1.1: Array.sort should not eat exceptions'); -} catch(e) { +} catch (e) { if (e !== "error") { $ERROR('#1.2: Array.sort should not eat exceptions'); } diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A6_T2.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A6_T2.js index 4b623ca34b..4d26b47013 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A6_T2.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A6_T2.js @@ -11,7 +11,7 @@ description: > ---*/ Array.prototype[1] = -1; -var x = [1,0]; +var x = [1, 0]; x.length = 2; x.sort(); @@ -40,7 +40,10 @@ if (x[1] !== -1) { Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.sort = Array.prototype.sort; -x = {0:1,1:0}; +x = { + 0: 1, + 1: 0 +}; x.sort(); //CHECK#5 diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A8.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A8.js index 289887f032..bfa49d90ae 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A8.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A8.js @@ -10,7 +10,7 @@ flags: [noStrict] ---*/ var global = this; -[2,3].sort(function(x,y) { +[2, 3].sort(function(x, y) { "use strict"; if (this === global) { @@ -18,7 +18,7 @@ var global = this; } if (this !== undefined) { $ERROR('#2: Sort comparefn should be called with this===undefined. ' + - 'Actual: ' + this); + 'Actual: ' + this); } return x - y; }); diff --git a/test/built-ins/Array/prototype/sort/bug_596_1.js b/test/built-ins/Array/prototype/sort/bug_596_1.js index 1c6e4d724d..a144d9fcde 100644 --- a/test/built-ins/Array/prototype/sort/bug_596_1.js +++ b/test/built-ins/Array/prototype/sort/bug_596_1.js @@ -11,10 +11,10 @@ author: Thomas Dahlstrom (tdahlstrom@gmail.com) var counter = 0; var object = { - toString: function(){ - counter++; - return ""; - } + toString: function() { + counter++; + return ""; + } }; [object, object].sort(); diff --git a/test/built-ins/Array/prototype/sort/bug_596_2.js b/test/built-ins/Array/prototype/sort/bug_596_2.js index 1fbcd77ceb..ec571de20b 100644 --- a/test/built-ins/Array/prototype/sort/bug_596_2.js +++ b/test/built-ins/Array/prototype/sort/bug_596_2.js @@ -10,46 +10,46 @@ description: > author: Thomas Dahlstrom (tdahlstrom@gmail.com) ---*/ -var array = ['a',,void 0]; +var array = ['a', , void 0]; //CHECK#1 if (array.length !== 3) { - $ERROR('#1: array.length !== 3. Actual: ' + (array.length)) + $ERROR('#1: array.length !== 3. Actual: ' + (array.length)) } //CHECK#2 if (array.hasOwnProperty('0') !== true) { - $ERROR("#2: array.hasOwnProperty('0'). Actual: " + array.hasOwnProperty('0')); + $ERROR("#2: array.hasOwnProperty('0'). Actual: " + array.hasOwnProperty('0')); } //CHECK#3 if (array.hasOwnProperty('1') !== false) { - $ERROR("#3: array.hasOwnProperty('1'). Actual: " + array.hasOwnProperty('1')); + $ERROR("#3: array.hasOwnProperty('1'). Actual: " + array.hasOwnProperty('1')); } //CHECK#4 if (array.hasOwnProperty('2') !== true) { - $ERROR("#4: array.hasOwnProperty('2'). Actual: " + array.hasOwnProperty('2')); + $ERROR("#4: array.hasOwnProperty('2'). Actual: " + array.hasOwnProperty('2')); } array.sort(); //CHECK#5 if (array.length !== 3) { - $ERROR('#5: array.length !== 3. Actual: ' + (array.length)) + $ERROR('#5: array.length !== 3. Actual: ' + (array.length)) } //CHECK#6 if (array.hasOwnProperty('0') !== true) { - $ERROR("#6: array.hasOwnProperty('0'). Actual: " + array.hasOwnProperty('0')); + $ERROR("#6: array.hasOwnProperty('0'). Actual: " + array.hasOwnProperty('0')); } //CHECK#7 if (array.hasOwnProperty('1') !== true) { - $ERROR("#7: array.hasOwnProperty('1'). Actual: " + array.hasOwnProperty('1')); + $ERROR("#7: array.hasOwnProperty('1'). Actual: " + array.hasOwnProperty('1')); } //CHECK#8 if (array.hasOwnProperty('2') !== false) { - $ERROR("#8: array.hasOwnProperty('2'). Actual: " + array.hasOwnProperty('2')); + $ERROR("#8: array.hasOwnProperty('2'). Actual: " + array.hasOwnProperty('2')); } diff --git a/test/built-ins/Array/prototype/sort/comparefn-nonfunction-call-throws.js b/test/built-ins/Array/prototype/sort/comparefn-nonfunction-call-throws.js index c35b0f876e..62ab296449 100644 --- a/test/built-ins/Array/prototype/sort/comparefn-nonfunction-call-throws.js +++ b/test/built-ins/Array/prototype/sort/comparefn-nonfunction-call-throws.js @@ -23,7 +23,7 @@ var poisoned = { }; assert.throws(TypeError, function() { - sample.sort(null); + sample.sort(null); }, "sample.sort(null);"); assert.throws(TypeError, function() { diff --git a/test/built-ins/Array/prototype/splice/15.4.4.12-9-a-1.js b/test/built-ins/Array/prototype/splice/15.4.4.12-9-a-1.js index 8ec20c11c8..0e0d144a6a 100644 --- a/test/built-ins/Array/prototype/splice/15.4.4.12-9-a-1.js +++ b/test/built-ins/Array/prototype/splice/15.4.4.12-9-a-1.js @@ -9,8 +9,8 @@ description: > ToString(actualStart+k) in an Array ---*/ - var arrObj = [1, 2, 3]; - var newArrObj = arrObj.splice(-2, 1); +var arrObj = [1, 2, 3]; +var newArrObj = arrObj.splice(-2, 1); assert.sameValue(newArrObj.length, 1, 'newArrObj.length'); assert.sameValue(newArrObj[0], 2, 'newArrObj[0]'); diff --git a/test/built-ins/Array/prototype/splice/15.4.4.12-9-c-ii-1.js b/test/built-ins/Array/prototype/splice/15.4.4.12-9-c-ii-1.js index e911470f01..ab59bcf6f5 100644 --- a/test/built-ins/Array/prototype/splice/15.4.4.12-9-c-ii-1.js +++ b/test/built-ins/Array/prototype/splice/15.4.4.12-9-c-ii-1.js @@ -10,28 +10,28 @@ description: > less than 'actualDeleteCount (Step 9.c.ii) ---*/ - var arr = ["a", "b", "c"]; - Array.prototype[0] = "test"; - var newArr = arr.splice(2, 1, "d"); +var arr = ["a", "b", "c"]; +Array.prototype[0] = "test"; +var newArr = arr.splice(2, 1, "d"); - var verifyValue = false; - verifyValue = arr.length === 3 && arr[0] === "a" && arr[1] === "b" && arr[2] === "d" - && newArr[0] === "c" && newArr.length === 1; +var verifyValue = false; +verifyValue = arr.length === 3 && arr[0] === "a" && arr[1] === "b" && arr[2] === "d" && + newArr[0] === "c" && newArr.length === 1; - var verifyEnumerable = false; - for (var p in newArr) { - if (newArr.hasOwnProperty("0") && p === "0") { - verifyEnumerable = true; - } - } +var verifyEnumerable = false; +for (var p in newArr) { + if (newArr.hasOwnProperty("0") && p === "0") { + verifyEnumerable = true; + } +} - var verifyWritable = false; - newArr[0] = 12; - verifyWritable = newArr[0] === 12; +var verifyWritable = false; +newArr[0] = 12; +verifyWritable = newArr[0] === 12; - var verifyConfigurable = false; - delete newArr[0]; - verifyConfigurable = newArr.hasOwnProperty("0"); +var verifyConfigurable = false; +delete newArr[0]; +verifyConfigurable = newArr.hasOwnProperty("0"); assert(verifyValue, 'verifyValue !== true'); assert.sameValue(verifyConfigurable, false, 'verifyConfigurable'); diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T1.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T1.js index 27bc884add..5cdd55a4ee 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T1.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T1.js @@ -10,8 +10,8 @@ es5id: 15.4.4.12_A1.1_T1 description: length > deleteCount > start = 0, itemCount = 0 ---*/ -var x = [0,1,2,3]; -var arr = x.splice(0,3); +var x = [0, 1, 2, 3]; +var arr = x.splice(0, 3); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T2.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T2.js index 12cd147ecf..3685147d67 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T2.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T2.js @@ -10,8 +10,8 @@ es5id: 15.4.4.12_A1.1_T2 description: length > deleteCount > start = 0, itemCount > 0 ---*/ -var x = [0,1,2,3]; -var arr = x.splice(0,3,4,5); +var x = [0, 1, 2, 3]; +var arr = x.splice(0, 3, 4, 5); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T3.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T3.js index 118d0a82a9..713f6a0416 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T3.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T3.js @@ -10,8 +10,8 @@ es5id: 15.4.4.12_A1.1_T3 description: length = deleteCount > start = 0 ---*/ -var x = [0,1,2,3]; -var arr = x.splice(0,4); +var x = [0, 1, 2, 3]; +var arr = x.splice(0, 4); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T4.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T4.js index 5fb2399424..0eb829e794 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T4.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T4.js @@ -10,8 +10,8 @@ es5id: 15.4.4.12_A1.1_T4 description: length > deleteCount > start > 0, itemCount > 0 ---*/ -var x = [0,1,2,3]; -var arr = x.splice(1,3,4,5); +var x = [0, 1, 2, 3]; +var arr = x.splice(1, 3, 4, 5); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T5.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T5.js index 9e2dac61f7..652524bd11 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T5.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T5.js @@ -10,8 +10,8 @@ es5id: 15.4.4.12_A1.1_T5 description: deleteCount > length > start = 0, itemCount = 0 ---*/ -var x = [0,1,2,3]; -var arr = x.splice(0,5); +var x = [0, 1, 2, 3]; +var arr = x.splice(0, 5); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T6.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T6.js index 0ea1d8bcee..91253b80f1 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T6.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T6.js @@ -10,8 +10,8 @@ es5id: 15.4.4.12_A1.1_T6 description: length = deleteCount > start > 0, itemCount > 0 ---*/ -var x = [0,1,2,3]; -var arr = x.splice(1,4,4,5); +var x = [0, 1, 2, 3]; +var arr = x.splice(1, 4, 4, 5); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T1.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T1.js index 1929add947..0db991b3ec 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T1.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T1.js @@ -10,8 +10,8 @@ es5id: 15.4.4.12_A1.2_T1 description: -length = start < deleteCount < 0, itemCount = 0 ---*/ -var x = [0,1]; -var arr = x.splice(-2,-1); +var x = [0, 1]; +var arr = x.splice(-2, -1); //CHECK#0 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T2.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T2.js index fddd02dc84..0be3d2398c 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T2.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T2.js @@ -10,8 +10,8 @@ es5id: 15.4.4.12_A1.2_T2 description: -length < start = deleteCount < 0, itemCount = 0 ---*/ -var x = [0,1]; -var arr = x.splice(-1,-1); +var x = [0, 1]; +var arr = x.splice(-1, -1); //CHECK#0 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T3.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T3.js index f5d24cac35..89e1ee2b5b 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T3.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T3.js @@ -10,8 +10,8 @@ es5id: 15.4.4.12_A1.2_T3 description: -length = start < deleteCount < 0, itemCount > 0 ---*/ -var x = [0,1]; -var arr = x.splice(-2,-1,2,3); +var x = [0, 1]; +var arr = x.splice(-2, -1, 2, 3); //CHECK#0 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T4.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T4.js index bb68a76802..02e2dbea84 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T4.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T4.js @@ -10,8 +10,8 @@ es5id: 15.4.4.12_A1.2_T4 description: -length < start = deleteCount < 0, itemCount > 0 ---*/ -var x = [0,1]; -var arr = x.splice(-1,-1,2,3); +var x = [0, 1]; +var arr = x.splice(-1, -1, 2, 3); //CHECK#0 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T5.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T5.js index f8fc1eccbc..ed8efafe78 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T5.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T5.js @@ -10,8 +10,8 @@ es5id: 15.4.4.12_A1.2_T5 description: start < -length < deleteCount < 0, itemCount > 0 ---*/ -var x = [0,1]; -var arr = x.splice(-3,-1,2,3); +var x = [0, 1]; +var arr = x.splice(-3, -1, 2, 3); //CHECK#0 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T1.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T1.js index 909d270ac1..66c3d55e21 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T1.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T1.js @@ -10,8 +10,8 @@ es5id: 15.4.4.12_A1.3_T1 description: -length < deleteCount < start = 0, itemCount = 0 ---*/ -var x = [0,1]; -var arr = x.splice(0,-1); +var x = [0, 1]; +var arr = x.splice(0, -1); //CHECK#0 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T2.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T2.js index 44917a67fa..089a2ce8c3 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T2.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T2.js @@ -10,8 +10,8 @@ es5id: 15.4.4.12_A1.3_T2 description: -length = -start < deleteCount < 0, itemCount = 0 ---*/ -var x = [0,1]; -var arr = x.splice(2,-1); +var x = [0, 1]; +var arr = x.splice(2, -1); //CHECK#0 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T3.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T3.js index f4f2678ad9..5c56b995ac 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T3.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T3.js @@ -10,8 +10,8 @@ es5id: 15.4.4.12_A1.3_T3 description: -length < deleteCount < start = 0, itemCount > 0 ---*/ -var x = [0,1]; -var arr = x.splice(0,-1,2,3); +var x = [0, 1]; +var arr = x.splice(0, -1, 2, 3); //CHECK#0 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T4.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T4.js index 1332574538..828e21cbbb 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T4.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T4.js @@ -10,8 +10,8 @@ es5id: 15.4.4.12_A1.3_T4 description: -length = -start < deleteCount < 0, itemCount > 0 ---*/ -var x = [0,1]; -var arr = x.splice(2,-1,2,3); +var x = [0, 1]; +var arr = x.splice(2, -1, 2, 3); //CHECK#0 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T5.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T5.js index 8c4475cd7e..cd2ccab2ca 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T5.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T5.js @@ -10,8 +10,8 @@ es5id: 15.4.4.12_A1.3_T5 description: -start < -length < deleteCount < 0, itemCount > 0 ---*/ -var x = [0,1]; -var arr = x.splice(3,-1,2,3); +var x = [0, 1]; +var arr = x.splice(3, -1, 2, 3); //CHECK#0 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T1.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T1.js index 01605c746d..9b4cd2228c 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T1.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T1.js @@ -10,8 +10,8 @@ es5id: 15.4.4.12_A1.4_T1 description: length = -start > deleteCount > 0, itemCount = 0 ---*/ -var x = [0,1,2,3]; -var arr = x.splice(-4,3); +var x = [0, 1, 2, 3]; +var arr = x.splice(-4, 3); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T2.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T2.js index 2862b3f60d..d531be2ee1 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T2.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T2.js @@ -10,8 +10,8 @@ es5id: 15.4.4.12_A1.4_T2 description: length = -start > deleteCount > 0, itemCount > 0 ---*/ -var x = [0,1,2,3]; -var arr = x.splice(-4,3,4,5); +var x = [0, 1, 2, 3]; +var arr = x.splice(-4, 3, 4, 5); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T3.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T3.js index 4be6a0b978..318d33a440 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T3.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T3.js @@ -10,8 +10,8 @@ es5id: 15.4.4.12_A1.4_T3 description: -start > length = deleteCount > 0, itemCount = 0 ---*/ -var x = [0,1,2,3]; -var arr = x.splice(-5,4); +var x = [0, 1, 2, 3]; +var arr = x.splice(-5, 4); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T4.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T4.js index 2dffe18b3d..9c2e3c5798 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T4.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T4.js @@ -10,8 +10,8 @@ es5id: 15.4.4.12_A1.4_T4 description: length > -start = deleteCount > 0, itemCount > 0 ---*/ -var x = [0,1,2,3]; -var arr = x.splice(-3,3,4,5); +var x = [0, 1, 2, 3]; +var arr = x.splice(-3, 3, 4, 5); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T5.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T5.js index 37ec9f17f0..4d051f44c3 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T5.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T5.js @@ -10,8 +10,8 @@ es5id: 15.4.4.12_A1.4_T5 description: -start > deleteCount > length > 0, itemCount = 0 ---*/ -var x = [0,1,2,3]; -var arr = x.splice(-9,5); +var x = [0, 1, 2, 3]; +var arr = x.splice(-9, 5); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T6.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T6.js index 4fa9aed73e..779089de14 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T6.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T6.js @@ -10,8 +10,8 @@ es5id: 15.4.4.12_A1.4_T6 description: length = deleteCount > -start > 0, itemCount > 0 ---*/ -var x = [0,1,2,3]; -var arr = x.splice(-3,4,4,5); +var x = [0, 1, 2, 3]; +var arr = x.splice(-3, 4, 4, 5); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.5_T1.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.5_T1.js index ec581518de..046f111f8c 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.5_T1.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.5_T1.js @@ -8,7 +8,7 @@ es5id: 15.4.4.12_A1.5_T1 description: start === undefined, end === undefined ---*/ -var x = [0,1,2,3]; +var x = [0, 1, 2, 3]; var arr = x.splice(undefined, undefined); //CHECK#1 diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.5_T2.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.5_T2.js index 5551f3596c..4741352b58 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.5_T2.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.5_T2.js @@ -8,8 +8,8 @@ es5id: 15.4.4.12_A1.5_T2 description: end === undefined ---*/ -var x = [0,1,2,3]; -var arr = x.splice(1,undefined); +var x = [0, 1, 2, 3]; +var arr = x.splice(1, undefined); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T1.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T1.js index 32848cc6fb..2e66e7f34b 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T1.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T1.js @@ -8,8 +8,8 @@ es5id: 15.4.4.12_A2.1_T1 description: start is not integer ---*/ -var x = [0,1,2,3]; -var arr = x.splice(1.5,3); +var x = [0, 1, 2, 3]; +var arr = x.splice(1.5, 3); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T2.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T2.js index 4e379cda8f..94ef139720 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T2.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T2.js @@ -8,8 +8,8 @@ es5id: 15.4.4.12_A2.1_T2 description: start = NaN ---*/ -var x = [0,1,2,3]; -var arr = x.splice(NaN,3); +var x = [0, 1, 2, 3]; +var arr = x.splice(NaN, 3); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T3.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T3.js index 807c0a41ad..eaf3c07a1b 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T3.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T3.js @@ -8,8 +8,8 @@ es5id: 15.4.4.12_A2.1_T3 description: start = Infinity ---*/ -var x = [0,1,2,3]; -var arr = x.splice(Number.POSITIVE_INFINITY,3); +var x = [0, 1, 2, 3]; +var arr = x.splice(Number.POSITIVE_INFINITY, 3); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T4.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T4.js index 083ed9ca89..939454e488 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T4.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T4.js @@ -8,8 +8,8 @@ es5id: 15.4.4.12_A2.1_T4 description: start = -Infinity ---*/ -var x = [0,1,2,3]; -var arr = x.splice(Number.NEGATIVE_INFINITY,3); +var x = [0, 1, 2, 3]; +var arr = x.splice(Number.NEGATIVE_INFINITY, 3); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T5.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T5.js index 51a7aa7654..9cf978a586 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T5.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T5.js @@ -8,8 +8,15 @@ es5id: 15.4.4.12_A2.1_T5 description: ToInteger use ToNumber ---*/ -var x = [0,1,2,3]; -var arr = x.splice({valueOf: function() {return 0}, toString: function() {return 3}},3); +var x = [0, 1, 2, 3]; +var arr = x.splice({ + valueOf: function() { + return 0 + }, + toString: function() { + return 3 + } +}, 3); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T1.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T1.js index 8a8cc929dc..4212e9e1f1 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T1.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T1.js @@ -8,8 +8,8 @@ es5id: 15.4.4.12_A2.2_T1 description: deleteCount is not integer ---*/ -var x = [0,1,2,3]; -var arr = x.splice(1,3.5); +var x = [0, 1, 2, 3]; +var arr = x.splice(1, 3.5); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T2.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T2.js index c97e14734c..cbe0fbb78f 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T2.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T2.js @@ -8,8 +8,8 @@ es5id: 15.4.4.12_A2.2_T2 description: deleteCount = NaN ---*/ -var x = [0,1]; -var arr = x.splice(0,NaN); +var x = [0, 1]; +var arr = x.splice(0, NaN); //CHECK#0 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T3.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T3.js index 8622ff7654..1a2e4fb1e7 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T3.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T3.js @@ -8,8 +8,8 @@ es5id: 15.4.4.12_A2.2_T3 description: deleteCount = Infinity ---*/ -var x = [0,1,2,3]; -var arr = x.splice(0,Number.POSITIVE_INFINITY); +var x = [0, 1, 2, 3]; +var arr = x.splice(0, Number.POSITIVE_INFINITY); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T4.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T4.js index 6c3008074f..d0ec317ce6 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T4.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T4.js @@ -8,8 +8,8 @@ es5id: 15.4.4.12_A2.2_T4 description: deleteCount = -Infinity ---*/ -var x = [0,1]; -var arr = x.splice(0,Number.NEGATIVE_INFINITY); +var x = [0, 1]; +var arr = x.splice(0, Number.NEGATIVE_INFINITY); //CHECK#0 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T5.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T5.js index d42f023fc9..911ee8defc 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T5.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T5.js @@ -8,8 +8,15 @@ es5id: 15.4.4.12_A2.2_T5 description: ToInteger use ToNumber ---*/ -var x = [0,1,2,3]; -var arr = x.splice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); +var x = [0, 1, 2, 3]; +var arr = x.splice(0, { + valueOf: function() { + return 3 + }, + toString: function() { + return 0 + } +}); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T1.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T1.js index 120d64c816..53135fec31 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T1.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T1.js @@ -12,10 +12,15 @@ description: > positive, use min(deleteCount, length - start) ---*/ -var obj = {0:0,1:1,2:2,3:3}; +var obj = { + 0: 0, + 1: 1, + 2: 2, + 3: 3 +}; obj.length = 4; obj.splice = Array.prototype.splice; -var arr = obj.splice(0,3,4,5); +var arr = obj.splice(0, 3, 4, 5); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T2.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T2.js index 294da306b6..d0c6aed9b1 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T2.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T2.js @@ -12,10 +12,13 @@ description: > is negative, use 0 ---*/ -var obj = {0:0,1:1}; +var obj = { + 0: 0, + 1: 1 +}; obj.length = 2; obj.splice = Array.prototype.splice; -var arr = obj.splice(-2,-1,2,3); +var arr = obj.splice(-2, -1, 2, 3); //CHECK#0 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T3.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T3.js index 3131c9a3a7..4b6fdb4b94 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T3.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T3.js @@ -12,10 +12,13 @@ description: > negative, use 0 ---*/ -var obj = {0:0,1:1}; +var obj = { + 0: 0, + 1: 1 +}; obj.length = 2; obj.splice = Array.prototype.splice; -var arr = obj.splice(0,-1,2,3); +var arr = obj.splice(0, -1, 2, 3); //CHECK#0 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T4.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T4.js index ca455cad51..1127a7cb64 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T4.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T4.js @@ -12,10 +12,15 @@ description: > is positive, use min(deleteCount, length - start) ---*/ -var obj = {0:0,1:1,2:2,3:3}; +var obj = { + 0: 0, + 1: 1, + 2: 2, + 3: 3 +}; obj.length = 4; obj.splice = Array.prototype.splice; -var arr = obj.splice(-4,3,4,5); +var arr = obj.splice(-4, 3, 4, 5); //CHECK#1 arr.getClass = Object.prototype.toString; diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A3_T1.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A3_T1.js index 4d92ace055..bf7b3a654e 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A3_T1.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A3_T1.js @@ -22,20 +22,20 @@ if (arr.length !== 1) { //CHECK#2 if (obj.length !== 4294967295) { - $ERROR('#2: var obj = {}; obj.splice = Array.prototype.splice; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; var arr = obj.splice(4294967295,1); obj.length === 4294967295. Actual: ' + (obj.length)); + $ERROR('#2: var obj = {}; obj.splice = Array.prototype.splice; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; var arr = obj.splice(4294967295,1); obj.length === 4294967295. Actual: ' + (obj.length)); } //CHECK#3 if (obj[0] !== "x") { - $ERROR('#3: var obj = {}; obj.splice = Array.prototype.splice; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; var arr = obj.splice(4294967295,1); obj[0] === "x". Actual: ' + (obj[0])); + $ERROR('#3: var obj = {}; obj.splice = Array.prototype.splice; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; var arr = obj.splice(4294967295,1); obj[0] === "x". Actual: ' + (obj[0])); } //CHECK#4 if (obj[4294967295] !== undefined) { - $ERROR('#4: var obj = {}; obj.splice = Array.prototype.splice; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; var arr = obj.splice(4294967295,1); obj[4294967295] === undefined. Actual: ' + (obj[4294967295])); + $ERROR('#4: var obj = {}; obj.splice = Array.prototype.splice; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; var arr = obj.splice(4294967295,1); obj[4294967295] === undefined. Actual: ' + (obj[4294967295])); } //CHECK#5 if (arr[0] !== "y") { - $ERROR('#5: var obj = {}; obj.splice = Array.prototype.splice; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; var arr = obj.splice(4294967295,1); arr[0] === "y". Actual: ' + (arr[0])); + $ERROR('#5: var obj = {}; obj.splice = Array.prototype.splice; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; var arr = obj.splice(4294967295,1); arr[0] === "y". Actual: ' + (arr[0])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A3_T3.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A3_T3.js index 3232c9a112..309de2f1f4 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A3_T3.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A3_T3.js @@ -12,7 +12,7 @@ var obj = {}; obj.splice = Array.prototype.splice; obj[4294967294] = "x"; obj.length = -1; -var arr = obj.splice(4294967294,1); +var arr = obj.splice(4294967294, 1); //CHECK#1 if (arr.length !== 0) { @@ -21,15 +21,15 @@ if (arr.length !== 0) { //CHECK#2 if (arr[0] !== undefined) { - $ERROR('#2: var obj = {}; obj.splice = Array.prototype.splice; obj[4294967294] = "x"; obj.length = 1; var arr = obj.splice(4294967294,1); arr[0] === undefined. Actual: ' + (arr[0])); + $ERROR('#2: var obj = {}; obj.splice = Array.prototype.splice; obj[4294967294] = "x"; obj.length = 1; var arr = obj.splice(4294967294,1); arr[0] === undefined. Actual: ' + (arr[0])); } //CHECK#3 if (obj.length !== 0) { - $ERROR('#3: var obj = {}; obj.splice = Array.prototype.splice; obj[4294967294] = "x"; obj.length = 1; var arr = obj.splice(4294967294,1); obj.length === 0. Actual: ' + (obj.length)); + $ERROR('#3: var obj = {}; obj.splice = Array.prototype.splice; obj[4294967294] = "x"; obj.length = 1; var arr = obj.splice(4294967294,1); obj.length === 0. Actual: ' + (obj.length)); } //CHECK#4 if (obj[4294967294] !== "x") { - $ERROR('#4: var obj = {}; obj.splice = Array.prototype.splice; obj[4294967294] = "x"; obj.length = 1; var arr = obj.splice(4294967294,1); obj[4294967294] === "x". Actual: ' + (obj[4294967294])); + $ERROR('#4: var obj = {}; obj.splice = Array.prototype.splice; obj[4294967294] = "x"; obj.length = 1; var arr = obj.splice(4294967294,1); obj[4294967294] === "x". Actual: ' + (obj[4294967294])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A4_T1.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A4_T1.js index ed0ab16aa5..7754dc3f4f 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A4_T1.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A4_T1.js @@ -11,8 +11,8 @@ description: > ---*/ Array.prototype[1] = -1; -var x = [0,1]; -var arr = x.splice(1,1); +var x = [0, 1]; +var arr = x.splice(1, 1); //CHECK#1 if (arr.length !== 1) { @@ -48,8 +48,11 @@ if (x[1] !== -1) { Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; -x = {0:0, 1:1}; -var arr = x.splice(1,1); +x = { + 0: 0, + 1: 1 +}; +var arr = x.splice(1, 1); //CHECK#7 if (arr.length !== 1) { diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A4_T2.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A4_T2.js index 3c203ee251..50cf6d031c 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A4_T2.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A4_T2.js @@ -11,8 +11,8 @@ description: > ---*/ Array.prototype[1] = -1; -var x = [0,1]; -var arr = x.splice(1,1,2); +var x = [0, 1]; +var arr = x.splice(1, 1, 2); //CHECK#1 if (arr.length !== 1) { @@ -48,8 +48,11 @@ if (x[1] !== 2) { Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; -x = {0:0, 1:1}; -var arr = x.splice(1,1,2); +x = { + 0: 0, + 1: 1 +}; +var arr = x.splice(1, 1, 2); //CHECK#7 if (arr.length !== 1) { diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A4_T3.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A4_T3.js index db412def32..423c669730 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A4_T3.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A4_T3.js @@ -13,7 +13,7 @@ description: > Array.prototype[0] = -1; var x = []; x.length = 1; -var arr = x.splice(0,1); +var arr = x.splice(0, 1); //CHECK#1 if (arr.length !== 1) { @@ -46,7 +46,7 @@ Object.prototype[0] = -1; Object.prototype.length = 1; Object.prototype.splice = Array.prototype.splice; x = {}; -var arr = x.splice(0,1); +var arr = x.splice(0, 1); //CHECK#6 if (arr.length !== 1) { diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A6.1_T1.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A6.1_T1.js index 3c0ff7998a..cae54c1da1 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A6.1_T1.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A6.1_T1.js @@ -13,13 +13,13 @@ var a = [0, 1, 2]; a.splice(1, 2, 4); if (a.length !== 2) { - $ERROR("Expected a.length === 2, actually " + a.length); + $ERROR("Expected a.length === 2, actually " + a.length); } if (a[0] !== 0) { - $ERROR("Expected a[0] === 0, actually " + a[0]); + $ERROR("Expected a[0] === 0, actually " + a[0]); } if (a[1] !== 4) { - $ERROR("Expected a[1] === 4, actually " + a[1]); + $ERROR("Expected a[1] === 4, actually " + a[1]); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A6.1_T2.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A6.1_T2.js index e756767321..cf53a82359 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A6.1_T2.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A6.1_T2.js @@ -11,7 +11,7 @@ description: Array.prototype.splice throws if `length` is read-only var a = [0, 1, 2]; Object.defineProperty(a, 'length', { - writable: false + writable: false }); assert.throws(TypeError, function() { diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A6.1_T3.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A6.1_T3.js index e568f40d6c..f42c6f00fd 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A6.1_T3.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A6.1_T3.js @@ -9,15 +9,17 @@ description: Array.prototype.splice throws if `length` is read-only ---*/ var a = { - get length() { return 0; }, - splice: Array.prototype.splice + get length() { + return 0; + }, + splice: Array.prototype.splice }; try { - a.splice(1, 2, 4); - $ERROR("Expected a TypeError"); + a.splice(1, 2, 4); + $ERROR("Expected a TypeError"); } catch (e) { - if (!(e instanceof TypeError)) { - throw e; - } + if (!(e instanceof TypeError)) { + throw e; + } } diff --git a/test/built-ins/Array/prototype/splice/clamps-length-to-integer-limit.js b/test/built-ins/Array/prototype/splice/clamps-length-to-integer-limit.js index a376e42e71..24584ba48a 100644 --- a/test/built-ins/Array/prototype/splice/clamps-length-to-integer-limit.js +++ b/test/built-ins/Array/prototype/splice/clamps-length-to-integer-limit.js @@ -19,18 +19,18 @@ info: | var arrayLike = {}; -arrayLike.length = 2**53 - 1; +arrayLike.length = 2 ** 53 - 1; Array.prototype.splice.call(arrayLike); -assert.sameValue(arrayLike.length, 2**53 - 1, "Length is 2**53 - 1"); +assert.sameValue(arrayLike.length, 2 ** 53 - 1, "Length is 2**53 - 1"); -arrayLike.length = 2**53; +arrayLike.length = 2 ** 53; Array.prototype.splice.call(arrayLike); -assert.sameValue(arrayLike.length, 2**53 - 1, "Length is 2**53"); +assert.sameValue(arrayLike.length, 2 ** 53 - 1, "Length is 2**53"); -arrayLike.length = 2**53 + 2; +arrayLike.length = 2 ** 53 + 2; Array.prototype.splice.call(arrayLike); -assert.sameValue(arrayLike.length, 2**53 - 1, "Length is 2**53 + 2"); +assert.sameValue(arrayLike.length, 2 ** 53 - 1, "Length is 2**53 + 2"); arrayLike.length = Infinity; Array.prototype.splice.call(arrayLike); -assert.sameValue(arrayLike.length, 2**53 - 1, "Length is Infinity"); +assert.sameValue(arrayLike.length, 2 ** 53 - 1, "Length is Infinity"); diff --git a/test/built-ins/Array/prototype/splice/create-non-array.js b/test/built-ins/Array/prototype/splice/create-non-array.js index 0af93e8c5a..153e484622 100644 --- a/test/built-ins/Array/prototype/splice/create-non-array.js +++ b/test/built-ins/Array/prototype/splice/create-non-array.js @@ -16,7 +16,9 @@ info: | 4. If isArray is false, return ? ArrayCreate(length). ---*/ -var obj = { length: 0 }; +var obj = { + length: 0 +}; var callCount = 0; var result; Object.defineProperty(obj, 'constructor', { diff --git a/test/built-ins/Array/prototype/splice/create-species-length-exceeding-integer-limit.js b/test/built-ins/Array/prototype/splice/create-species-length-exceeding-integer-limit.js index b2f373d616..f0a5d73ed5 100644 --- a/test/built-ins/Array/prototype/splice/create-species-length-exceeding-integer-limit.js +++ b/test/built-ins/Array/prototype/splice/create-species-length-exceeding-integer-limit.js @@ -28,7 +28,7 @@ function StopSplice() {} var traps = []; var targetLength; -var array = ["no-hole", /* hole */, "stop"]; +var array = ["no-hole", /* hole */ , "stop"]; array.constructor = { [Symbol.species]: function(n) { targetLength = n; @@ -42,7 +42,7 @@ var source = new Proxy(array, allowProxyTraps({ // length property exceeding 2^53-1. if (pk === "length") - return 2**53 + 2; + return 2 ** 53 + 2; return Reflect.get(t, pk, r); }, @@ -66,11 +66,11 @@ var target = new Proxy([], allowProxyTraps({ assert.throws(StopSplice, function() { // deleteCount argument exceeding 2^53-1. - Array.prototype.splice.call(source, 0, 2**53 + 4); + Array.prototype.splice.call(source, 0, 2 ** 53 + 4); }); -assert.sameValue(targetLength, 2**53 - 1, - "length and deleteCount were correctly clamped to 2^53-1"); +assert.sameValue(targetLength, 2 ** 53 - 1, + "length and deleteCount were correctly clamped to 2^53-1"); assert.compareArray(traps, [ "source.[[Get]]:length", diff --git a/test/built-ins/Array/prototype/splice/length-and-deleteCount-exceeding-integer-limit.js b/test/built-ins/Array/prototype/splice/length-and-deleteCount-exceeding-integer-limit.js index f48e48d9e8..7734bb325a 100644 --- a/test/built-ins/Array/prototype/splice/length-and-deleteCount-exceeding-integer-limit.js +++ b/test/built-ins/Array/prototype/splice/length-and-deleteCount-exceeding-integer-limit.js @@ -30,25 +30,25 @@ var arrayLike = { "9007199254740989": "9007199254740989", "9007199254740990": "9007199254740990", "9007199254740991": "9007199254740991", - length: 2**53 + 2, + length: 2 ** 53 + 2, }; -var result = Array.prototype.splice.call(arrayLike, 9007199254740989, 2**53 + 4); +var result = Array.prototype.splice.call(arrayLike, 9007199254740989, 2 ** 53 + 4); -assert.compareArray(result, [ "9007199254740989", "9007199254740990" ], - "arrayLike['9007199254740989'] and arrayLike['9007199254740990'] are removed"); +assert.compareArray(result, ["9007199254740989", "9007199254740990"], + "arrayLike['9007199254740989'] and arrayLike['9007199254740990'] are removed"); -assert.sameValue(arrayLike.length, 2**53 - 3, - "New length is 2**53 - 3"); +assert.sameValue(arrayLike.length, 2 ** 53 - 3, + "New length is 2**53 - 3"); assert.sameValue(arrayLike["9007199254740988"], "9007199254740988", - "arrayLike['9007199254740988'] is unchanged"); + "arrayLike['9007199254740988'] is unchanged"); assert.sameValue("9007199254740989" in arrayLike, false, - "arrayLike['9007199254740989'] is removed"); + "arrayLike['9007199254740989'] is removed"); assert.sameValue("9007199254740990" in arrayLike, false, - "arrayLike['9007199254740990'] is removed"); + "arrayLike['9007199254740990'] is removed"); assert.sameValue(arrayLike["9007199254740991"], "9007199254740991", - "arrayLike['9007199254740991'] is unchanged"); + "arrayLike['9007199254740991'] is unchanged"); diff --git a/test/built-ins/Array/prototype/splice/length-exceeding-integer-limit-shrink-array.js b/test/built-ins/Array/prototype/splice/length-exceeding-integer-limit-shrink-array.js index e48f292ccb..8340b6a29e 100644 --- a/test/built-ins/Array/prototype/splice/length-exceeding-integer-limit-shrink-array.js +++ b/test/built-ins/Array/prototype/splice/length-exceeding-integer-limit-shrink-array.js @@ -34,31 +34,31 @@ var arrayLike = { /* "9007199254740989": hole */ "9007199254740990": "9007199254740990", "9007199254740991": "9007199254740991", - length: 2**53 + 2, + length: 2 ** 53 + 2, }; var result = Array.prototype.splice.call(arrayLike, 9007199254740987, 1); -assert.compareArray(result, [ "9007199254740987" ], - "arrayLike['9007199254740987'] is removed"); +assert.compareArray(result, ["9007199254740987"], + "arrayLike['9007199254740987'] is removed"); -assert.sameValue(arrayLike.length, 2**53 - 2, - "New length is 2**53 - 2"); +assert.sameValue(arrayLike.length, 2 ** 53 - 2, + "New length is 2**53 - 2"); assert.sameValue(arrayLike["9007199254740986"], "9007199254740986", - "arrayLike['9007199254740986'] is unchanged"); + "arrayLike['9007199254740986'] is unchanged"); assert.sameValue(arrayLike["9007199254740987"], "9007199254740988", - "arrayLike['9007199254740988'] is moved to arrayLike['9007199254740987']"); + "arrayLike['9007199254740988'] is moved to arrayLike['9007199254740987']"); assert.sameValue("9007199254740988" in arrayLike, false, - "arrayLike['9007199254740990'] is removed"); + "arrayLike['9007199254740990'] is removed"); assert.sameValue(arrayLike["9007199254740989"], "9007199254740990", - "arrayLike['9007199254740990'] is moved to arrayLike['9007199254740989']"); + "arrayLike['9007199254740990'] is moved to arrayLike['9007199254740989']"); assert.sameValue("9007199254740990" in arrayLike, false, - "arrayLike['9007199254740990'] is removed"); + "arrayLike['9007199254740990'] is removed"); assert.sameValue(arrayLike["9007199254740991"], "9007199254740991", - "arrayLike['9007199254740991'] is unchanged"); + "arrayLike['9007199254740991'] is unchanged"); diff --git a/test/built-ins/Array/prototype/splice/length-near-integer-limit-grow-array.js b/test/built-ins/Array/prototype/splice/length-near-integer-limit-grow-array.js index 9f0b857989..42cf6f9c50 100644 --- a/test/built-ins/Array/prototype/splice/length-near-integer-limit-grow-array.js +++ b/test/built-ins/Array/prototype/splice/length-near-integer-limit-grow-array.js @@ -31,32 +31,32 @@ var arrayLike = { "9007199254740989": "9007199254740989", /* "9007199254740990": empty */ "9007199254740991": "9007199254740991", - length: 2**53 - 2, + length: 2 ** 53 - 2, }; var result = Array.prototype.splice.call(arrayLike, 9007199254740986, 0, "new-value"); assert.compareArray(result, [], "No elements are removed"); -assert.sameValue(arrayLike.length, 2**53 - 1, "New length is 2**53 - 1"); +assert.sameValue(arrayLike.length, 2 ** 53 - 1, "New length is 2**53 - 1"); assert.sameValue(arrayLike["9007199254740985"], "9007199254740985", - "arrayLike['9007199254740985'] is unchanged"); + "arrayLike['9007199254740985'] is unchanged"); assert.sameValue(arrayLike["9007199254740986"], "new-value", - "arrayLike['9007199254740986'] contains the inserted value"); + "arrayLike['9007199254740986'] contains the inserted value"); assert.sameValue(arrayLike["9007199254740987"], "9007199254740986", - "arrayLike['9007199254740986'] is moved to arrayLike['9007199254740987']"); + "arrayLike['9007199254740986'] is moved to arrayLike['9007199254740987']"); assert.sameValue(arrayLike["9007199254740988"], "9007199254740987", - "arrayLike['9007199254740987'] is moved to arrayLike['9007199254740988']"); + "arrayLike['9007199254740987'] is moved to arrayLike['9007199254740988']"); assert.sameValue("9007199254740989" in arrayLike, false, - "arrayLike['9007199254740989'] is removed"); + "arrayLike['9007199254740989'] is removed"); assert.sameValue(arrayLike["9007199254740990"], "9007199254740989", - "arrayLike['9007199254740989'] is moved to arrayLike['9007199254740990']"); + "arrayLike['9007199254740989'] is moved to arrayLike['9007199254740990']"); assert.sameValue(arrayLike["9007199254740991"], "9007199254740991", - "arrayLike['9007199254740991'] is unchanged"); + "arrayLike['9007199254740991'] is unchanged"); diff --git a/test/built-ins/Array/prototype/splice/set_length_no_args.js b/test/built-ins/Array/prototype/splice/set_length_no_args.js index a2c04e0fd8..25dbc37efb 100644 --- a/test/built-ins/Array/prototype/splice/set_length_no_args.js +++ b/test/built-ins/Array/prototype/splice/set_length_no_args.js @@ -14,7 +14,8 @@ es5id: 15.4.4.12 es6id: 22.1.3.25 ---*/ -var getCallCount = 0, setCallCount = 0; +var getCallCount = 0, + setCallCount = 0; var lengthValue; var obj = { diff --git a/test/built-ins/Array/prototype/splice/throws-if-integer-limit-exceeded.js b/test/built-ins/Array/prototype/splice/throws-if-integer-limit-exceeded.js index 883d0508f3..447eb4d0a5 100644 --- a/test/built-ins/Array/prototype/splice/throws-if-integer-limit-exceeded.js +++ b/test/built-ins/Array/prototype/splice/throws-if-integer-limit-exceeded.js @@ -19,17 +19,17 @@ info: | var arrayLike = {}; -arrayLike.length = 2**53 - 1; +arrayLike.length = 2 ** 53 - 1; assert.throws(TypeError, function() { Array.prototype.splice.call(arrayLike, 0, 0, null); }, "Length is 2**53 - 1"); -arrayLike.length = 2**53; +arrayLike.length = 2 ** 53; assert.throws(TypeError, function() { Array.prototype.splice.call(arrayLike, 0, 0, null); }, "Length is 2**53"); -arrayLike.length = 2**53 + 2; +arrayLike.length = 2 ** 53 + 2; assert.throws(TypeError, function() { Array.prototype.splice.call(arrayLike, 0, 0, null); }, "Length is 2**53 + 2"); diff --git a/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A1_T1.js b/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A1_T1.js index 1aaa20fc0b..c2f7a29a5b 100644 --- a/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A1_T1.js +++ b/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A1_T1.js @@ -13,7 +13,11 @@ description: it is the function that should be invoked ---*/ var n = 0; -var obj = {toLocaleString: function() {n++}}; +var obj = { + toLocaleString: function() { + n++ + } +}; var arr = [undefined, obj, null, obj, obj]; arr.toLocaleString(); diff --git a/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A3_T1.js b/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A3_T1.js index fd32d7702d..7bf7a44d53 100644 --- a/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A3_T1.js +++ b/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A3_T1.js @@ -10,7 +10,11 @@ description: "[[Prototype]] of Array instance is Array.prototype" //CHECK#1 var n = 0; -var obj = {toLocaleString: function() {n++}}; +var obj = { + toLocaleString: function() { + n++ + } +}; Array.prototype[1] = obj; var x = [obj]; x.length = 2; diff --git a/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T1.js b/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T1.js index dbcce93100..29ce4d673f 100644 --- a/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T1.js +++ b/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T1.js @@ -14,7 +14,7 @@ description: If Result(2) is zero, return the empty string var x = new Array(); if (x.toString() !== x.join()) { $ERROR('#1.1: x = new Array(); x.toString() === x.join(). Actual: ' + (x.toString())); -} else { +} else { if (x.toString() !== "") { $ERROR('#1.2: x = new Array(); x.toString() === "". Actual: ' + (x.toString())); } diff --git a/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T2.js b/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T2.js index 62a82f8b16..29e4177343 100644 --- a/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T2.js +++ b/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T2.js @@ -15,7 +15,7 @@ description: > ---*/ //CHECK#1 -var x = new Array(0,1,2,3); +var x = new Array(0, 1, 2, 3); if (x.toString() !== x.join()) { $ERROR('#1.1: x = new Array(0,1,2,3); x.toString() === x.join(). Actual: ' + (x.toString())); } else { @@ -37,7 +37,7 @@ if (x.toString() !== x.join()) { } //CHECK#3 -x = Array(undefined,1,null,3); +x = Array(undefined, 1, null, 3); if (x.toString() !== x.join()) { $ERROR('#3.1: x = Array(undefined,1,null,3); x.toString() === x.join(). Actual: ' + (x.toString())); } else { diff --git a/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T3.js b/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T3.js index 96ad808728..c3c93e46c8 100644 --- a/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T3.js +++ b/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T3.js @@ -11,7 +11,7 @@ description: Operator use ToString from array arguments ---*/ //CHECK#0 -var x = new Array("","",""); +var x = new Array("", "", ""); if (x.toString() !== x.join()) { $ERROR('#0.1: var x = new Array("","",""); x.toString() === x.join(). Actual: ' + (x.toString())); } else { @@ -21,7 +21,7 @@ if (x.toString() !== x.join()) { } //CHECK#1 -var x = new Array("\\","\\","\\"); +var x = new Array("\\", "\\", "\\"); if (x.toString() !== x.join()) { $ERROR('#1.1: var x = new Array("\\","\\","\\"); x.toString() === x.join(). Actual: ' + (x.toString())); } else { @@ -41,51 +41,51 @@ if (x.toString() !== x.join()) { } //CHECK#3 -var x = new Array(true,true,true); +var x = new Array(true, true, true); if (x.toString() !== x.join()) { - $ERROR('#3.1: var x = new Array(true,true,true); x.toString(true,true,true) === x.join(). Actual: ' + (x.toString(true,true,true))); + $ERROR('#3.1: var x = new Array(true,true,true); x.toString(true,true,true) === x.join(). Actual: ' + (x.toString(true, true, true))); } else { if (x.toString() !== "true,true,true") { - $ERROR('#3.2: var x = new Array(true,true,true); x.toString(true,true,true) === "true,true,true". Actual: ' + (x.toString(true,true,true))); + $ERROR('#3.2: var x = new Array(true,true,true); x.toString(true,true,true) === "true,true,true". Actual: ' + (x.toString(true, true, true))); } } //CHECK#4 -var x = new Array(null,null,null); +var x = new Array(null, null, null); if (x.toString() !== x.join()) { - $ERROR('#4.1: var x = new Array(null,null,null); x.toString(null,null,null) === x.join(). Actual: ' + (x.toString(null,null,null))); + $ERROR('#4.1: var x = new Array(null,null,null); x.toString(null,null,null) === x.join(). Actual: ' + (x.toString(null, null, null))); } else { if (x.toString() !== ",,") { - $ERROR('#4.2: var x = new Array(null,null,null); x.toString(null,null,null) === ",,". Actual: ' + (x.toString(null,null,null))); + $ERROR('#4.2: var x = new Array(null,null,null); x.toString(null,null,null) === ",,". Actual: ' + (x.toString(null, null, null))); } } //CHECK#5 -var x = new Array(undefined,undefined,undefined); +var x = new Array(undefined, undefined, undefined); if (x.toString() !== x.join()) { - $ERROR('#5.1: var x = new Array(undefined,undefined,undefined); x.toString(undefined,undefined,undefined) === x.join(). Actual: ' + (x.toString(undefined,undefined,undefined))); + $ERROR('#5.1: var x = new Array(undefined,undefined,undefined); x.toString(undefined,undefined,undefined) === x.join(). Actual: ' + (x.toString(undefined, undefined, undefined))); } else { if (x.toString() !== ",,") { - $ERROR('#5.2: var x = new Array(undefined,undefined,undefined); x.toString(undefined,undefined,undefined) === ",,". Actual: ' + (x.toString(undefined,undefined,undefined))); + $ERROR('#5.2: var x = new Array(undefined,undefined,undefined); x.toString(undefined,undefined,undefined) === ",,". Actual: ' + (x.toString(undefined, undefined, undefined))); } } //CHECK#6 -var x = new Array(Infinity,Infinity,Infinity); +var x = new Array(Infinity, Infinity, Infinity); if (x.toString() !== x.join()) { - $ERROR('#6.1: var x = new Array(Infinity,Infinity,Infinity); x.toString(Infinity,Infinity,Infinity) === x.join(). Actual: ' + (x.toString(Infinity,Infinity,Infinity))); + $ERROR('#6.1: var x = new Array(Infinity,Infinity,Infinity); x.toString(Infinity,Infinity,Infinity) === x.join(). Actual: ' + (x.toString(Infinity, Infinity, Infinity))); } else { if (x.toString() !== "Infinity,Infinity,Infinity") { - $ERROR('#6.2: var x = new Array(Infinity,Infinity,Infinity); x.toString(Infinity,Infinity,Infinity) === "Infinity,Infinity,Infinity". Actual: ' + (x.toString(Infinity,Infinity,Infinity))); + $ERROR('#6.2: var x = new Array(Infinity,Infinity,Infinity); x.toString(Infinity,Infinity,Infinity) === "Infinity,Infinity,Infinity". Actual: ' + (x.toString(Infinity, Infinity, Infinity))); } } //CHECK#7 -var x = new Array(NaN,NaN,NaN); +var x = new Array(NaN, NaN, NaN); if (x.toString() !== x.join()) { - $ERROR('#7.1: var x = new Array(NaN,NaN,NaN); x.toString(NaN,NaN,NaN) === x.join(). Actual: ' + (x.toString(NaN,NaN,NaN))); + $ERROR('#7.1: var x = new Array(NaN,NaN,NaN); x.toString(NaN,NaN,NaN) === x.join(). Actual: ' + (x.toString(NaN, NaN, NaN))); } else { if (x.toString() !== "NaN,NaN,NaN") { - $ERROR('#7.2: var x = new Array(NaN,NaN,NaN); x.toString(NaN,NaN,NaN) === "NaN,NaN,NaN". Actual: ' + (x.toString(NaN,NaN,NaN))); + $ERROR('#7.2: var x = new Array(NaN,NaN,NaN); x.toString(NaN,NaN,NaN) === "NaN,NaN,NaN". Actual: ' + (x.toString(NaN, NaN, NaN))); } } diff --git a/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T4.js b/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T4.js index 1471739914..02045cb350 100644 --- a/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T4.js +++ b/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T4.js @@ -11,7 +11,11 @@ description: If Type(value) is Object, evaluate ToPrimitive(value, String) ---*/ //CHECK#1 -var object = {valueOf: function() {return "+"}}; +var object = { + valueOf: function() { + return "+" + } +}; var x = new Array(object); if (x.toString() !== x.join()) { $ERROR('#1.1: var object = {valueOf: function() {return "+"}} var x = new Array(object); x.toString() === x.join(). Actual: ' + (x.toString())); @@ -22,7 +26,14 @@ if (x.toString() !== x.join()) { } //CHECK#2 -var object = {valueOf: function() {return "+"}, toString: function() {return "*"}}; +var object = { + valueOf: function() { + return "+" + }, + toString: function() { + return "*" + } +}; var x = new Array(object); if (x.toString() !== x.join()) { $ERROR('#2.1: var object = {valueOf: function() {return "+"}, toString: function() {return x.join()}} var x = new Array(object); x.toString() === "*". Actual: ' + (x.toString())); @@ -33,7 +44,14 @@ if (x.toString() !== x.join()) { } //CHECK#3 -var object = {valueOf: function() {return "+"}, toString: function() {return {}}}; +var object = { + valueOf: function() { + return "+" + }, + toString: function() { + return {} + } +}; var x = new Array(object); if (x.toString() !== x.join()) { $ERROR('#3.1: var object = {valueOf: function() {return x.join()}, toString: function() {return {}}} var x = new Array(object); x.toString() === "+". Actual: ' + (x.toString())); @@ -45,7 +63,14 @@ if (x.toString() !== x.join()) { //CHECK#4 try { - var object = {valueOf: function() {throw "error"}, toString: function() {return "*"}}; + var object = { + valueOf: function() { + throw "error" + }, + toString: function() { + return "*" + } + }; var x = new Array(object); if (x.toString() !== x.join()) { $ERROR('#4.1: var object = {valueOf: function() {throw "error"}, toString: function() {return x.join()}} var x = new Array(object); x.toString() === "*". Actual: ' + (x.toString())); @@ -64,7 +89,11 @@ catch (e) { } //CHECK#5 -var object = {toString: function() {return "*"}}; +var object = { + toString: function() { + return "*" + } +}; var x = new Array(object); if (x.toString() !== x.join()) { $ERROR('#5.1: var object = {toString: function() {return x.join()}} var x = new Array(object); x.toString() === "*". Actual: ' + (x.toString())); @@ -75,7 +104,14 @@ if (x.toString() !== x.join()) { } //CHECK#6 -var object = {valueOf: function() {return {}}, toString: function() {return "*"}} +var object = { + valueOf: function() { + return {} + }, + toString: function() { + return "*" + } +} var x = new Array(object); if (x.toString() !== x.join()) { $ERROR('#6.1: var object = {valueOf: function() {return {}}, toString: function() {return x.join()}} var x = new Array(object); x.toString() === "*". Actual: ' + (x.toString())); @@ -87,7 +123,14 @@ if (x.toString() !== x.join()) { //CHECK#7 try { - var object = {valueOf: function() {return "+"}, toString: function() {throw "error"}}; + var object = { + valueOf: function() { + return "+" + }, + toString: function() { + throw "error" + } + }; var x = new Array(object); x.toString(); $ERROR('#7.1: var object = {valueOf: function() {return "+"}, toString: function() {throw "error"}} var x = new Array(object); x.toString() throw "error". Actual: ' + (x.toString())); @@ -100,7 +143,14 @@ catch (e) { //CHECK#8 try { - var object = {valueOf: function() {return {}}, toString: function() {return {}}}; + var object = { + valueOf: function() { + return {} + }, + toString: function() { + return {} + } + }; var x = new Array(object); x.toString(); $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}} var x = new Array(object); x.toString() throw TypeError. Actual: ' + (x.toString())); diff --git a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A2_T1.js b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A2_T1.js index 325a8aded2..f45be1170a 100644 --- a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A2_T1.js +++ b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A2_T1.js @@ -19,19 +19,19 @@ obj.unshift = Array.prototype.unshift; if (obj.length !== undefined) { $ERROR('#0: var obj = {}; obj.length === undefined. Actual: ' + (obj.length)); } else { - //CHECK#1 - var unshift = obj.unshift(-1); - if (unshift !== 1) { - $ERROR('#1: var obj = {}; obj.unshift = Array.prototype.unshift; obj.unshift(-1) === 1. Actual: ' + (unshift)); - } - //CHECK#2 - if (obj.length !== 1) { - $ERROR('#2: var obj = {}; obj.unshift = Array.prototype.unshift; obj.unshift(-1); obj.length === 1. Actual: ' + (obj.length)); - } - //CHECK#3 - if (obj["0"] !== -1) { - $ERROR('#3: var obj = {}; obj.unshift = Array.prototype.unshift; obj.unshift(-1); obj["0"] === -1. Actual: ' + (obj["0"])); - } + //CHECK#1 + var unshift = obj.unshift(-1); + if (unshift !== 1) { + $ERROR('#1: var obj = {}; obj.unshift = Array.prototype.unshift; obj.unshift(-1) === 1. Actual: ' + (unshift)); + } + //CHECK#2 + if (obj.length !== 1) { + $ERROR('#2: var obj = {}; obj.unshift = Array.prototype.unshift; obj.unshift(-1); obj.length === 1. Actual: ' + (obj.length)); + } + //CHECK#3 + if (obj["0"] !== -1) { + $ERROR('#3: var obj = {}; obj.unshift = Array.prototype.unshift; obj.unshift(-1); obj["0"] === -1. Actual: ' + (obj["0"])); + } } //CHECK#4 diff --git a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A2_T3.js b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A2_T3.js index c169a2c06f..979bc566b2 100644 --- a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A2_T3.js +++ b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A2_T3.js @@ -16,21 +16,39 @@ var obj = {}; obj.unshift = Array.prototype.unshift; //CHECK#1 -obj.length = {valueOf: function() {return 3}}; +obj.length = { + valueOf: function() { + return 3 + } +}; var unshift = obj.unshift(); if (unshift !== 3) { $ERROR('#1: obj.length = {valueOf: function() {return 3}} obj.unshift() === 3. Actual: ' + (unshift)); } //CHECK#2 -obj.length = {valueOf: function() {return 3}, toString: function() {return 1}}; +obj.length = { + valueOf: function() { + return 3 + }, + toString: function() { + return 1 + } +}; var unshift = obj.unshift(); if (unshift !== 3) { $ERROR('#0: obj.length = {valueOf: function() {return 3}, toString: function() {return 1}} obj.unshift() === 3. Actual: ' + (unshift)); } //CHECK#3 -obj.length = {valueOf: function() {return 3}, toString: function() {return {}}}; +obj.length = { + valueOf: function() { + return 3 + }, + toString: function() { + return {} + } +}; var unshift = obj.unshift(); if (unshift !== 3) { $ERROR('#1: obj.length = {valueOf: function() {return 3}, toString: function() {return {}}} obj.unshift() === 3. Actual: ' + (unshift)); @@ -38,7 +56,14 @@ if (unshift !== 3) { //CHECK#4 try { - obj.length = {valueOf: function() {return 3}, toString: function() {throw "error"}}; + obj.length = { + valueOf: function() { + return 3 + }, + toString: function() { + throw "error" + } + }; var unshift = obj.unshift(); if (unshift !== 3) { $ERROR('#4.1: obj.length = {valueOf: function() {return 3}, toString: function() {throw "error"}}; obj.unshift() === ",". Actual: ' + (unshift)); @@ -53,14 +78,25 @@ catch (e) { } //CHECK#5 -obj.length = {toString: function() {return 1}}; +obj.length = { + toString: function() { + return 1 + } +}; var unshift = obj.unshift(); if (unshift !== 1) { $ERROR('#5: obj.length = {toString: function() {return 1}} obj.unshift() === 1. Actual: ' + (unshift)); } //CHECK#6 -obj.length = {valueOf: function() {return {}}, toString: function() {return 1}} +obj.length = { + valueOf: function() { + return {} + }, + toString: function() { + return 1 + } +} var unshift = obj.unshift(); if (unshift !== 1) { $ERROR('#6: obj.length = {valueOf: function() {return {}}, toString: function() {return 1}} obj.unshift() === 1. Actual: ' + (unshift)); @@ -69,7 +105,14 @@ if (unshift !== 1) { //CHECK#7 try { - obj.length = {valueOf: function() {throw "error"}, toString: function() {return 1}}; + obj.length = { + valueOf: function() { + throw "error" + }, + toString: function() { + return 1 + } + }; var unshift = obj.unshift(); $ERROR('#7.1: obj.length = {valueOf: function() {throw "error"}, toString: function() {return 1}}; obj.unshift() throw "error". Actual: ' + (unshift)); } @@ -82,7 +125,14 @@ catch (e) { //CHECK#8 try { - obj.length = {valueOf: function() {return {}}, toString: function() {return {}}}; + obj.length = { + valueOf: function() { + return {} + }, + toString: function() { + return {} + } + }; var unshift = obj.unshift(); $ERROR('#8.1: obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.unshift() throw TypeError. Actual: ' + (unshift)); } diff --git a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A3_T2.js b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A3_T2.js index fe67c11de3..fcbbe10dd7 100644 --- a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A3_T2.js +++ b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A3_T2.js @@ -26,20 +26,20 @@ if (obj.length !== 3) { //CHECK#3 if (obj[0] !== "x") { - $ERROR('#3: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = ""; obj.length = -4294967295; obj.unshift("x", "y", "z"); obj[0] === "x". Actual: ' + (obj[0])); + $ERROR('#3: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = ""; obj.length = -4294967295; obj.unshift("x", "y", "z"); obj[0] === "x". Actual: ' + (obj[0])); } //CHECK#4 if (obj[1] !== "y") { - $ERROR('#4: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = ""; obj.length = -4294967295; obj.unshift("x", "y", "z"); obj[1] === "y". Actual: ' + (obj[1])); + $ERROR('#4: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = ""; obj.length = -4294967295; obj.unshift("x", "y", "z"); obj[1] === "y". Actual: ' + (obj[1])); } //CHECK#5 if (obj[2] !== "z") { - $ERROR('#5: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = ""; obj.length = -4294967295; obj.unshift("x", "y", "z"); obj[2] === "z". Actual: ' + (obj[2])); + $ERROR('#5: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = ""; obj.length = -4294967295; obj.unshift("x", "y", "z"); obj[2] === "z". Actual: ' + (obj[2])); } //CHECK#6 if (obj[3] !== undefined) { - $ERROR('#6: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = ""; obj.length = -4294967295; obj.unshift("x", "y", "z"); obj[3] === undefined. Actual: ' + (obj[3])); + $ERROR('#6: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = ""; obj.length = -4294967295; obj.unshift("x", "y", "z"); obj[3] === undefined. Actual: ' + (obj[3])); } diff --git a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A4_T1.js b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A4_T1.js index 758fbb3386..0235e42bbb 100644 --- a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A4_T1.js +++ b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A4_T1.js @@ -40,7 +40,9 @@ if (x[0] !== -1) { Object.prototype[0] = -1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; -x = {0:1}; +x = { + 0: 1 +}; //CHECK#5 var unshift = x.unshift(0); diff --git a/test/built-ins/Array/prototype/unshift/clamps-to-integer-limit.js b/test/built-ins/Array/prototype/unshift/clamps-to-integer-limit.js index 4818d2ab82..9f2e141845 100644 --- a/test/built-ins/Array/prototype/unshift/clamps-to-integer-limit.js +++ b/test/built-ins/Array/prototype/unshift/clamps-to-integer-limit.js @@ -15,18 +15,18 @@ info: | var arrayLike = {}; -arrayLike.length = 2**53 - 1; +arrayLike.length = 2 ** 53 - 1; Array.prototype.unshift.call(arrayLike); -assert.sameValue(arrayLike.length, 2**53 - 1, "Length is 2**53 - 1"); +assert.sameValue(arrayLike.length, 2 ** 53 - 1, "Length is 2**53 - 1"); -arrayLike.length = 2**53; +arrayLike.length = 2 ** 53; Array.prototype.unshift.call(arrayLike); -assert.sameValue(arrayLike.length, 2**53 - 1, "Length is 2**53"); +assert.sameValue(arrayLike.length, 2 ** 53 - 1, "Length is 2**53"); -arrayLike.length = 2**53 + 2; +arrayLike.length = 2 ** 53 + 2; Array.prototype.unshift.call(arrayLike); -assert.sameValue(arrayLike.length, 2**53 - 1, "Length is 2**53 + 2"); +assert.sameValue(arrayLike.length, 2 ** 53 - 1, "Length is 2**53 + 2"); arrayLike.length = Infinity; Array.prototype.unshift.call(arrayLike); -assert.sameValue(arrayLike.length, 2**53 - 1, "Length is Infinity"); +assert.sameValue(arrayLike.length, 2 ** 53 - 1, "Length is Infinity"); diff --git a/test/built-ins/Array/prototype/unshift/length-near-integer-limit.js b/test/built-ins/Array/prototype/unshift/length-near-integer-limit.js index bd4ad9aa66..5dff513e40 100644 --- a/test/built-ins/Array/prototype/unshift/length-near-integer-limit.js +++ b/test/built-ins/Array/prototype/unshift/length-near-integer-limit.js @@ -26,7 +26,7 @@ info: | function StopUnshift() {} var arrayLike = { - get "9007199254740986"() { + get "9007199254740986" () { throw new StopUnshift(); }, "9007199254740987": "9007199254740987", @@ -34,27 +34,27 @@ var arrayLike = { "9007199254740989": "9007199254740989", /* "9007199254740990": empty */ "9007199254740991": "9007199254740991", - length: 2**53 - 2 + length: 2 ** 53 - 2 }; assert.throws(StopUnshift, function() { Array.prototype.unshift.call(arrayLike, null); }); -assert.sameValue(arrayLike.length, 2**53 - 2, - "arrayLike.length is unchanged"); +assert.sameValue(arrayLike.length, 2 ** 53 - 2, + "arrayLike.length is unchanged"); assert.sameValue(arrayLike["9007199254740987"], "9007199254740987", - "arrayLike['9007199254740987'] is unchanged"); + "arrayLike['9007199254740987'] is unchanged"); assert.sameValue(arrayLike["9007199254740988"], "9007199254740987", - "arrayLike['9007199254740988'] is replaced with arrayLike['9007199254740987']"); + "arrayLike['9007199254740988'] is replaced with arrayLike['9007199254740987']"); assert.sameValue("9007199254740989" in arrayLike, false, - "arrayLike['9007199254740989'] is removed"); + "arrayLike['9007199254740989'] is removed"); assert.sameValue(arrayLike["9007199254740990"], "9007199254740989", - "arrayLike['9007199254740990'] is replaced with arrayLike['9007199254740989']"); + "arrayLike['9007199254740990'] is replaced with arrayLike['9007199254740989']"); assert.sameValue(arrayLike["9007199254740991"], "9007199254740991", - "arrayLike['9007199254740991'] is unchanged"); + "arrayLike['9007199254740991'] is unchanged"); diff --git a/test/built-ins/Array/prototype/unshift/throws-if-integer-limit-exceeded.js b/test/built-ins/Array/prototype/unshift/throws-if-integer-limit-exceeded.js index a6e0acc306..9ad723eca5 100644 --- a/test/built-ins/Array/prototype/unshift/throws-if-integer-limit-exceeded.js +++ b/test/built-ins/Array/prototype/unshift/throws-if-integer-limit-exceeded.js @@ -16,17 +16,17 @@ info: | var arrayLike = {}; -arrayLike.length = 2**53 - 1; +arrayLike.length = 2 ** 53 - 1; assert.throws(TypeError, function() { Array.prototype.unshift.call(arrayLike, null); }, "Length is 2**53 - 1"); -arrayLike.length = 2**53; +arrayLike.length = 2 ** 53; assert.throws(TypeError, function() { Array.prototype.unshift.call(arrayLike, null); }, "Length is 2**53"); -arrayLike.length = 2**53 + 2; +arrayLike.length = 2 ** 53 + 2; assert.throws(TypeError, function() { Array.prototype.unshift.call(arrayLike, null); }, "Length is 2**53 + 2"); diff --git a/test/built-ins/Array/prototype/values/iteration-mutable.js b/test/built-ins/Array/prototype/values/iteration-mutable.js index 15a0170d14..74142c4b59 100644 --- a/test/built-ins/Array/prototype/values/iteration-mutable.js +++ b/test/built-ins/Array/prototype/values/iteration-mutable.js @@ -20,7 +20,7 @@ var result; array.push('a'); result = iterator.next(); -assert.sameValue(result.done, false , 'First result `done` flag'); +assert.sameValue(result.done, false, 'First result `done` flag'); assert.sameValue(result.value, 'a', 'First result `value`'); result = iterator.next();