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

Side by Side Diff: tests/corelib/json_test.dart

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library json_test; 5 library json_test;
6 6
7 import "package:expect/expect.dart";
7 import "dart:json"; 8 import "dart:json";
8 9
9 bool badFormat(e) => e is FormatException; 10 bool badFormat(e) => e is FormatException;
10 11
11 void testJson(json, expected) { 12 void testJson(json, expected) {
12 var value = parse(json); 13 var value = parse(json);
13 compare(expected, actual, path) { 14 compare(expected, actual, path) {
14 if (expected is List) { 15 if (expected is List) {
15 Expect.isTrue(actual is List); 16 Expect.isTrue(actual is List);
16 Expect.equals(expected.length, actual.length, "$path: List length"); 17 Expect.equals(expected.length, actual.length, "$path: List length");
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 } 243 }
243 244
244 main() { 245 main() {
245 testNumbers(); 246 testNumbers();
246 testStrings(); 247 testStrings();
247 testWords(); 248 testWords();
248 testObjects(); 249 testObjects();
249 testArrays(); 250 testArrays();
250 testWhitespace(); 251 testWhitespace();
251 } 252 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698