mirror of https://github.com/tc39/test262.git
Fix various test issues (#840)
test/annexB/built-ins/Date/prototype/setYear/time-clip.js test/built-ins/Date/prototype/setFullYear/new-value-time-clip.js test/built-ins/Date/prototype/setMonth/new-value-time-clip.js - Don't try to test time-clip at the end points, because this is near impossible to get right (needs to consider time zone offset, dst, local mean time because of Africa/Monrovia, etc.). test/built-ins/DataView/prototype/setFloat64/detached-buffer-after-toindex-byteoffset.js test/built-ins/DataView/prototype/setInt16/detached-buffer-after-toindex-byteoffset.js - Wasn't update to expect RangeError test/built-ins/Function/internals/Construct/derived-this-uninitialized-realm.js - Change ClassDeclaration -> ClassExpression to get completion value test/built-ins/Function/prototype/toString/AsyncFunction.js - Add missing \n in expected string - Also fixed in gh-847 test/built-ins/global/global-object.js - Add 'var' to make test pass in strict-mode test/language/block-scope/syntax/redeclaration-in-block/attempt-to-redeclare-function-declaration-with-function-declaration.js - This is allowed in sloppy mode when Annex B is implemented test/language/expressions/async-generators/expression-yield-as-statement.js - Fix calls to then() test/language/module-code/namespace/internals/own-property-keys-binding-types.js test/language/module-code/namespace/internals/own-property-keys-sort.js - Tests weren't updated after removal of @@iterator from module namespace objects test/language/module-code/namespace/internals/set-prototype-of-null.js - Fix syntax error test/language/statements/async-function/early-errors-no-async-generator.js - No longer valid now that async iteration proposal is at stage 3
This commit is contained in:
parent
4203261ba2
commit
204266794c
|
@ -15,7 +15,7 @@ info: |
|
|||
|
||||
var date;
|
||||
|
||||
date = new Date(1970, 8, 12, 20, 0, 0, 0);
|
||||
date = new Date(1970, 8, 10, 0, 0, 0, 0);
|
||||
|
||||
assert.notSameValue(
|
||||
date.setYear(275760), NaN, 'method return value (valid date)'
|
||||
|
@ -24,7 +24,7 @@ assert.notSameValue(
|
|||
date.valueOf(), NaN, '[[DateValue]] internal slot (valid date)'
|
||||
);
|
||||
|
||||
date = new Date(1970, 8, 12, 20, 0, 0, 1);
|
||||
date = new Date(1970, 8, 14, 0, 0, 0, 0);
|
||||
|
||||
assert.sameValue(
|
||||
date.setYear(275760), NaN, 'method return value (invalid date)'
|
||||
|
|
|
@ -28,7 +28,7 @@ var sample = new DataView(buffer, 0);
|
|||
|
||||
$DETACHBUFFER(buffer);
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
assert.throws(RangeError, function() {
|
||||
sample.setFloat64(Infinity, 0);
|
||||
}, "Infinity");
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ var sample = new DataView(buffer, 0);
|
|||
|
||||
$DETACHBUFFER(buffer);
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
assert.throws(RangeError, function() {
|
||||
sample.setInt16(Infinity, 0);
|
||||
}, "Infinity");
|
||||
|
||||
|
|
|
@ -44,6 +44,6 @@ assert.sameValue(returnValue, NaN, 'overflow due to month');
|
|||
|
||||
date = new Date(maxMs);
|
||||
|
||||
returnValue = date.setFullYear(maxYear, maxMonth, maxDate + 1);
|
||||
returnValue = date.setFullYear(maxYear, maxMonth, maxDate + 2);
|
||||
|
||||
assert.sameValue(returnValue, NaN, 'overflow due to date');
|
||||
|
|
|
@ -37,6 +37,6 @@ assert.sameValue(returnValue, NaN, 'overflow due to month');
|
|||
|
||||
date = new Date(maxMs);
|
||||
|
||||
returnValue = date.setMonth(maxMonth, maxDate + 1);
|
||||
returnValue = date.setMonth(maxMonth, maxDate + 2);
|
||||
|
||||
assert.sameValue(returnValue, NaN, 'overflow due to date');
|
||||
|
|
|
@ -19,9 +19,9 @@ features: [class]
|
|||
---*/
|
||||
|
||||
var C = $.createRealm().global.eval(
|
||||
'class C extends Object {' +
|
||||
'(class C extends Object {' +
|
||||
' constructor() {}' +
|
||||
'}'
|
||||
'});'
|
||||
);
|
||||
|
||||
assert.throws(ReferenceError, function() {
|
||||
|
|
|
@ -22,5 +22,5 @@ assert.sameValue(Number, global.Number);
|
|||
assert.sameValue(RegExp, global.RegExp);
|
||||
assert.sameValue(String, global.String);
|
||||
|
||||
globalVariable = {};
|
||||
var globalVariable = {};
|
||||
assert.sameValue(globalVariable, global.globalVariable);
|
||||
|
|
|
@ -8,6 +8,7 @@ description: >
|
|||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
flags: [onlyStrict]
|
||||
---*/
|
||||
{ function f() {} function f() {} }
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ iter1.next().then(function(result) {
|
|||
assert.sameValue(
|
||||
result.done, false, "Without right-hand-side: first result `done` flag");
|
||||
}).then(undefined, $DONE);
|
||||
iter1.next(function(result) {
|
||||
iter1.next().then(function(result) {
|
||||
assert.sameValue(
|
||||
result.value, undefined, "Without right-hand-side: second result `value`");
|
||||
assert.sameValue(
|
||||
|
@ -33,7 +33,7 @@ iter2.next().then(function(result) {
|
|||
assert.sameValue(
|
||||
result.done, false, "With right-hand-side: first result `done` flag");
|
||||
}).then(undefined, $DONE);
|
||||
iter2.next(function(result) {
|
||||
iter2.next().then(function(result) {
|
||||
assert.sameValue(
|
||||
result.value, undefined, "With right-hand-side: second result `value`");
|
||||
assert.sameValue(
|
||||
|
|
|
@ -53,7 +53,7 @@ assert(
|
|||
var allKeys = Reflect.ownKeys(ns);
|
||||
|
||||
assert(
|
||||
allKeys.length > 11,
|
||||
allKeys.length >= 11,
|
||||
'at least as many keys as defined by the module and the specification'
|
||||
);
|
||||
assert.sameValue(allKeys[0], 'a_local1');
|
||||
|
|
|
@ -55,7 +55,7 @@ assert.sameValue(stringKeys[15], '\u03c0', 'stringKeys[15] === "\u03c0"');
|
|||
|
||||
var allKeys = Reflect.ownKeys(ns);
|
||||
assert(
|
||||
allKeys.length > 17,
|
||||
allKeys.length >= 17,
|
||||
'at least as many keys as defined by the module and the specification'
|
||||
);
|
||||
assert.sameValue(allKeys[0], '$', 'allKeys[0] === "$"');
|
||||
|
|
|
@ -11,4 +11,4 @@ flags: [module]
|
|||
import * as ns from './set-prototype-of-null.js';
|
||||
|
||||
assert.sameValue(typeof Object.setPrototypeOf, 'function');
|
||||
assert.sameValue(ns, Object.setPrototypeOf(ns, null);
|
||||
assert.sameValue(ns, Object.setPrototypeOf(ns, null));
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
// Copyright 2016 Microsoft, Inc. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
author: Brian Terlson <brian.terlson@microsoft.com>
|
||||
esid: pending
|
||||
description: >
|
||||
Async generators are not a thing (yet)
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
async function* foo() { }
|
Loading…
Reference in New Issue