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

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

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

Powered by Google App Engine
This is Rietveld 408576698