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

Side by Side Diff: tests/standalone/double_temp_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/standalone/deoptimization_test.dart ('k') | tests/standalone/double_to_int_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 // Test correct usage of inlined double temporary objects. 4 // Test correct usage of inlined double temporary objects.
5 5
6 import "package:expect/expect.dart";
7
6 main() { 8 main() {
7 for (int i = 0; i < 2000; i++) { 9 for (int i = 0; i < 2000; i++) {
8 testBinaryOp(); 10 testBinaryOp();
9 testUnaryOp(); 11 testUnaryOp();
10 } 12 }
11 } 13 }
12 14
13 15
14 // VM: temporary double should not be used as result of division, 16 // VM: temporary double should not be used as result of division,
15 // otherwise the function always returns the same object. 17 // otherwise the function always returns the same object.
(...skipping 13 matching lines...) Expand all
29 double unary(double a, double b) { 31 double unary(double a, double b) {
30 return -(a * (-b)); 32 return -(a * (-b));
31 } 33 }
32 34
33 35
34 testUnaryOp() { 36 testUnaryOp() {
35 var x = unary(1.0, 2.0); 37 var x = unary(1.0, 2.0);
36 var y = unary(3.0, 4.0); 38 var y = unary(3.0, 4.0);
37 Expect.equals(2.0, x); 39 Expect.equals(2.0, x);
38 } 40 }
OLDNEW
« no previous file with comments | « tests/standalone/deoptimization_test.dart ('k') | tests/standalone/double_to_int_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698