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

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

Issue 11644030: Rename specialTreatmentFor, improve handling of constants as constructor parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 /** Provides some basic model classes to test serialization. */ 5 /** Provides some basic model classes to test serialization. */
6 6
7 part of serialization_test; 7 part of serialization_test;
8 8
9 class Person { 9 class Person {
10 String name, rank, serialNumber; 10 String name, rank, serialNumber;
11 var address; 11 var address;
12 } 12 }
13 13
14 class Address { 14 class Address {
15 String street, city, state, zip; 15 String street, city, state, zip;
16 Address();
17 Address.with(this.street, this.city, this.state, this.zip);
16 } 18 }
17 19
18 class Various { 20 class Various {
19 Various.Foo(this._d, this.e); 21 Various.Foo(this._d, this.e);
20 22
21 // Field 23 // Field
22 var a; 24 var a;
23 25
24 // Get/Set pair 26 // Get/Set pair
25 var _b; 27 var _b;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 class Stream { 66 class Stream {
65 // In a real stream the position wouldn't likely be settable, making 67 // In a real stream the position wouldn't likely be settable, making
66 // this trickier to reconstruct. 68 // this trickier to reconstruct.
67 List _collection; 69 List _collection;
68 int position = 0; 70 int position = 0;
69 Stream(this._collection); 71 Stream(this._collection);
70 72
71 next() => atEnd() ? null : _collection[position++]; 73 next() => atEnd() ? null : _collection[position++];
72 atEnd() => position >= _collection.length; 74 atEnd() => position >= _collection.length;
73 } 75 }
OLDNEW
« pkg/serialization/lib/src/basic_rule.dart ('K') | « pkg/serialization/test/serialization_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698