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

Unified Diff: tests/lib/convert/json_pretty_test.dart

Issue 1128183004: Stop using pkg/matcher in JSON pretty test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/convert/json_pretty_test.dart
diff --git a/tests/lib/convert/json_pretty_test.dart b/tests/lib/convert/json_pretty_test.dart
index 0679ff448f8936ba018f21c2d58eda91a15e07d6..a0c3bc61e350b185210429005dc31f85eb37c833 100644
--- a/tests/lib/convert/json_pretty_test.dart
+++ b/tests/lib/convert/json_pretty_test.dart
@@ -6,12 +6,12 @@ library json_pretty_test;
import 'dart:convert';
-import 'package:matcher/matcher.dart';
+import "package:expect/expect.dart";
void _testIndentWithNullChar() {
var encoder = const JsonEncoder.withIndent('\x00');
var encoded = encoder.convert([[],[[]]]);
- expect(encoded, "[\n\x00[],\n\x00[\n\x00\x00[]\n\x00]\n]");
+ Expect.equals("[\n\x00[],\n\x00[\n\x00\x00[]\n\x00]\n]", encoded);
}
void main() {
@@ -91,7 +91,7 @@ void _expect(Object object, String expected) {
var encoder = const JsonEncoder.withIndent(' ');
var prettyOutput = encoder.convert(object);
- expect(prettyOutput, expected);
+ Expect.equals(expected, prettyOutput);
encoder = const JsonEncoder.withIndent('');
@@ -101,14 +101,14 @@ void _expect(Object object, String expected) {
.map((line) => line.trimLeft())
.join('\n');
- expect(flatOutput, flatExpected);
+ Expect.equals(flatExpected, flatOutput);
var compactOutput = JSON.encode(object);
encoder = const JsonEncoder.withIndent(null);
- expect(encoder.convert(object), compactOutput);
+ Expect.equals(compactOutput, encoder.convert(object));
var prettyDecoded = JSON.decode(prettyOutput);
- expect(JSON.encode(prettyDecoded), compactOutput);
+ Expect.equals(compactOutput, JSON.encode(prettyDecoded));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698