From b5edd1256cdef1325862786a5fcdfdd37cf1b872 Mon Sep 17 00:00:00 2001 From: Adam Klein <adamk@chromium.org> Date: Wed, 28 Dec 2016 10:58:15 -0800 Subject: [PATCH] Add test for setting a module namespace object's prototype to null (#805) The behavior changed from returning false to true in https://github.com/tc39/ecma262/commit/13906140a --- .../namespace/internals/set-prototype-of-null.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/language/module-code/namespace/internals/set-prototype-of-null.js diff --git a/test/language/module-code/namespace/internals/set-prototype-of-null.js b/test/language/module-code/namespace/internals/set-prototype-of-null.js new file mode 100644 index 0000000000..405641cfc5 --- /dev/null +++ b/test/language/module-code/namespace/internals/set-prototype-of-null.js @@ -0,0 +1,14 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-module-namespace-exotic-objects-setprototypeof-v +description: > + The [[SetPrototypeOf]] internal method returns `true` if + passed `null` +flags: [module] +---*/ + +import * as ns from './set-prototype-of-null.js'; + +assert.sameValue(typeof Object.setPrototypeOf, 'function'); +assert.sameValue(ns, Object.setPrototypeOf(ns, null); -- GitLab