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

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

Issue 10993059: Stop using the Hashable interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Another space removed. Created 8 years, 2 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/core_type_check_test.dart ('k') | tests/language/savannah_test.dart » ('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 (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Tests map literals. 5 // Tests map literals.
6 6
7 class MapLiteralTest { 7 class MapLiteralTest {
8 MapLiteralTest() {} 8 MapLiteralTest() {}
9 9
10 static testMain() { 10 static testMain() {
(...skipping 19 matching lines...) Expand all
30 var map2 = {"1":1, "2":2}; 30 var map2 = {"1":1, "2":2};
31 31
32 Expect.equals(1, map1["a"]); 32 Expect.equals(1, map1["a"]);
33 Expect.equals(2, map1["b"]); 33 Expect.equals(2, map1["b"]);
34 34
35 Expect.equals(1, map2["1"]); 35 Expect.equals(1, map2["1"]);
36 Expect.equals(2, map2["2"]); 36 Expect.equals(2, map2["2"]);
37 } 37 }
38 } 38 }
39 39
40 class StaticInit { 40 class StaticInit {
41 StaticInit() {} 41 StaticInit() {}
42 42
43 // Test construction of static const map literals 43 // Test construction of static const map literals
44 static const map1 = const {"a":1, "b":2}; 44 static const map1 = const {"a":1, "b":2};
45 // Test construction of static const map literals, with numbers 45 // Test construction of static const map literals, with numbers
46 static const map2 = const {"1":1, "2":2}; 46 static const map2 = const {"1":1, "2":2};
47 47
48 test() { 48 test() {
49 Expect.equals(1, map1["a"]); 49 Expect.equals(1, map1["a"]);
50 Expect.equals(2, map1["b"]); 50 Expect.equals(2, map1["b"]);
(...skipping 16 matching lines...) Expand all
67 Expect.equals(2, map1["b"]); 67 Expect.equals(2, map1["b"]);
68 68
69 Expect.equals(1, map2["1"]); 69 Expect.equals(1, map2["1"]);
70 Expect.equals(2, map2["2"]); 70 Expect.equals(2, map2["2"]);
71 } 71 }
72 } 72 }
73 73
74 main() { 74 main() {
75 MapLiteralTest.testMain(); 75 MapLiteralTest.testMain();
76 } 76 }
OLDNEW
« no previous file with comments | « tests/language/core_type_check_test.dart ('k') | tests/language/savannah_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698