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

Unified Diff: third_party/dart-packages/matcher/matcher/src/core_matchers.dart

Issue 971083002: Create an apptesting framework for dart. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Update upload_binaries.py to add the apptest.dartzip artifact. 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: third_party/dart-packages/matcher/matcher/src/core_matchers.dart
diff --git a/sky/tests/resources/third_party/matcher/src/core_matchers.dart b/third_party/dart-packages/matcher/matcher/src/core_matchers.dart
similarity index 99%
copy from sky/tests/resources/third_party/matcher/src/core_matchers.dart
copy to third_party/dart-packages/matcher/matcher/src/core_matchers.dart
index abecb769856fa31f053c2a0202c904948d5f30e9..a3d1f5750dcfeea6736b26a4b8073a82ee31de0a 100644
--- a/sky/tests/resources/third_party/matcher/src/core_matchers.dart
+++ b/third_party/dart-packages/matcher/matcher/src/core_matchers.dart
@@ -297,8 +297,8 @@ class _StringEqualsMatcher extends Matcher {
} else {
var buff = new StringBuffer();
buff.write('is different.');
- var escapedItem = _escape(item);
- var escapedValue = _escape(_value);
+ var escapedItem = escape(item);
+ var escapedValue = escape(_value);
int minLength = escapedItem.length < escapedValue.length
? escapedItem.length
: escapedValue.length;
@@ -334,9 +334,6 @@ class _StringEqualsMatcher extends Matcher {
}
}
- static String _escape(String s) =>
- s.replaceAll('\n', '\\n').replaceAll('\r', '\\r').replaceAll('\t', '\\t');
-
static void _writeLeading(StringBuffer buff, String s, int start) {
if (start > 10) {
buff.write('... ');

Powered by Google App Engine
This is Rietveld 408576698