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

Side by Side Diff: tests/language/cond_expr_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
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 // Check that conditional expressions can contain assignment expressions. 4 // Check that conditional expressions can contain assignment expressions.
5 5
6 import "package:expect/expect.dart";
7
6 8
7 var e1, e2; 9 var e1, e2;
8 10
9 f(a) => a < 0 ? e1 = -1 : e2 = 1; 11 f(a) => a < 0 ? e1 = -1 : e2 = 1;
10 12
11 main() { 13 main() {
12 e1 = 0; 14 e1 = 0;
13 e2 = 0; 15 e2 = 0;
14 var r = f(-100); 16 var r = f(-100);
15 Expect.equals(-1, r); 17 Expect.equals(-1, r);
16 Expect.equals(-1, e1); 18 Expect.equals(-1, e1);
17 Expect.equals(0, e2); 19 Expect.equals(0, e2);
18 20
19 e1 = 0; 21 e1 = 0;
20 e2 = 0; 22 e2 = 0;
21 r = f(100); 23 r = f(100);
22 Expect.equals(1, r); 24 Expect.equals(1, r);
23 Expect.equals(0, e1); 25 Expect.equals(0, e1);
24 Expect.equals(1, e2); 26 Expect.equals(1, e2);
25 } 27 }
OLDNEW
« no previous file with comments | « tests/language/compound_assignment_operator_test.dart ('k') | tests/language/condition_bailout_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698