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

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

Issue 2997533002: Migrate test block 10 to Dart 2.0. (Closed)
Patch Set: Fix remaining cases 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) 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"; 5 import "package:expect/expect.dart";
6 6
7 main() { 7 main() {
8 /// Test that converting [value] to a string gives [expect]. 8 /// Test that converting [value] to a string gives [expect].
9 /// Also test that `-value` gives `"-"+expect`. 9 /// Also test that `-value` gives `"-"+expect`.
10 test(int value, String expect) { 10 test(int value, String expect) {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 number *= 10; 80 number *= 10;
81 } 81 }
82 // Fails to represent exactly in dart2js. 82 // Fails to represent exactly in dart2js.
83 for (int i = 15; i < 22; i++) { // //# 01: continued 83 for (int i = 15; i < 22; i++) { // //# 01: continued
84 test(number - 1, "9" * i); // //# 01: continued 84 test(number - 1, "9" * i); // //# 01: continued
85 test(number, "1" + "0" * i); // //# 01: continued 85 test(number, "1" + "0" * i); // //# 01: continued
86 test(number + 1, "1" + "0" * (i - 1) + "1"); // //# 01: continued 86 test(number + 1, "1" + "0" * (i - 1) + "1"); // //# 01: continued
87 number *= 10; // //# 01: continued 87 number *= 10; // //# 01: continued
88 } // //# 01: continued 88 } // //# 01: continued
89 } 89 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698