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

Side by Side Diff: tests/language/map_literal9_test.dart

Issue 22909056: Support general expressions as keys in literal maps. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « tests/language/map_literal8_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 // Test the use type arguments on constant maps.
6
7 library map_literal9_test;
8
9 import "package:expect/expect.dart";
10
11 void main() {
12 var m1 = const {"[object Object]": 0, "1": 1};
13 Expect.isFalse(m1.containsKey(new Object()));
14 Expect.isNull(m1[new Object()]);
15 Expect.isFalse(m1.containsKey(1));
16 Expect.isNull(m1[1]);
17
18 var m2 = const {"[object Object]": 0, "1": 1, "__proto__": 2};
19 Expect.isFalse(m2.containsKey(new Object()));
20 Expect.isNull(m2[new Object()]);
21 Expect.isFalse(m2.containsKey(1));
22 Expect.isNull(m2[1]);
23 }
OLDNEW
« no previous file with comments | « tests/language/map_literal8_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698