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

Side by Side Diff: tests/language/if_and_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/identical_closure_test.dart ('k') | tests/language/if_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) 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 import "package:expect/expect.dart";
6
5 // The "if (negative) res2 |= 3" below can be emitted as negative && (res2 |= 3) 7 // The "if (negative) res2 |= 3" below can be emitted as negative && (res2 |= 3)
6 // in JavaScript. Dart2js produced the wrong output. 8 // in JavaScript. Dart2js produced the wrong output.
7 9
8 _shiftRight(x, y) => x; 10 _shiftRight(x, y) => x;
9 int64_bits(x) => x; 11 int64_bits(x) => x;
10 12
11 class A { 13 class A {
12 opshr(int n, a2) { 14 opshr(int n, a2) {
13 int res2; 15 int res2;
14 bool negative = a2 == 496; 16 bool negative = a2 == 496;
15 17
16 res2 = _shiftRight(a2, n); 18 res2 = _shiftRight(a2, n);
17 if (negative) { 19 if (negative) {
18 res2 |= 3; 20 res2 |= 3;
19 } 21 }
20 return int64_bits(res2); 22 return int64_bits(res2);
21 } 23 }
22 } 24 }
23 25
24 main() { 26 main() {
25 var a = new A(); 27 var a = new A();
26 var t; 28 var t;
27 for (int i = 0; i < 3; i++) { 29 for (int i = 0; i < 3; i++) {
28 t = a.opshr(99, 496); 30 t = a.opshr(99, 496);
29 } 31 }
30 Expect.equals(499, t); 32 Expect.equals(499, t);
31 } 33 }
OLDNEW
« no previous file with comments | « tests/language/identical_closure_test.dart ('k') | tests/language/if_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698