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

Side by Side Diff: tests/language/dangling_else_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 // Tests dangling else. The VM should not have any problems, but dart2js or 4 // Tests dangling else. The VM should not have any problems, but dart2js or
5 // dart2dart could get this wrong. 5 // dart2dart could get this wrong.
6 6
7 import "package:expect/expect.dart";
8
9 nestedIf1(notTrue) { 7 nestedIf1(notTrue) {
10 if (notTrue) return 'bad input'; 8 if (notTrue) return 'bad input';
11 if (notTrue) { 9 if (notTrue) {
12 if (notTrue) { 10 if (notTrue) {
13 return 'bad'; 11 return 'bad';
14 } 12 }
15 } else { 13 } else {
16 return 'good'; 14 return 'good';
17 } 15 }
18 return 'bug'; 16 return 'bug';
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 return 'bug'; 73 return 'bug';
76 } 74 }
77 75
78 main() { 76 main() {
79 Expect.equals('good', nestedIf1(false)); 77 Expect.equals('good', nestedIf1(false));
80 Expect.equals('good', nestedIf2(false)); 78 Expect.equals('good', nestedIf2(false));
81 Expect.equals('good', nestedWhile(false)); 79 Expect.equals('good', nestedWhile(false));
82 Expect.equals('good', nestedFor(false)); 80 Expect.equals('good', nestedFor(false));
83 Expect.equals('good', nestedLabeledStatement(false)); 81 Expect.equals('good', nestedLabeledStatement(false));
84 } 82 }
OLDNEW
« no previous file with comments | « tests/language/ct_const_test.dart ('k') | tests/language/default_class_implicit_constructor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698