OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |