Changeset 183758 in webkit


Ignore:
Timestamp:
May 4, 2015 12:22:38 PM (9 years ago)
Author:
rniwa@webkit.org
Message:

ES6 classes: Invalid test for constructor property
https://bugs.webkit.org/show_bug.cgi?id=144278

Reviewed by Darin Adler.

Fixed the test. The constructors of two distinct classes should definitely be distinct.

  • js/class-syntax-default-constructor-expected.txt:
  • js/script-tests/class-syntax-default-constructor.js:
Location:
trunk/LayoutTests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r183757 r183758  
     12015-05-04  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        ES6 classes: Invalid test for constructor property
     4        https://bugs.webkit.org/show_bug.cgi?id=144278
     5
     6        Reviewed by Darin Adler.
     7
     8        Fixed the test. The constructors of two distinct classes should definitely be distinct.
     9
     10        * js/class-syntax-default-constructor-expected.txt:
     11        * js/script-tests/class-syntax-default-constructor.js:
     12
    1132015-05-04  Ryosuke Niwa  <rniwa@webkit.org>
    214
  • trunk/LayoutTests/js/class-syntax-default-constructor-expected.txt

    r181973 r183758  
    1212PASS B.prototype.constructor.name is "B"
    1313PASS A !== B is true
    14 FAIL A.prototype.constructor should be function B() { super(...arguments); }. Was function A() { }.
     14PASS A.prototype.constructor is not B.prototype.constructor
    1515PASS new (class extends (class { constructor(a, b) { return [a, b]; } }) {})(1, 2) is [1, 2]
    1616PASS successfullyParsed is true
  • trunk/LayoutTests/js/script-tests/class-syntax-default-constructor.js

    r181973 r183758  
    1313shouldBe('B.prototype.constructor.name', '"B"');
    1414shouldBeTrue('A !== B');
    15 shouldBe('A.prototype.constructor', 'B.prototype.constructor');
     15shouldNotBe('A.prototype.constructor', 'B.prototype.constructor');
    1616shouldBe('new (class extends (class { constructor(a, b) { return [a, b]; } }) {})(1, 2)', '[1, 2]');
    1717
Note: See TracChangeset for help on using the changeset viewer.