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

Side by Side Diff: tests/language/context2_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 // Dart test for capturing. 4 // Dart test for capturing.
5 5
6 import "package:expect/expect.dart";
7
8 // Regression test for issue 5991015. 6 // Regression test for issue 5991015.
9 // @static-clean 7 // @static-clean
10 8
11 class V { 9 class V {
12 10
13 notCalled(Function x) { return x(); } 11 notCalled(Function x) { return x(); }
14 12
15 foofoo(x) { return x; } 13 foofoo(x) { return x; }
16 14
17 hoop(input, n) { 15 hoop(input, n) {
18 while (n-- > 0) { 16 while (n-- > 0) {
19 Expect.equals(5, input); 17 Expect.equals(5, input);
20 continue; // This continue statement must properly unchain the context. 18 continue; // This continue statement must properly unchain the context.
21 switch (input) { 19 switch (input) {
22 case 3: 20 case 3:
23 var values = foofoo; 21 var values = foofoo;
24 notCalled(() => values(input)); 22 notCalled(() => values(input));
25 } 23 }
26 } 24 }
27 } 25 }
28 } 26 }
29 27
30 main() { 28 main() {
31 new V().hoop(5, 3); 29 new V().hoop(5, 3);
32 } 30 }
OLDNEW
« no previous file with comments | « tests/language/constructor_test.dart ('k') | tests/language/context_args_with_defaults_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698