diff --git a/test/list_test.dart b/test/list_test.dart index 60e6dc126..9897f1a17 100755 --- a/test/list_test.dart +++ b/test/list_test.dart @@ -95,7 +95,7 @@ void main() { test('PbList validates items', () { expect(() { (new PbList() as dynamic).add('hello'); - }, throws); + }, throwsA(new isInstanceOf())); }); test('PbList for signed int32 validates items', () { diff --git a/test/map_mixin_test.dart b/test/map_mixin_test.dart index e3d807e84..6cddaaf03 100644 --- a/test/map_mixin_test.dart +++ b/test/map_mixin_test.dart @@ -10,7 +10,7 @@ library map_mixin_test; import 'dart:collection' show MapMixin; import 'package:protobuf/src/protobuf/mixins/map_mixin.dart'; -import 'package:test/test.dart' show test, expect, same, throws; +import 'package:test/test.dart' show expect, same, test, throwsArgumentError; import 'mock_util.dart' show MockMessage, mockInfo; @@ -61,7 +61,7 @@ main() { expect(r.child, same(child)); expect(r["child"], same(child)); - expect(() => r["int32s"] = 123, throws); + expect(() => r["int32s"] = 123, throwsArgumentError); r["int32s"].add(123); expect(r["int32s"], [123]); expect(r["int32s"], same(r["int32s"])); diff --git a/test/reserved_names_test.dart b/test/reserved_names_test.dart index 1e0cdc09a..849e63d38 100755 --- a/test/reserved_names_test.dart +++ b/test/reserved_names_test.dart @@ -14,6 +14,7 @@ import 'package:protobuf/mixins_meta.dart' show findMixin; import 'mirror_util.dart' show findMemberNames; // Import the libraries we will access via the mirrors. +// ignore_for_file: unused_import import 'package:protobuf/protobuf.dart' show GeneratedMessage; import 'package:protobuf/src/protobuf/mixins/event_mixin.dart' show PbEventMixin;