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

Side by Side Diff: tests/corelib_2/num_sign_test.dart

Issue 2987203002: Migrated test block 17 to Dart 2.0. (Closed)
Patch Set: Created 3 years, 4 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 num.clamp. 4 // Test num.clamp.
5 // VMOptions=--no-use-field-guards 5 // VMOptions=--no-use-field-guards
6 // VMOptions= 6 // VMOptions=
7 7
8 import "package:expect/expect.dart"; 8 import "package:expect/expect.dart";
9 9
10 // Pedestrian implementation of sign, following its specification directly. 10 // Pedestrian implementation of sign, following its specification directly.
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 Expect.equals(number.isNegative, actualSign.isNegative, "$number:negative"); 100 Expect.equals(number.isNegative, actualSign.isNegative, "$number:negative");
101 var renumber = actualSign * number.abs(); 101 var renumber = actualSign * number.abs();
102 Expect.equals(number, renumber, "$number (sign*abs)"); 102 Expect.equals(number, renumber, "$number (sign*abs)");
103 if (number is int) { 103 if (number is int) {
104 Expect.isTrue(renumber is int, "$number (sign*abs) is int"); 104 Expect.isTrue(renumber is int, "$number (sign*abs) is int");
105 } else { 105 } else {
106 Expect.isTrue(renumber is double, "$number (sign*abs) is double"); 106 Expect.isTrue(renumber is double, "$number (sign*abs) is double");
107 } 107 }
108 } 108 }
109 } 109 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698