OLD | NEW |
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 that map literals are ordered. | 5 // Tests that map literals are ordered. |
6 | 6 |
7 class OrderedMapsTest { | 7 class OrderedMapsTest { |
8 static testMain() { | 8 static testMain() { |
9 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); |
10 testMaps({ "a": 1, "c": 2 }, { "c": 2, "a": 1 }, false); | 10 testMaps({ "a": 1, "c": 2 }, { "c": 2, "a": 1 }, false); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 values = map1.getValues(); | 70 values = map1.getValues(); |
71 Expect.equals(3, values.length); | 71 Expect.equals(3, values.length); |
72 Expect.equals(4, values[0]); | 72 Expect.equals(4, values[0]); |
73 } | 73 } |
74 } | 74 } |
75 | 75 |
76 main() { | 76 main() { |
77 OrderedMapsTest.testMain(); | 77 OrderedMapsTest.testMain(); |
78 } | 78 } |
OLD | NEW |