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

Unified Diff: tests/lib_strong/convert/chunked_conversion_utf82_test.dart

Issue 2989993002: fix unsound cast failures in tests (Closed)
Patch Set: fix Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: tests/lib_strong/convert/chunked_conversion_utf82_test.dart
diff --git a/tests/lib_strong/convert/chunked_conversion_utf82_test.dart b/tests/lib_strong/convert/chunked_conversion_utf82_test.dart
index fe368fcd0b7490a96fccbeb6353634e0cf208164..7efdce95bcb352d65e1160d11ea43547699709af 100644
--- a/tests/lib_strong/convert/chunked_conversion_utf82_test.dart
+++ b/tests/lib_strong/convert/chunked_conversion_utf82_test.dart
@@ -13,7 +13,7 @@ String decode(List<int> bytes, int chunkSize) {
var byteSink = new Utf8Decoder().startChunkedConversion(stringSink);
int i = 0;
while (i < bytes.length) {
- List nextChunk = [];
+ var nextChunk = <int>[];
for (int j = 0; j < chunkSize; j++) {
if (i < bytes.length) {
nextChunk.add(bytes[i]);
@@ -33,7 +33,7 @@ String decodeAllowMalformed(List<int> bytes, int chunkSize) {
var byteSink = decoder.startChunkedConversion(stringSink);
int i = 0;
while (i < bytes.length) {
- List nextChunk = [];
+ var nextChunk = <int>[];
for (int j = 0; j < chunkSize; j++) {
if (i < bytes.length) {
nextChunk.add(bytes[i]);
@@ -226,37 +226,37 @@ main() {
return [
[test, "\u{FFFD}"],
[
- new List.from([0x61])..addAll(test),
+ new List<int>.from([0x61])..addAll(test),
"a\u{FFFD}"
],
[
- new List.from([0x61])
+ new List<int>.from([0x61])
..addAll(test)
..add(0x61),
"a\u{FFFD}a"
],
- [new List.from(test)..add(0x61), "\u{FFFD}a"],
- [new List.from(test)..addAll(test), "\u{FFFD}\u{FFFD}"],
+ [new List<int>.from(test)..add(0x61), "\u{FFFD}a"],
+ [new List<int>.from(test)..addAll(test), "\u{FFFD}\u{FFFD}"],
[
- new List.from(test)
+ new List<int>.from(test)
..add(0x61)
..addAll(test),
"\u{FFFD}a\u{FFFD}"
],
[
- new List.from([0xc3, 0xa5])..addAll(test),
+ new List<int>.from([0xc3, 0xa5])..addAll(test),
"å\u{FFFD}"
],
[
- new List.from([0xc3, 0xa5])..addAll(test)..addAll([0xc3, 0xa5]),
+ new List<int>.from([0xc3, 0xa5])..addAll(test)..addAll([0xc3, 0xa5]),
"å\u{FFFD}å"
],
[
- new List.from(test)..addAll([0xc3, 0xa5]),
+ new List<int>.from(test)..addAll([0xc3, 0xa5]),
"\u{FFFD}å"
],
[
- new List.from(test)..addAll([0xc3, 0xa5])..addAll(test),
+ new List<int>.from(test)..addAll([0xc3, 0xa5])..addAll(test),
"\u{FFFD}å\u{FFFD}"
]
];
« no previous file with comments | « tests/lib_strong/collection/linked_list_test.dart ('k') | tests/lib_strong/convert/chunked_conversion_utf83_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698