test262/test/built-ins/global/global-object.js

27 lines
850 B
JavaScript
Raw Normal View History

// Copyright (C) 2016 Jordan Harband. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-other-properties-of-the-global-object-global
description: "'global' should be the global object"
author: Jordan Harband
2018-06-19 00:00:19 +02:00
features: [global]
---*/
assert.sameValue(this, global);
assert.sameValue(global.global, global);
assert.sameValue(Array, global.Array);
assert.sameValue(Boolean, global.Boolean);
assert.sameValue(Date, global.Date);
assert.sameValue(Error, global.Error);
assert.sameValue(Function, global.Function);
assert.sameValue(JSON, global.JSON);
assert.sameValue(Math, global.Math);
assert.sameValue(Number, global.Number);
assert.sameValue(RegExp, global.RegExp);
assert.sameValue(String, global.String);
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
2017-02-07 17:10:56 +01:00
var globalVariable = {};
assert.sameValue(globalVariable, global.globalVariable);