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

Side by Side Diff: dart/tests/compiler/dart2js/for_in_test.dart

Issue 11788016: Update dart2js unit tests to new library API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 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
(Empty)
1 // Copyright (c) 2013, 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 import 'compiler_helper.dart';
6
7 const String TEST_ONE = r"""
8 foo(a) {
9 int x = 0;
10 for (int i in a) {
11 x += i;
12 }
13 return x;
14 }
15 """;
16
17 const String TEST_TWO = r"""
18 foo(a) {
19 int x = 0;
20 for (int i in a) {
21 if (i == 5) continue;
22 x += i;
23 }
24 return x;
25 }
26 """;
27
28 main() {
29 String generated = compile(TEST_ONE, entry: 'foo');
30 Expect.isTrue(!generated.contains(r'break'));
31 generated = compile(TEST_TWO, entry: 'foo');
32 Expect.isTrue(generated.contains(r'continue'));
33 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698