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

Side by Side Diff: editor/util/debuggertest/pets.dart

Issue 11770004: Rename Date to DateTime. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments and keep Backwards-compatibility class Date. Created 7 years, 11 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 1
2 library pets; 2 library pets;
3 3
4 import 'dart:collection' show DoubleLinkedQueue; 4 import 'dart:collection' show DoubleLinkedQueue;
5 import 'dart:isolate'; 5 import 'dart:isolate';
6 import 'dart:math'; 6 import 'dart:math';
7 7
8 final num MAX_CATS = 10; 8 final num MAX_CATS = 10;
9 9
10 final SPARKY = const Cat("Sparky"); 10 final SPARKY = const Cat("Sparky");
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 class Dog extends FloppyEars implements Animal { 94 class Dog extends FloppyEars implements Animal {
95 static final String BEST_DOG_NAME = "Chips"; 95 static final String BEST_DOG_NAME = "Chips";
96 96
97 String name; 97 String name;
98 98
99 bool collar; 99 bool collar;
100 100
101 int fleaCount; 101 int fleaCount;
102 102
103 Date bornOn; 103 DateTime bornOn;
104 104
105 Dog(this.name) { 105 Dog(this.name) {
106 var rand = new Random(); 106 var rand = new Random();
107 fleaCount = rand.nextInt(10); 107 fleaCount = rand.nextInt(10);
108 bornOn = new Date.now(); 108 bornOn = new DateTime.now();
109 } 109 }
110 110
111 Dog.withFleas(this.name, this.fleaCount) { 111 Dog.withFleas(this.name, this.fleaCount) {
112 bornOn = new Date.now(); 112 bornOn = new DateTime.now();
113 } 113 }
114 114
115 bool livesWith(Animal other) => true; 115 bool livesWith(Animal other) => true;
116 116
117 void performAction() { 117 void performAction() {
118 String name = "iHideAnInstanceVariable"; 118 String name = "iHideAnInstanceVariable";
119 119
120 print("bark"); 120 print("bark");
121 121
122 var closure = () { 122 var closure = () {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 for (int i = 0; i < arr.length; i++) { 216 for (int i = 0; i < arr.length; i++) {
217 arr[i] = i * 10; 217 arr[i] = i * 10;
218 } 218 }
219 219
220 print("big array created"); 220 print("big array created");
221 221
222 arr[0] = "assdsdf"; 222 arr[0] = "assdsdf";
223 223
224 arr[0]++; 224 arr[0]++;
225 } 225 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698