This commit is contained in:
Dan Field
2020-01-27 14:36:02 -08:00
committed by GitHub
parent 31cd3c7b80
commit 8b2993337a
196 changed files with 1605 additions and 1682 deletions

View File

@@ -13,7 +13,7 @@ export 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
// TODO(ianh): Remove this file once https://github.com/dart-lang/matcher/issues/98 is fixed
/// A matcher that compares the type of the actual value to the type argument T.
Matcher isInstanceOf<T>() => test_package.TypeMatcher<T>();
test_package.TypeMatcher<T> isInstanceOf<T>() => isA<T>();
void tryToDelete(Directory directory) {
// This should not be necessary, but it turns out that

View File

@@ -25,7 +25,7 @@ void main() {
expectAsync1((List<String> commandLine) async {
return processRunner.runProcess(commandLine);
})(<String>['this_executable_better_not_exist_2857632534321']),
throwsA(isInstanceOf<PreparePackageException>()));
throwsA(isA<PreparePackageException>()));
try {
await processRunner.runProcess(<String>['this_executable_better_not_exist_2857632534321']);
} on PreparePackageException catch (e) {
@@ -64,7 +64,7 @@ void main() {
expectAsync1((List<String> commandLine) async {
return processRunner.runProcess(commandLine);
})(<String>['echo', 'test']),
throwsA(isInstanceOf<PreparePackageException>()));
throwsA(isA<PreparePackageException>()));
});
});
group('ArchiveCreator for $platformName', () {
@@ -185,8 +185,7 @@ void main() {
'git reset --hard $testRef': <ProcessResult>[ProcessResult(0, -1, 'output2', '')],
};
processManager.fakeResults = calls;
expect(expectAsync0(creator.initializeRepo),
throwsA(isInstanceOf<PreparePackageException>()));
expect(expectAsync0(creator.initializeRepo), throwsA(isA<PreparePackageException>()));
});
test('non-strict mode calls the right commands', () async {