From b886deb4c32e2fba9707f60309415a3d84f5bf01 Mon Sep 17 00:00:00 2001 From: Will Stubbs Date: Wed, 24 Apr 2019 14:56:55 -0700 Subject: [PATCH] Minor README tidy for Dart 2. (#10) - Remove new - use single quotes --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 68bdba1ff7d60..fd4a131bfef4e 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ import 'package:clock/clock.dart'; T runWithTiming(T callback()) { var stopwatch = clock.stopwatch()..start(); var result = callback(); - print("It took ${stopwatch.elapsed}!"); + print('It took ${stopwatch.elapsed}!'); return result; } ``` @@ -35,13 +35,13 @@ import 'package:fake_async/fake_async.dart'; import 'package:test/test.dart'; void main() { - test("runWithTiming() prints the elapsed time", () { - new FakeAsync().run((async) { + test('runWithTiming() prints the elapsed time', () { + FakeAsync().run((async) { expect(() { runWithTiming(() { - async.elapse(new Duration(seconds: 10)); + async.elapse(Duration(seconds: 10)); }); - }, prints("It took 0:00:10.000000!")); + }, prints('It took 0:00:10.000000!')); }); }); }