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

Unified Diff: lib/src/utils.dart

Issue 1187103004: Allow Suites to be added to an Engine over time. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 5 years, 6 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: lib/src/utils.dart
diff --git a/lib/src/utils.dart b/lib/src/utils.dart
index c5fd4333bc038e0042833562112b64a3147c1f9c..07d7df5dbb058d61ece4d91241c7d007f1183f4c 100644
--- a/lib/src/utils.dart
+++ b/lib/src/utils.dart
@@ -5,6 +5,7 @@
library test.utils;
import 'dart:async';
+import 'dart:convert';
import 'dart:math' as math;
import 'package:crypto/crypto.dart';
@@ -23,6 +24,9 @@ typedef AsyncFunction();
/// A typedef for a zero-argument callback function.
typedef void Callback();
+/// A converter that decodes bytes using UTF-8 and splits them on newlines.
+final lineSplitter = UTF8.decoder.fuse(const LineSplitter());
+
/// A regular expression to match the exception prefix that some exceptions'
/// [Object.toString] values contain.
final _exceptionPrefix = new RegExp(r'^([A-Z][a-zA-Z]*)?(Exception|Error): ');

Powered by Google App Engine
This is Rietveld 408576698