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

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

Issue 12743005: Revert "Remove Expect from core library." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload (first upload failed). Created 7 years, 9 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
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 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 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";
6 import 'compiler_helper.dart'; 5 import 'compiler_helper.dart';
7 6
8 const String TEST_ONE = r""" 7 const String TEST_ONE = r"""
9 foo(a) { 8 foo(a) {
10 int x = 0; 9 int x = 0;
11 for (int i in a) { 10 for (int i in a) {
12 x += i; 11 x += i;
13 } 12 }
14 return x; 13 return x;
15 } 14 }
16 """; 15 """;
17 16
18 const String TEST_TWO = r""" 17 const String TEST_TWO = r"""
19 foo(a) { 18 foo(a) {
20 int x = 0; 19 int x = 0;
21 for (int i in a) { 20 for (int i in a) {
22 if (i == 5) continue; 21 if (i == 5) continue;
23 x += i; 22 x += i;
24 } 23 }
25 return x; 24 return x;
26 } 25 }
27 """; 26 """;
28 27
29 main() { 28 main() {
30 String generated = compile(TEST_ONE, entry: 'foo'); 29 String generated = compile(TEST_ONE, entry: 'foo');
31 Expect.isTrue(!generated.contains(r'break')); 30 Expect.isTrue(!generated.contains(r'break'));
32 generated = compile(TEST_TWO, entry: 'foo'); 31 generated = compile(TEST_TWO, entry: 'foo');
33 Expect.isTrue(generated.contains(r'continue')); 32 Expect.isTrue(generated.contains(r'continue'));
34 } 33 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/find_my_name_test.dart ('k') | tests/compiler/dart2js/gvn_dynamic_field_get_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698