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"; |
| 6 |
5 part "../../../sdk/lib/io/base64.dart"; | 7 part "../../../sdk/lib/io/base64.dart"; |
6 | 8 |
7 void main() { | 9 void main() { |
8 String line; | 10 String line; |
9 String expected; | 11 String expected; |
10 | 12 |
11 line = | 13 line = |
12 "Man is distinguished, not only by his reason, but by this singular " | 14 "Man is distinguished, not only by his reason, but by this singular " |
13 "passion from other animals, which is a lust of the mind, that by a " | 15 "passion from other animals, which is a lust of the mind, that by a " |
14 "perseverance of delight in the continued and indefatigable generation " | 16 "perseverance of delight in the continued and indefatigable generation " |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 for (int i = 0; i < 251; i++) { | 62 for (int i = 0; i < 251; i++) { |
61 List<int> x = [i, i + 1, i + 2, i + 3, i + 4, i + 5]; | 63 List<int> x = [i, i + 1, i + 2, i + 3, i + 4, i + 5]; |
62 Expect.listEquals(x, _Base64._decode(_Base64._encode(x))); | 64 Expect.listEquals(x, _Base64._decode(_Base64._encode(x))); |
63 } | 65 } |
64 | 66 |
65 for (int i = 0; i < 250; i++) { | 67 for (int i = 0; i < 250; i++) { |
66 List<int> x = [i, i + 1, i + 2, i + 3, i + 4, i + 5, i + 6]; | 68 List<int> x = [i, i + 1, i + 2, i + 3, i + 4, i + 5, i + 6]; |
67 Expect.listEquals(x, _Base64._decode(_Base64._encode(x))); | 69 Expect.listEquals(x, _Base64._decode(_Base64._encode(x))); |
68 } | 70 } |
69 } | 71 } |
OLD | NEW |