Skip to content
This repository was archived by the owner on Oct 28, 2024. It is now read-only.

Commit b703d0c

Browse files
authored
Merge pull request #6 from dart-lang/fix-dart-2
Fix to use lowercase Dart 2 core library constant names.
2 parents 0e339e4 + f3fcaf9 commit b703d0c

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ language: dart
77

88
dart:
99
- dev
10-
- stable
1110

1211
# See https://docs.travis-ci.com/user/languages/dart/ for details.
1312
dart_task:
@@ -19,10 +18,9 @@ dart_task:
1918
# them against each Dart version.
2019
matrix:
2120
include:
22-
- dart: stable
23-
dart_task: dartfmt
2421
- dart: dev
2522
dart_task: dartanalyzer
23+
dart_task: dartfmt
2624

2725
# Only building master means that we don't run two builds for each pull request.
2826
branches:

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.0.1
2+
3+
* Update to lowercase Dart core library constants.
4+
15
## 1.0.0
26

37
This release contains the `Clock` class that was defined in [`quiver`][]. It's

analysis_options.yaml

Lines changed: 0 additions & 2 deletions
This file was deleted.

lib/src/utils.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const _daysInMonth = const [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
2929
/// This function assumes the use of the Gregorian calendar or the proleptic
3030
/// Gregorian calendar.
3131
int daysInMonth(int year, int month) =>
32-
(month == DateTime.FEBRUARY && isLeapYear(year)) ? 29 : _daysInMonth[month];
32+
(month == DateTime.february && isLeapYear(year)) ? 29 : _daysInMonth[month];
3333

3434
/// Returns true if [year] is a leap year.
3535
///

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: clock
2-
version: 1.0.0
2+
version: 1.0.1
33
description: A fakeable wrapper for dart:core clock APIs
44
author: Dart Team <[email protected]>
55
homepage: https://github.com/dart-lang/clock
66

77
environment:
8-
sdk: '>=1.24.0 <2.0.0'
8+
sdk: '>=2.0.0-dev.36.0 <3.0.0'
99

1010
dependencies:
1111
meta: '>=0.9.0 <2.0.0'

test/stopwatch_test.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ void main() {
3535
test("stop() does nothing", () {
3636
stopwatch.stop();
3737
expect(stopwatch.isRunning, isFalse);
38-
expect(stopwatch.elapsed, equals(Duration.ZERO));
38+
expect(stopwatch.elapsed, equals(Duration.zero));
3939
});
4040

4141
group("reports no elapsed", () {
42-
test("duration", () => expect(stopwatch.elapsed, equals(Duration.ZERO)));
42+
test("duration", () => expect(stopwatch.elapsed, equals(Duration.zero)));
4343
test("ticks", () => expect(stopwatch.elapsedTicks, isZero));
4444
test("microseconds", () => expect(stopwatch.elapsedMicroseconds, isZero));
4545
test("milliseconds", () => expect(stopwatch.elapsedMilliseconds, isZero));
@@ -79,7 +79,7 @@ void main() {
7979
});
8080

8181
test("sets the elapsed time to zero", () {
82-
expect(stopwatch.elapsed, equals(Duration.ZERO));
82+
expect(stopwatch.elapsed, equals(Duration.zero));
8383
});
8484

8585
test("reports more elapsed time", () {
@@ -135,12 +135,12 @@ void main() {
135135
});
136136

137137
test("sets the elapsed time to zero", () {
138-
expect(stopwatch.elapsed, equals(Duration.ZERO));
138+
expect(stopwatch.elapsed, equals(Duration.zero));
139139
});
140140

141141
test("doesn't report more elapsed time", () {
142142
time = clock.microsFromNow(54321);
143-
expect(stopwatch.elapsed, equals(Duration.ZERO));
143+
expect(stopwatch.elapsed, equals(Duration.zero));
144144
});
145145
});
146146

0 commit comments

Comments
 (0)