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

Unified Diff: tests/language/src/OrderedMapsTest.dart

Issue 10248007: test rename overhaul: step 8 - language tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/language/src/OptionalParameterSyntaxTest.dart ('k') | tests/language/src/OverriddenNoSuchMethod.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/src/OrderedMapsTest.dart
diff --git a/tests/language/src/OrderedMapsTest.dart b/tests/language/src/OrderedMapsTest.dart
deleted file mode 100644
index 7bcf697bb3f6259d60becb9d8820ccbe08bd33dc..0000000000000000000000000000000000000000
--- a/tests/language/src/OrderedMapsTest.dart
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Tests that map literals are ordered.
-
-class OrderedMapsTest {
- static testMain() {
- testMaps(const { "a": 1, "c": 2 }, const { "c": 2, "a": 1}, true);
- testMaps({ "a": 1, "c": 2 }, { "c": 2, "a": 1 }, false);
- }
-
- static void testMaps(map1, map2, bool isConst) {
- Expect.equals(true, map1 !== map2);
-
- var keys = map1.getKeys();
- Expect.equals(2, keys.length);
- Expect.equals("a", keys[0]);
- Expect.equals("c", keys[1]);
-
- keys = map2.getKeys();
- Expect.equals(2, keys.length);
- Expect.equals("c", keys[0]);
- Expect.equals("a", keys[1]);
-
- var values = map1.getValues();
- Expect.equals(2, values.length);
- Expect.equals(1, values[0]);
- Expect.equals(2, values[1]);
-
- values = map2.getValues();
- Expect.equals(2, values.length);
- Expect.equals(2, values[0]);
- Expect.equals(1, values[1]);
-
- if (isConst) return;
-
- map1["b"] = 3;
- map2["b"] = 3;
-
- keys = map1.getKeys();
- Expect.equals(3, keys.length);
- Expect.equals("a", keys[0]);
- Expect.equals("c", keys[1]);
- Expect.equals("b", keys[2]);
-
- keys = map2.getKeys();
- Expect.equals(3, keys.length);
- Expect.equals("c", keys[0]);
- Expect.equals("a", keys[1]);
- Expect.equals("b", keys[2]);
-
- values = map1.getValues();
- Expect.equals(3, values.length);
- Expect.equals(1, values[0]);
- Expect.equals(2, values[1]);
- Expect.equals(3, values[2]);
-
- values = map2.getValues();
- Expect.equals(3, values.length);
- Expect.equals(2, values[0]);
- Expect.equals(1, values[1]);
- Expect.equals(3, values[2]);
-
- map1["a"] = 4;
- keys = map1.getKeys();
- Expect.equals(3, keys.length);
- Expect.equals("a", keys[0]);
-
- values = map1.getValues();
- Expect.equals(3, values.length);
- Expect.equals(4, values[0]);
- }
-}
-
-main() {
- OrderedMapsTest.testMain();
-}
« no previous file with comments | « tests/language/src/OptionalParameterSyntaxTest.dart ('k') | tests/language/src/OverriddenNoSuchMethod.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698