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

Side by Side Diff: tests/compiler/dart2js_extra/closure_capture4_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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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
7 closure0() { 5 closure0() {
8 var input = [1, 2, 3]; 6 var input = [1, 2, 3];
9 var fs = []; 7 var fs = [];
10 for (var x in input) { 8 for (var x in input) {
11 fs.add(fun() { return x; }); 9 fs.add(fun() { return x; });
12 } 10 }
13 Expect.equals(3, fs.length); 11 Expect.equals(3, fs.length);
14 Expect.equals(1, fs[0]()); 12 Expect.equals(1, fs[0]());
15 Expect.equals(2, fs[1]()); 13 Expect.equals(2, fs[1]());
16 Expect.equals(3, fs[2]()); 14 Expect.equals(3, fs[2]());
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 } 84 }
87 85
88 main() { 86 main() {
89 closure0(); 87 closure0();
90 closure1(); 88 closure1();
91 closure2(); 89 closure2();
92 closure3(); 90 closure3();
93 closure4(); 91 closure4();
94 closure5(); 92 closure5();
95 } 93 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js_extra/closure_capture3_test.dart ('k') | tests/compiler/dart2js_extra/closure_capture5_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698