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

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

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated latest tests. 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
5 // Tests that map literals are ordered. 7 // Tests that map literals are ordered.
6 8
7 class OrderedMapsTest { 9 class OrderedMapsTest {
8 static testMain() { 10 static testMain() {
9 testMaps(const { "a": 1, "c": 2 }, const { "c": 2, "a": 1}, true); 11 testMaps(const { "a": 1, "c": 2 }, const { "c": 2, "a": 1}, true);
10 testMaps({ "a": 1, "c": 2 }, { "c": 2, "a": 1 }, false); 12 testMaps({ "a": 1, "c": 2 }, { "c": 2, "a": 1 }, false);
11 } 13 }
12 14
13 static void testMaps(map1, map2, bool isConst) { 15 static void testMaps(map1, map2, bool isConst) {
14 Expect.isFalse(identical(map1, map2)); 16 Expect.isFalse(identical(map1, map2));
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 71
70 values = map1.values.toList(); 72 values = map1.values.toList();
71 Expect.equals(3, values.length); 73 Expect.equals(3, values.length);
72 Expect.equals(4, values[0]); 74 Expect.equals(4, values[0]);
73 } 75 }
74 } 76 }
75 77
76 main() { 78 main() {
77 OrderedMapsTest.testMain(); 79 OrderedMapsTest.testMain();
78 } 80 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698