From 43af9e623df53747f6abd6530ec6962aa4984906 Mon Sep 17 00:00:00 2001 From: Mike Fairhurst Date: Mon, 19 Feb 2018 15:00:30 -0800 Subject: [PATCH] Changes for landing https://github.com/dart-lang/sdk/issues/32161 Add void declarations to methods with implicit dynamic returning void values, which may be illegal in dart 2, but in either case, expresses the current intent better. --- test/hit_types_test.dart | 2 +- test/src/common.dart | 6 +++--- test/usage_impl_io_test.dart | 2 +- test/usage_impl_test.dart | 2 +- test/usage_test.dart | 2 +- test/uuid_test.dart | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/hit_types_test.dart b/test/hit_types_test.dart index e8bf241..a7ee490 100644 --- a/test/hit_types_test.dart +++ b/test/hit_types_test.dart @@ -11,7 +11,7 @@ import 'package:usage/usage.dart'; import 'src/common.dart'; -main() => defineTests(); +void main() => defineTests(); void defineTests() { group('screenView', () { diff --git a/test/src/common.dart b/test/src/common.dart index 7799394..c2f1a5e 100644 --- a/test/src/common.dart +++ b/test/src/common.dart @@ -12,9 +12,9 @@ import 'package:usage/src/usage_impl.dart'; AnalyticsImplMock createMock({Map props}) => new AnalyticsImplMock('UA-0', props: props); -was(Map m, String type) => expect(m['t'], type); -has(Map m, String key) => expect(m[key], isNotNull); -hasnt(Map m, String key) => expect(m[key], isNull); +void was(Map m, String type) => expect(m['t'], type); +void has(Map m, String key) => expect(m[key], isNotNull); +void hasnt(Map m, String key) => expect(m[key], isNull); class AnalyticsImplMock extends AnalyticsImpl { MockProperties get mockProperties => properties; diff --git a/test/usage_impl_io_test.dart b/test/usage_impl_io_test.dart index 7f1719c..a9c30d4 100644 --- a/test/usage_impl_io_test.dart +++ b/test/usage_impl_io_test.dart @@ -11,7 +11,7 @@ import 'dart:io'; import 'package:test/test.dart'; import 'package:usage/src/usage_impl_io.dart'; -main() => defineTests(); +void main() => defineTests(); void defineTests() { group('IOPostHandler', () { diff --git a/test/usage_impl_test.dart b/test/usage_impl_test.dart index a4ca3ac..2a3ea35 100644 --- a/test/usage_impl_test.dart +++ b/test/usage_impl_test.dart @@ -9,7 +9,7 @@ import 'package:usage/src/usage_impl.dart'; import 'src/common.dart'; -main() => defineTests(); +void main() => defineTests(); void defineTests() { group('ThrottlingBucket', () { diff --git a/test/usage_test.dart b/test/usage_test.dart index 37500a9..d97d7b4 100644 --- a/test/usage_test.dart +++ b/test/usage_test.dart @@ -7,7 +7,7 @@ library usage.usage_test; import 'package:test/test.dart'; import 'package:usage/usage.dart'; -main() => defineTests(); +void main() => defineTests(); void defineTests() { group('AnalyticsMock', () { diff --git a/test/uuid_test.dart b/test/uuid_test.dart index 98dbab8..81762e7 100644 --- a/test/uuid_test.dart +++ b/test/uuid_test.dart @@ -7,7 +7,7 @@ library usage.uuid_test; import 'package:test/test.dart'; import 'package:usage/uuid/uuid.dart'; -main() => defineTests(); +void main() => defineTests(); void defineTests() { group('uuid', () {