diff --git a/.travis.yml b/.travis.yml index 9124e035b5376..70fa656b9f67b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,6 @@ language: dart dart: - dev -- stable # See https://docs.travis-ci.com/user/languages/dart/ for details. dart_task: @@ -19,10 +18,9 @@ dart_task: # them against each Dart version. matrix: include: - - dart: stable - dart_task: dartfmt - dart: dev dart_task: dartanalyzer + dart_task: dartfmt # Only building master means that we don't run two builds for each pull request. branches: diff --git a/CHANGELOG.md b/CHANGELOG.md index de66ff8dc766c..d1932bce8e317 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.1 + +* Update to lowercase Dart core library constants. + ## 1.0.0 This release contains the `Clock` class that was defined in [`quiver`][]. It's diff --git a/analysis_options.yaml b/analysis_options.yaml deleted file mode 100644 index a10d4c5a05c98..0000000000000 --- a/analysis_options.yaml +++ /dev/null @@ -1,2 +0,0 @@ -analyzer: - strong-mode: true diff --git a/lib/src/utils.dart b/lib/src/utils.dart index 48fd0be30ae6b..c1223cf98c1b1 100644 --- a/lib/src/utils.dart +++ b/lib/src/utils.dart @@ -29,7 +29,7 @@ const _daysInMonth = const [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; /// This function assumes the use of the Gregorian calendar or the proleptic /// Gregorian calendar. int daysInMonth(int year, int month) => - (month == DateTime.FEBRUARY && isLeapYear(year)) ? 29 : _daysInMonth[month]; + (month == DateTime.february && isLeapYear(year)) ? 29 : _daysInMonth[month]; /// Returns true if [year] is a leap year. /// diff --git a/pubspec.yaml b/pubspec.yaml index 8a79678a29dfb..6d7325de87d4e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,11 +1,11 @@ name: clock -version: 1.0.0 +version: 1.0.1 description: A fakeable wrapper for dart:core clock APIs author: Dart Team homepage: https://github.com/dart-lang/clock environment: - sdk: '>=1.24.0 <2.0.0' + sdk: '>=2.0.0-dev.36.0 <3.0.0' dependencies: meta: '>=0.9.0 <2.0.0' diff --git a/test/stopwatch_test.dart b/test/stopwatch_test.dart index 11e6255225c8d..151d2dc956899 100644 --- a/test/stopwatch_test.dart +++ b/test/stopwatch_test.dart @@ -35,11 +35,11 @@ void main() { test("stop() does nothing", () { stopwatch.stop(); expect(stopwatch.isRunning, isFalse); - expect(stopwatch.elapsed, equals(Duration.ZERO)); + expect(stopwatch.elapsed, equals(Duration.zero)); }); group("reports no elapsed", () { - test("duration", () => expect(stopwatch.elapsed, equals(Duration.ZERO))); + test("duration", () => expect(stopwatch.elapsed, equals(Duration.zero))); test("ticks", () => expect(stopwatch.elapsedTicks, isZero)); test("microseconds", () => expect(stopwatch.elapsedMicroseconds, isZero)); test("milliseconds", () => expect(stopwatch.elapsedMilliseconds, isZero)); @@ -79,7 +79,7 @@ void main() { }); test("sets the elapsed time to zero", () { - expect(stopwatch.elapsed, equals(Duration.ZERO)); + expect(stopwatch.elapsed, equals(Duration.zero)); }); test("reports more elapsed time", () { @@ -135,12 +135,12 @@ void main() { }); test("sets the elapsed time to zero", () { - expect(stopwatch.elapsed, equals(Duration.ZERO)); + expect(stopwatch.elapsed, equals(Duration.zero)); }); test("doesn't report more elapsed time", () { time = clock.microsFromNow(54321); - expect(stopwatch.elapsed, equals(Duration.ZERO)); + expect(stopwatch.elapsed, equals(Duration.zero)); }); });