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

Unified Diff: test/dart_codegen/expect/convert/utf.dart

Issue 959073002: Fix new line breaks on } (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 10 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: test/dart_codegen/expect/convert/utf.dart
diff --git a/test/dart_codegen/expect/convert/utf.dart b/test/dart_codegen/expect/convert/utf.dart
index 97c9f773962cdae15b4bf86f661ec2e9146792dd..cdff9d743a9dd53b0905b83398d8cd5074295eef 100644
--- a/test/dart_codegen/expect/convert/utf.dart
+++ b/test/dart_codegen/expect/convert/utf.dart
@@ -73,9 +73,7 @@ if (start != end && _isLeadSurrogate(str.codeUnitAt(end - 1))) {
end--;
}
int stringIndex;
- for (stringIndex = start;
- stringIndex < end;
- stringIndex++) {
+ for (stringIndex = start; stringIndex < end; stringIndex++) {
int codeUnit = str.codeUnitAt(stringIndex);
if (codeUnit <= _ONE_BYTE_LIMIT) {
if (_bufferIndex >= _buffer.length) break;
@@ -223,9 +221,7 @@ int value = _value;
int scanOneByteCharacters(units, int from) {
final to = endIndex;
final mask = _ONE_BYTE_LIMIT;
- for (var i = from;
- i < to;
- i++) {
+ for (var i = from; i < to; i++) {
final unit = units[i];
if ((unit & mask) != unit) return i - from;
}
@@ -245,9 +241,8 @@ break loop;
if ((unit & 0xC0) != 0x80) {
expectedUnits = 0;
if (!_allowMalformed) {
- throw new FormatException("Bad UTF-8 encoding 0x${unit.toRadixString(16)}
-");
-}
+ throw new FormatException("Bad UTF-8 encoding 0x${unit.toRadixString(16)}");
+ }
_isFirstCharacter = false;
_stringSink.writeCharCode(UNICODE_REPLACEMENT_CHARACTER_RUNE);
break multibyte;
@@ -260,16 +255,14 @@ value = (value << 6) | (unit & 0x3f);
}
while (expectedUnits > 0); if (value <= _LIMITS[extraUnits - 1]) {
if (!_allowMalformed) {
-throw new FormatException("Overlong encoding of 0x${value.toRadixString(16)}
-");
+throw new FormatException("Overlong encoding of 0x${value.toRadixString(16)}");
}
expectedUnits = extraUnits = 0;
value = UNICODE_REPLACEMENT_CHARACTER_RUNE;
}
if (value > _FOUR_BYTE_LIMIT) {
if (!_allowMalformed) {
-throw new FormatException("Character outside valid Unicode range: " "0x${value.toRadixString(16)}
-");
+throw new FormatException("Character outside valid Unicode range: " "0x${value.toRadixString(16)}");
}
value = UNICODE_REPLACEMENT_CHARACTER_RUNE;
}
@@ -289,8 +282,7 @@ _isFirstCharacter = false;
int unit = codeUnits[i++];
if (unit < 0) {
if (!_allowMalformed) {
-throw new FormatException("Negative UTF-8 code unit: -0x${(-unit).toRadixString(16)}
-");
+throw new FormatException("Negative UTF-8 code unit: -0x${(-unit).toRadixString(16)}");
}
_stringSink.writeCharCode(UNICODE_REPLACEMENT_CHARACTER_RUNE);
}
@@ -311,8 +303,7 @@ value = unit & 0x07;
continue loop;
}
if (!_allowMalformed) {
-throw new FormatException("Bad UTF-8 encoding 0x${unit.toRadixString(16)}
-");
+throw new FormatException("Bad UTF-8 encoding 0x${unit.toRadixString(16)}");
}
value = UNICODE_REPLACEMENT_CHARACTER_RUNE;
expectedUnits = extraUnits = 0;
« no previous file with comments | « test/dart_codegen/expect/convert/string_conversion.dart ('k') | test/dart_codegen/expect/core/date_time.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698