diff --git a/src/dynamic-import/module-namespace-object/await.template b/src/dynamic-import/namespace/await.template similarity index 96% rename from src/dynamic-import/module-namespace-object/await.template rename to src/dynamic-import/namespace/await.template index bc79c102abc926b6e424f102bd7803e692d10270..f2ad5afe0a7d630358578d64e277aa66e7012f6a 100644 --- a/src/dynamic-import/module-namespace-object/await.template +++ b/src/dynamic-import/namespace/await.template @@ -2,7 +2,7 @@ // Copyright (C) 2018 the V8 project authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- -path: language/module-code/dynamic-import/module-namespace-object/await- +path: language/module-code/dynamic-import/ns/await- name: value from await resolving esid: sec-finishdynamicimport info: | @@ -73,7 +73,7 @@ flags: [async] ---*/ async function fn() { - const imported = await /*{ import }*/; + const ns = await /*{ import }*/; /*{ body }*/ } diff --git a/src/dynamic-import/module-namespace-object/promise.template b/src/dynamic-import/namespace/promise.template similarity index 97% rename from src/dynamic-import/module-namespace-object/promise.template rename to src/dynamic-import/namespace/promise.template index 7da1a8e9c5b90e394944879e5663974b3b9a7a2d..fce701c04ba3fd793d770e34049684d1dd6d33ab 100644 --- a/src/dynamic-import/module-namespace-object/promise.template +++ b/src/dynamic-import/namespace/promise.template @@ -2,7 +2,7 @@ // Copyright (C) 2018 the V8 project authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- -path: language/module-code/dynamic-import/module-namespace-object/promise-then- +path: language/module-code/dynamic-import/ns/promise-then- name: value from promise then esid: sec-finishdynamicimport info: | @@ -72,7 +72,7 @@ features: [dynamic-import] flags: [async] ---*/ -/*{ import }*/.then(imported => { +/*{ import }*/.then(ns => { /*{ body }*/ diff --git a/src/dynamic-import/imported-Symbol-toStringTag.case b/src/dynamic-import/ns-Symbol-toStringTag.case similarity index 85% rename from src/dynamic-import/imported-Symbol-toStringTag.case rename to src/dynamic-import/ns-Symbol-toStringTag.case index 99d43b22daa6f5962f614dbebdb17df74bd85ae7..9ac7e8b62e7cb3f714ff70a47edb95c6d09453d1 100644 --- a/src/dynamic-import/imported-Symbol-toStringTag.case +++ b/src/dynamic-import/ns-Symbol-toStringTag.case @@ -2,7 +2,7 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- desc: Module namespace objects have a Symbol.toStringTag -template: module-namespace-object +template: namespace info: | @@toStringTag @@ -16,13 +16,13 @@ features: [Symbol.toStringTag] //- import import('./module-code_FIXTURE.js') //- body -assert.sameValue(imported[Symbol.toStringTag], 'Module'); +assert.sameValue(ns[Symbol.toStringTag], 'Module'); // propertyHelper.js is not appropriate for this test because it assumes that // the object exposes the ordinary object's implementation of [[Get]], [[Set]], // [[Delete]], and [[OwnPropertyKeys]], which the module namespace exotic // object does not. -var desc = Object.getOwnPropertyDescriptor(imported, Symbol.toStringTag); +var desc = Object.getOwnPropertyDescriptor(ns, Symbol.toStringTag); assert.sameValue(desc.enumerable, false, 'reports as non-enumerable'); assert.sameValue(desc.writable, false, 'reports as non-writable'); diff --git a/src/dynamic-import/imported-extensible.case b/src/dynamic-import/ns-extensible.case similarity index 75% rename from src/dynamic-import/imported-extensible.case rename to src/dynamic-import/ns-extensible.case index 15e87c6097a46eecad2dc8de12f3180c923f18cd..b54a0c88d625b28bb62825c5edd66d5e1fd443e8 100644 --- a/src/dynamic-import/imported-extensible.case +++ b/src/dynamic-import/ns-extensible.case @@ -2,11 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- desc: Module namespace objects are not extensible. -template: module-namespace-object +template: namespace includes: [propertyHelper.js] ---*/ //- import import('./module-code_FIXTURE.js') //- body -assert.sameValue(Object.isExtensible(imported), false); +assert.sameValue(Object.isExtensible(ns), false); diff --git a/src/dynamic-import/imported-no-iterator.case b/src/dynamic-import/ns-no-iterator.case similarity index 73% rename from src/dynamic-import/imported-no-iterator.case rename to src/dynamic-import/ns-no-iterator.case index 0999a89dddceae8b4c5e369acfa954dc4aadefb7..9e082e3c113d165582ac95ed4bfad58f412fb084 100644 --- a/src/dynamic-import/imported-no-iterator.case +++ b/src/dynamic-import/ns-no-iterator.case @@ -3,11 +3,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- desc: Module namespace objects lack a Symbol.toStringTag -template: module-namespace-object +template: namespace features: [Symbol.iterator] ---*/ //- import import('./module-code_FIXTURE.js') //- body -assert.sameValue(Object.prototype.hasOwnProperty.call(imported, Symbol.iterator), false); +assert.sameValue(Object.prototype.hasOwnProperty.call(ns, Symbol.iterator), false); diff --git a/src/dynamic-import/imported-prop-descs.case b/src/dynamic-import/ns-prop-descs.case similarity index 86% rename from src/dynamic-import/imported-prop-descs.case rename to src/dynamic-import/ns-prop-descs.case index 55edf6daa15fd11fd88b181b4c3f2fe68611d2fe..ad873e711d10676bcb7c3443b615176b149a9d11 100644 --- a/src/dynamic-import/imported-prop-descs.case +++ b/src/dynamic-import/ns-prop-descs.case @@ -2,7 +2,7 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- desc: imported object properties descriptors -template: module-namespace-object +template: namespace ---*/ //- import @@ -12,21 +12,21 @@ import('./module-code_FIXTURE.js') // the object exposes the ordinary object's implementation of [[Get]], [[Set]], // [[Delete]], and [[OwnPropertyKeys]], which the module namespace exotic // object does not. -var desc = Object.getOwnPropertyDescriptor(imported, 'default'); +var desc = Object.getOwnPropertyDescriptor(ns, 'default'); assert.sameValue(desc.value, 42, 'default value is 42'); assert.sameValue(desc.enumerable, true, 'default reports as enumerable'); assert.sameValue(desc.writable, true, 'default reports as writable'); assert.sameValue(desc.configurable, false, 'default reports as non-configurable'); -desc = Object.getOwnPropertyDescriptor(imported, 'x'); +desc = Object.getOwnPropertyDescriptor(ns, 'x'); assert.sameValue(desc.value, 'Test262', 'x value is "Test262"'); assert.sameValue(desc.enumerable, true, 'x reports as enumerable'); assert.sameValue(desc.writable, true, 'x reports as writable'); assert.sameValue(desc.configurable, false, 'x reports as non-configurable'); -desc = Object.getOwnPropertyDescriptor(imported, 'z'); +desc = Object.getOwnPropertyDescriptor(ns, 'z'); assert.sameValue(desc.value, 42, 'z value is 42'); assert.sameValue(desc.enumerable, true, 'z reports as enumerable'); diff --git a/src/dynamic-import/imported-prototype.case b/src/dynamic-import/ns-prototype.case similarity index 68% rename from src/dynamic-import/imported-prototype.case rename to src/dynamic-import/ns-prototype.case index fd5c28174900e9e4f51604e73118cf816bd09303..3a8d66d41e02744dd78f10976ba95ca933903d97 100644 --- a/src/dynamic-import/imported-prototype.case +++ b/src/dynamic-import/ns-prototype.case @@ -2,10 +2,10 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- desc: Module namespace object prototype is null -template: module-namespace-object +template: namespace ---*/ //- import import('./module-code_FIXTURE.js') //- body -assert.sameValue(Object.getPrototypeOf(imported), null, 'prototype is null'); +assert.sameValue(Object.getPrototypeOf(ns), null, 'prototype is null'); diff --git a/test/language/module-code/dynamic-import/module-namespace-object/module-code_FIXTURE.js b/test/language/module-code/dynamic-import/ns/module-code_FIXTURE.js similarity index 100% rename from test/language/module-code/dynamic-import/module-namespace-object/module-code_FIXTURE.js rename to test/language/module-code/dynamic-import/ns/module-code_FIXTURE.js