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

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

Issue 10836241: Move unittest from lib to pkg. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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
« no previous file with comments | « tests/isolate/unresolved_ports_test.dart ('k') | tests/lib/args/args_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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_tests'); 5 #library('json_tests');
6 6
7 #import('dart:json'); 7 #import('dart:json');
8 #import('dart:html'); 8 #import('dart:html');
9 #import('../../lib/unittest/unittest.dart'); 9 #import('../../pkg/unittest/unittest.dart');
10 #import('../../lib/unittest/html_config.dart'); 10 #import('../../pkg/unittest/html_config.dart');
11 11
12 main() { 12 main() {
13 useHtmlConfiguration(); 13 useHtmlConfiguration();
14 test('Parse', () { 14 test('Parse', () {
15 // Scalars. 15 // Scalars.
16 expect(JSON.parse(' 5 '), equals(5)); 16 expect(JSON.parse(' 5 '), equals(5));
17 expect(JSON.parse(' -42 '), equals(-42)); 17 expect(JSON.parse(' -42 '), equals(-42));
18 expect(JSON.parse(' 3e0 '), equals(3)); 18 expect(JSON.parse(' 3e0 '), equals(3));
19 expect(JSON.parse(' 3.14 '), equals(3.14)); 19 expect(JSON.parse(' 3.14 '), equals(3.14));
20 expect(JSON.parse('true '), isTrue); 20 expect(JSON.parse('true '), isTrue);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 /** 134 /**
135 * Checks that the argument can be converted to a JSON string and 135 * Checks that the argument can be converted to a JSON string and
136 * back, and produce something equivalent to the argument. 136 * back, and produce something equivalent to the argument.
137 */ 137 */
138 validateRoundTrip(expected) { 138 validateRoundTrip(expected) {
139 expect(JSON.parse(JSON.stringify(expected)), equals(expected)); 139 expect(JSON.parse(JSON.stringify(expected)), equals(expected));
140 } 140 }
141 141
142 142
OLDNEW
« no previous file with comments | « tests/isolate/unresolved_ports_test.dart ('k') | tests/lib/args/args_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698