1 of 11

Test262 Updates

TC39 2019-10

Test262 Updates

@bocoup

bocoup.com

2 of 11

Coverage

  • WeakRefs + FinalizationGroups
    • Async GC tests, w/ graceful end
    • Graceful === non-deterministic end, non support means non failure
  • Top Level Await
  • Optional Chaining

Test262 Updates

@bocoup

bocoup.com

3 of 11

Coverage

  • Intl.NumberFormat
  • More tests for Class Fields
  • RegExp Match indices
  • *

Test262 Updates

@bocoup

bocoup.com

4 of 11

Oddities #1

var stringSet;

class C {

static get 'def\u0061ult'() { return 'get string'; }

static set 'def\u0061ult'(param) { stringSet = param; }

}

assert.sameValue(C['default'], 'get string');

C['default'] = 'set string';

assert.sameValue(stringSet, 'set string');

`default` identifier in accessor names

Test262 Updates

@bocoup

bocoup.com

5 of 11

Oddities #2

var y = { prot\u0065cted: x } = { protected: 42 };

assert.sameValue(x, 42, 'property exists');

assert.sameValue(y['protected'], 42, 'assignment successful');

��// Parse SyntaxError:�var z = { prot\u0065cted } = { protected: 42 };

Valid identifier names also listed as reserved words

Test262 Updates

@bocoup

bocoup.com

6 of 11

Oddities #3

[{ set prop(val) { console.log(val); } }.prop = 12 ] = [ 1 ];

({ obj: { set prop(val) { console.log(val); } }.prop = 12 } = { obj: 1 });

({ obj: { set prop(val) { console.log(val); } }.prop } = { obj: 1 });

[{ set prop(val) { console.log(val); } }.prop ] = [ 1 ];

dstr-assignment tests for object literal accessor property targets

Test262 Updates

@bocoup

bocoup.com

7 of 11

Oddities #4

Promise.prototype.y = 43;

var res = await Promise.reject(undefined)?.y;

assert.sameValue(res, 43);

Async Optional Chaining

Test262 Updates

@bocoup

bocoup.com

8 of 11

Oddities #5

var x;

do break ; while (0) x = 42;

assert.sameValue(x, 42);

x = 0;

do do do ; while (x) while (x) while (x) x = 39;

assert.sameValue(x, 39);

ASI after do-while

Test262 Updates

@bocoup

bocoup.com

9 of 11

Mike's auditing

  • Finding and removing false positives
  • Consolidation of harness files
  • Removing duplicated tests
  • Correcting errors in metadata
  • Improving the linter
  • Fixing tests in general

Test262 Updates

@bocoup

bocoup.com

10 of 11

Test262.report

  • User Customized Embed Reports
  • Integration with external pages!
    • More coming soon!

Test262 Updates

@bocoup

bocoup.com

11 of 11

Questions?

Test262 Updates

@bocoup

bocoup.com