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

Side by Side Diff: tests/language/src/ForInTest.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, 7 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
« no previous file with comments | « tests/language/src/For2Test.dart ('k') | tests/language/src/ForTest.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 // Dart test for testing for in on a list literal.
6
7 class ForInTest {
8
9 static testMain() {
10 testSimple();
11 testGenericSyntax1();
12 testGenericSyntax2();
13 testGenericSyntax3();
14 testGenericSyntax4();
15 }
16
17 static void testSimple() {
18 var list = [1, 3, 5];
19 var sum = 0;
20 for (var i in list) {
21 sum += i;
22 }
23 Expect.equals(9, sum);
24 }
25
26 static void testGenericSyntax1() {
27 List<List<String>> aCollection = [];
28 for (List<String> strArrArr in aCollection) {}
29 }
30
31 static void testGenericSyntax2() {
32 List<List<String>> aCollection = [];
33 List<String> strArrArr;
34 for (strArrArr in aCollection) {}
35 }
36
37 static void testGenericSyntax3() {
38 List<List<List<String>>> aCollection = [];
39 for (List<List<String>> strArrArr in aCollection) {}
40 }
41
42 static void testGenericSyntax4() {
43 List<List<List<String>>> aCollection = [];
44 List<List<String>> strArrArr;
45 for (strArrArr in aCollection) {}
46 }
47
48 }
49
50 main() {
51 ForInTest.testMain();
52 }
OLDNEW
« no previous file with comments | « tests/language/src/For2Test.dart ('k') | tests/language/src/ForTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698