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

Side by Side Diff: pkg/serialization/test/serialization_test.dart

Issue 22284003: pkg: analysis aided cleanup (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: nits Created 7 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 | « pkg/serialization/lib/serialization.dart ('k') | pkg/unittest/lib/interactive_html_config.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) 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 serialization_test; 5 library serialization_test;
6 6
7 import 'dart:json' as json; 7 import 'dart:json' as json;
8 import 'package:unittest/unittest.dart'; 8 import 'package:unittest/unittest.dart';
9 import 'package:serialization/serialization.dart'; 9 import 'package:serialization/serialization.dart';
10 import 'package:serialization/src/serialization_helpers.dart'; 10 import 'package:serialization/src/serialization_helpers.dart';
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 // returns a blank serialization, to make sure it will fail 241 // returns a blank serialization, to make sure it will fail
242 // the second time. 242 // the second time.
243 var s; 243 var s;
244 oneShotSetup(node) { 244 oneShotSetup(node) {
245 if (s == null) { 245 if (s == null) {
246 s = nodeSerializerReflective(node)..selfDescribing = true; 246 s = nodeSerializerReflective(node)..selfDescribing = true;
247 return s; 247 return s;
248 } else { 248 } else {
249 s = null; 249 s = null;
250 return new Serialization.blank() 250 return new Serialization.blank()
251 ..namedObjects['Node'] = reflect(new Node('')).type;; 251 ..namedObjects['Node'] = reflect(new Node('')).type;
252 } 252 }
253 } 253 }
254 254
255 runRoundTripTest(oneShotSetup); 255 runRoundTripTest(oneShotSetup);
256 }); 256 });
257 257
258 test('round-trip ClosureRule', () { 258 test('round-trip ClosureRule', () {
259 runRoundTripTest(nodeSerializerNonReflective); 259 runRoundTripTest(nodeSerializerNonReflective);
260 }); 260 });
261 261
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 804
805 /** 805 /**
806 * Function used in an isolate to make sure that the output passes through 806 * Function used in an isolate to make sure that the output passes through
807 * isolate serialization properly. 807 * isolate serialization properly.
808 */ 808 */
809 void echo() { 809 void echo() {
810 port.receive((msg, reply) { 810 port.receive((msg, reply) {
811 reply.send(msg); 811 reply.send(msg);
812 }); 812 });
813 } 813 }
OLDNEW
« no previous file with comments | « pkg/serialization/lib/serialization.dart ('k') | pkg/unittest/lib/interactive_html_config.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698