@@ -19,34 +19,34 @@ import 'package:test/test.dart';
1919import 'utils.dart' ;
2020
2121void main () {
22- test (" returns the system frequency" , () {
22+ test (' returns the system frequency' , () {
2323 expect (fixed (1990 , 11 , 8 ).stopwatch ().frequency,
2424 equals (Stopwatch ().frequency));
2525 });
2626
27- group (" before it starts" , () {
27+ group (' before it starts' , () {
2828 Stopwatch stopwatch;
2929 setUp (() {
3030 stopwatch = clock.stopwatch ();
3131 });
3232
33- test (" is not running" , () => expect (stopwatch.isRunning, isFalse));
33+ test (' is not running' , () => expect (stopwatch.isRunning, isFalse));
3434
35- test (" stop() does nothing" , () {
35+ test (' stop() does nothing' , () {
3636 stopwatch.stop ();
3737 expect (stopwatch.isRunning, isFalse);
3838 expect (stopwatch.elapsed, equals (Duration .zero));
3939 });
4040
41- group (" reports no elapsed" , () {
42- test (" duration" , () => expect (stopwatch.elapsed, equals (Duration .zero)));
43- test (" ticks" , () => expect (stopwatch.elapsedTicks, isZero));
44- test (" microseconds" , () => expect (stopwatch.elapsedMicroseconds, isZero));
45- test (" milliseconds" , () => expect (stopwatch.elapsedMilliseconds, isZero));
41+ group (' reports no elapsed' , () {
42+ test (' duration' , () => expect (stopwatch.elapsed, equals (Duration .zero)));
43+ test (' ticks' , () => expect (stopwatch.elapsedTicks, isZero));
44+ test (' microseconds' , () => expect (stopwatch.elapsedMicroseconds, isZero));
45+ test (' milliseconds' , () => expect (stopwatch.elapsedMilliseconds, isZero));
4646 });
4747 });
4848
49- group (" when 12345μs have elapsed" , () {
49+ group (' when 12345μs have elapsed' , () {
5050 DateTime time;
5151 Clock clock;
5252 Stopwatch stopwatch;
@@ -57,64 +57,64 @@ void main() {
5757 time = clock.microsFromNow (12345 );
5858 });
5959
60- group (" and the stopwatch is active" , () {
61- test (" is running" , () {
60+ group (' and the stopwatch is active' , () {
61+ test (' is running' , () {
6262 expect (stopwatch.isRunning, isTrue);
6363 });
6464
65- test (" reports more elapsed time" , () {
65+ test (' reports more elapsed time' , () {
6666 time = clock.microsFromNow (54321 );
6767 expect (stopwatch.elapsedMicroseconds, equals (66666 ));
6868 });
6969
70- test (" start does nothing" , () {
70+ test (' start does nothing' , () {
7171 stopwatch.start ();
7272 expect (stopwatch.isRunning, isTrue);
7373 expect (stopwatch.elapsedMicroseconds, equals (12345 ));
7474 });
7575
76- group (" reset()" , () {
76+ group (' reset()' , () {
7777 setUp (() {
7878 stopwatch.reset ();
7979 });
8080
81- test (" sets the elapsed time to zero" , () {
81+ test (' sets the elapsed time to zero' , () {
8282 expect (stopwatch.elapsed, equals (Duration .zero));
8383 });
8484
85- test (" reports more elapsed time" , () {
85+ test (' reports more elapsed time' , () {
8686 time = clock.microsFromNow (54321 );
8787 expect (stopwatch.elapsedMicroseconds, equals (54321 ));
8888 });
8989 });
9090
91- group (" reports elapsed" , () {
92- test (" duration" , () {
91+ group (' reports elapsed' , () {
92+ test (' duration' , () {
9393 expect (
9494 stopwatch.elapsed, equals (const Duration (microseconds: 12345 )));
9595 });
9696
97- test (" ticks" , () {
97+ test (' ticks' , () {
9898 expect (stopwatch.elapsedTicks,
9999 equals ((Stopwatch ().frequency * 12345 ) ~ / 1000000 ));
100100 });
101101
102- test (" microseconds" , () {
102+ test (' microseconds' , () {
103103 expect (stopwatch.elapsedMicroseconds, equals (12345 ));
104104 });
105105
106- test (" milliseconds" , () {
106+ test (' milliseconds' , () {
107107 expect (stopwatch.elapsedMilliseconds, equals (12 ));
108108 });
109109 });
110110 });
111111
112- group (" and the stopwatch is inactive, reports that as" , () {
112+ group (' and the stopwatch is inactive, reports that as' , () {
113113 setUp (() {
114114 stopwatch.stop ();
115115 });
116116
117- test (" is not running" , () {
117+ test (' is not running' , () {
118118 expect (stopwatch.isRunning, isFalse);
119119 });
120120
@@ -123,19 +123,19 @@ void main() {
123123 expect (stopwatch.elapsedMicroseconds, equals (12345 ));
124124 });
125125
126- test (" start starts reporting more elapsed time" , () {
126+ test (' start starts reporting more elapsed time' , () {
127127 stopwatch.start ();
128128 expect (stopwatch.isRunning, isTrue);
129129 time = clock.microsFromNow (54321 );
130130 expect (stopwatch.elapsedMicroseconds, equals (66666 ));
131131 });
132132
133- group (" reset()" , () {
133+ group (' reset()' , () {
134134 setUp (() {
135135 stopwatch.reset ();
136136 });
137137
138- test (" sets the elapsed time to zero" , () {
138+ test (' sets the elapsed time to zero' , () {
139139 expect (stopwatch.elapsed, equals (Duration .zero));
140140 });
141141
@@ -145,22 +145,22 @@ void main() {
145145 });
146146 });
147147
148- group (" reports elapsed" , () {
149- test (" duration" , () {
148+ group (' reports elapsed' , () {
149+ test (' duration' , () {
150150 expect (
151151 stopwatch.elapsed, equals (const Duration (microseconds: 12345 )));
152152 });
153153
154- test (" ticks" , () {
154+ test (' ticks' , () {
155155 expect (stopwatch.elapsedTicks,
156156 equals ((Stopwatch ().frequency * 12345 ) ~ / 1000000 ));
157157 });
158158
159- test (" microseconds" , () {
159+ test (' microseconds' , () {
160160 expect (stopwatch.elapsedMicroseconds, equals (12345 ));
161161 });
162162
163- test (" milliseconds" , () {
163+ test (' milliseconds' , () {
164164 expect (stopwatch.elapsedMilliseconds, equals (12 ));
165165 });
166166 });
0 commit comments