Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: test/mjsunit/modules-namespace1.js

Issue 2657773006: [modules] Update a test and status file to reflect recent spec changes. (Closed)
Patch Set: Move invalid tests to the invalid tests. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | test/test262/test262.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // MODULE 5 // MODULE
6 6
7 let ja = 42; 7 let ja = 42;
8 export {ja as yo}; 8 export {ja as yo};
9 export const bla = "blaa"; 9 export const bla = "blaa";
10 export {foo as foo_again}; 10 export {foo as foo_again};
(...skipping 30 matching lines...) Expand all
41 41
42 // Its "foo_again" property. 42 // Its "foo_again" property.
43 assertSame(foo, foo.foo_again); 43 assertSame(foo, foo.foo_again);
44 44
45 // Its @@toStringTag property. 45 // Its @@toStringTag property.
46 assertTrue(Reflect.has(foo, Symbol.toStringTag)); 46 assertTrue(Reflect.has(foo, Symbol.toStringTag));
47 assertEquals("string", typeof Reflect.get(foo, Symbol.toStringTag)); 47 assertEquals("string", typeof Reflect.get(foo, Symbol.toStringTag));
48 assertEquals( 48 assertEquals(
49 {value: "Module", configurable: false, writable: false, enumerable: false}, 49 {value: "Module", configurable: false, writable: false, enumerable: false},
50 Reflect.getOwnPropertyDescriptor(foo, Symbol.toStringTag)); 50 Reflect.getOwnPropertyDescriptor(foo, Symbol.toStringTag));
51 // TODO(neis): Spec currently says the next one should return true.
52 assertFalse(Reflect.deleteProperty(foo, Symbol.toStringTag)); 51 assertFalse(Reflect.deleteProperty(foo, Symbol.toStringTag));
52 assertEquals(
53 {value: "Module", configurable: false, writable: false, enumerable: false},
54 Reflect.getOwnPropertyDescriptor(foo, Symbol.toStringTag));
53 55
54 // Nonexistant properties. 56 // Nonexistant properties.
55 let nonexistant = ["gaga", 123, Symbol('')]; 57 let nonexistant = ["gaga", 123, Symbol('')];
56 for (let key of nonexistant) { 58 for (let key of nonexistant) {
57 assertSame(undefined, Reflect.getOwnPropertyDescriptor(foo, key)); 59 assertSame(undefined, Reflect.getOwnPropertyDescriptor(foo, key));
58 assertTrue(Reflect.deleteProperty(foo, key)); 60 assertTrue(Reflect.deleteProperty(foo, key));
59 assertFalse(Reflect.set(foo, key, true)); 61 assertFalse(Reflect.set(foo, key, true));
60 assertSame(undefined, Reflect.get(foo, key)); 62 assertSame(undefined, Reflect.get(foo, key));
61 assertFalse(Reflect.defineProperty(foo, key, {get() {return 1}})); 63 assertFalse(Reflect.defineProperty(foo, key, {get() {return 1}}));
62 assertFalse(Reflect.has(foo, key)); 64 assertFalse(Reflect.has(foo, key));
63 } 65 }
64 66
65 // The actual star import that we are testing. Namespace imports are 67 // The actual star import that we are testing. Namespace imports are
66 // initialized before evaluation. 68 // initialized before evaluation.
67 import * as foo from "modules-namespace1.js"; 69 import * as foo from "modules-namespace1.js";
68 70
69 // There can be only one namespace object. 71 // There can be only one namespace object.
70 import * as bar from "modules-namespace1.js"; 72 import * as bar from "modules-namespace1.js";
71 assertSame(foo, bar); 73 assertSame(foo, bar);
OLDNEW
« no previous file with comments | « no previous file | test/test262/test262.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698