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

Side by Side Diff: frog/tests/leg_only/closure_capture2_test.dart

Issue 10250002: test rename overhaul: step 5 - frog and leg 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
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 closure0() { 5 closure0() {
6 // f and g will both capture a variable named 'x'. If we use the original 6 // f and g will both capture a variable named 'x'. If we use the original
7 // name in the (shared) box then there will be troubles. 7 // name in the (shared) box then there will be troubles.
8 var f; 8 var f;
9 var g; 9 var g;
10 { 10 {
(...skipping 19 matching lines...) Expand all
30 // TODO(floitsch): remove name from functions. 30 // TODO(floitsch): remove name from functions.
31 var f = fun() { return $1; }; 31 var f = fun() { return $1; };
32 $1++; 32 $1++;
33 Expect.equals(500, f()); 33 Expect.equals(500, f());
34 } 34 }
35 35
36 main() { 36 main() {
37 closure0(); 37 closure0();
38 closure1(); 38 closure1();
39 } 39 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698