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

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

Issue 12743005: Revert "Remove Expect from core library." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload (first upload failed). Created 7 years, 9 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
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 import "package:expect/expect.dart";
6
7 // Tests that map literals are ordered. 5 // Tests that map literals are ordered.
8 6
9 class OrderedMapsTest { 7 class OrderedMapsTest {
10 static testMain() { 8 static testMain() {
11 testMaps(const { "a": 1, "c": 2 }, const { "c": 2, "a": 1}, true); 9 testMaps(const { "a": 1, "c": 2 }, const { "c": 2, "a": 1}, true);
12 testMaps({ "a": 1, "c": 2 }, { "c": 2, "a": 1 }, false); 10 testMaps({ "a": 1, "c": 2 }, { "c": 2, "a": 1 }, false);
13 } 11 }
14 12
15 static void testMaps(map1, map2, bool isConst) { 13 static void testMaps(map1, map2, bool isConst) {
16 Expect.isFalse(identical(map1, map2)); 14 Expect.isFalse(identical(map1, map2));
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 69
72 values = map1.values.toList(); 70 values = map1.values.toList();
73 Expect.equals(3, values.length); 71 Expect.equals(3, values.length);
74 Expect.equals(4, values[0]); 72 Expect.equals(4, values[0]);
75 } 73 }
76 } 74 }
77 75
78 main() { 76 main() {
79 OrderedMapsTest.testMain(); 77 OrderedMapsTest.testMain();
80 } 78 }
OLDNEW
« no previous file with comments | « tests/language/optional_named_parameters_test.dart ('k') | tests/language/overridden_no_such_method_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698