Changeset 184871 in webkit for trunk/Source/JavaScriptCore/tests


Ignore:
Timestamp:
May 26, 2015, 2:17:22 PM (10 years ago)
Author:
Yusuke Suzuki
Message:

Reflect nits for r184863
https://bugs.webkit.org/show_bug.cgi?id=145107

Reviewed by Darin Adler.

  1. Added the copyright line.
  2. Added an optional argument (/*, end */). To do so, fixed generate-js-builtins.
  3. Dropped the unnecessary variable thisValue.
  4. Fix the type error messages. This is also found in StringIterator.prototype.js.
  5. Added tests for 0 arguments.
  • builtins/Array.prototype.js:

(copyWithin):

  • builtins/StringIterator.prototype.js:

(next):

  • generate-js-builtins:
  • tests/stress/array-copywithin.js:
  • tests/stress/string-iterators.js:
Location:
trunk/Source/JavaScriptCore/tests/stress
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/tests/stress/array-copywithin.js

    r184863 r184871  
    3535shouldBe(Array.prototype.hasOwnProperty('copyWithin'), true);
    3636shouldBe(JSON.stringify(Object.getOwnPropertyDescriptor(Array.prototype, 'copyWithin')), '{"writable":true,"enumerable":false,"configurable":true}');
     37
     38// 0 arguments. (it is equivalent to copyWithin(0))
     39shouldBeArray([1, 2, 3, 4, 5].copyWithin(), [1, 2, 3, 4, 5]);
     40shouldBeArray([].copyWithin(), []);
    3741
    3842// 1 arguments.
     
    235239shouldThrow(function () {
    236240    Array.prototype.copyWithin.call(undefined);
    237 }, 'TypeError: Array.copyWithin requires that |this| be not null or undefined');
     241}, 'TypeError: Array.copyWithin requires that |this| not be null or undefined');
    238242
    239243shouldThrow(function () {
    240244    Array.prototype.copyWithin.call(null);
    241 }, 'TypeError: Array.copyWithin requires that |this| be not null or undefined');
     245}, 'TypeError: Array.copyWithin requires that |this| not be null or undefined');
    242246
    243247
  • trunk/Source/JavaScriptCore/tests/stress/string-iterators.js

    r182118 r184871  
    183183    var message = 'TypeError: %StringIteratorPrototype%.next requires that |this| be a String Iterator instance';
    184184    if (primitive == null)
    185         message = 'TypeError: %StringIteratorPrototype%.next requires that |this| be not null or undefined'
     185        message = 'TypeError: %StringIteratorPrototype%.next requires that |this| not be null or undefined'
    186186    if (String(didThrow) !== message)
    187187        throw "Error: bad error thrown: " + didThrow;
Note: See TracChangeset for help on using the changeset viewer.