Shim package:test to avoid matcher issues (#20602)

* Upgrade everything except matcher.
* Roll matcher (and test)
* Adjust tests that depend on flutter:test directly to depend on a shim
* Require use of package:test shim and remove other references to package:test
This commit is contained in:
Ian Hickson
2018-08-14 20:33:58 -07:00
committed by Todd Volkert
parent 8de0e15e4f
commit 686d8f8a22
258 changed files with 629 additions and 468 deletions

View File

@@ -7,7 +7,8 @@ import 'dart:async';
import 'package:fuchsia_remote_debug_protocol/src/dart/dart_vm.dart';
import 'package:json_rpc_2/json_rpc_2.dart' as json_rpc;
import 'package:mockito/mockito.dart';
import 'package:test/test.dart';
import '../../common.dart';
void main() {
group('DartVm.connect', () {
@@ -203,7 +204,7 @@ void main() {
}
// Both views should be invalid as they were missing required fields.
expect(failingFunction, throwsA(const isInstanceOf<RpcFormatError>()));
expect(failingFunction, throwsA(isInstanceOf<RpcFormatError>()));
});
test('get isolates by pattern', () async {
@@ -283,7 +284,7 @@ void main() {
}
// Both views should be invalid as they were missing required fields.
expect(failingFunction, throwsA(const isInstanceOf<RpcFormatError>()));
expect(failingFunction, throwsA(isInstanceOf<RpcFormatError>()));
});
});
@@ -315,7 +316,7 @@ void main() {
await vm.invokeRpc('somesillyfunction', timeout: timeoutTime);
}
expect(failingFunction, throwsA(const isInstanceOf<TimeoutException>()));
expect(failingFunction, throwsA(isInstanceOf<TimeoutException>()));
});
});
}

View File

@@ -5,11 +5,12 @@
import 'dart:async';
import 'dart:io' show ProcessResult;
import 'package:test/test.dart';
import 'package:mockito/mockito.dart';
import 'package:process/process.dart';
import 'package:fuchsia_remote_debug_protocol/src/runners/ssh_command_runner.dart';
import '../../common.dart';
void main() {
group('SshCommandRunner.constructors', () {
test('throws exception with invalid address', () async {
@@ -99,7 +100,7 @@ void main() {
await runner.run('oihaw');
}
expect(failingFunction, throwsA(const isInstanceOf<SshCommandError>()));
expect(failingFunction, throwsA(isInstanceOf<SshCommandError>()));
});
test('verify correct args with config', () async {