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

Side by Side Diff: tests/language/local_function_test.dart

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add deprecation comment for ExpectException and revert one test. Created 7 years, 8 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
« no previous file with comments | « tests/language/local_function3_test.dart ('k') | tests/language/loop_exchange2_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 // Dart test program testing closures. 4 // Dart test program testing closures.
5 5
6 import "package:expect/expect.dart";
7
6 class LocalFunctionTest { 8 class LocalFunctionTest {
7 LocalFunctionTest() : field1 = 100, field2_ = 200 { } 9 LocalFunctionTest() : field1 = 100, field2_ = 200 { }
8 static int f(int n) { 10 static int f(int n) {
9 int a = 0; 11 int a = 0;
10 g(int m) { 12 g(int m) {
11 a = 3*n + m + 1; // Capture parameter n and local a. 13 a = 3*n + m + 1; // Capture parameter n and local a.
12 return a; 14 return a;
13 } 15 }
14 var b = g(n); 16 var b = g(n);
15 return a + b; 17 return a + b;
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 Expect.equals(24*25/2, testNesting(5)); 185 Expect.equals(24*25/2, testNesting(5));
184 Expect.equals(true, testClosureCallStatement(7)); 186 Expect.equals(true, testClosureCallStatement(7));
185 Expect.equals(99, doThis(10, (n) => n * n - 1)); 187 Expect.equals(99, doThis(10, (n) => n * n - 1));
186 testExceptions(); 188 testExceptions();
187 } 189 }
188 } 190 }
189 191
190 main() { 192 main() {
191 LocalFunctionTest.testMain(); 193 LocalFunctionTest.testMain();
192 } 194 }
OLDNEW
« no previous file with comments | « tests/language/local_function3_test.dart ('k') | tests/language/loop_exchange2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698