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

Side by Side Diff: tests/corelib_2/list_literal_test.dart

Issue 2991363002: Migrated test block 14 to Dart 2.0. (Closed)
Patch Set: Migrated test block 14 to Dart 2.0. Created 3 years, 4 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
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"; 5 import "package:expect/expect.dart";
6 6
7 // Test that a list literal is expandable and modifiable. 7 // Test that a list literal is expandable and modifiable.
8 8
9 class ListLiteralTest { 9 class ListLiteralTest {
10 static void testMain() { 10 static void testMain() {
11 var list = [1, 2, 3]; 11 var list = [1, 2, 3];
12 Expect.equals(3, list.length); 12 Expect.equals(3, list.length);
13 list.add(4); 13 list.add(4);
14 Expect.equals(4, list.length); 14 Expect.equals(4, list.length);
15 list.addAll([5, 6]); 15 list.addAll([5, 6]);
16 Expect.equals(6, list.length); 16 Expect.equals(6, list.length);
17 list[0] = 0; 17 list[0] = 0;
18 Expect.equals(0, list[0]); 18 Expect.equals(0, list[0]);
19 } 19 }
20 } 20 }
21 21
22 main() { 22 main() {
23 ListLiteralTest.testMain(); 23 ListLiteralTest.testMain();
24 } 24 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698