Roll engine to 0c119932c0d6cb30dafd75ec717d1eda76fd7651 (#18575)

This commit is contained in:
Greg Spencer
2018-06-19 00:58:20 -07:00
committed by Florian Loitsch
parent 9e7e6e7c9b
commit 08d1ec36de
93 changed files with 300 additions and 307 deletions

View File

@@ -9,7 +9,7 @@ import 'package:flutter_test/flutter_test.dart';
Future<void> main(FutureOr<void> testMain()) async {
reportTestException = (FlutterErrorDetails details, String testDescription) {
expect(details.exception, const isInstanceOf<StateError>());
expect(details.exception, const TypeMatcher<StateError>());
expect(details.exception.message, 'foo');
expect(testDescription, 'custom exception reporter');
};

View File

@@ -59,7 +59,7 @@ void main() {
group('goldenFileComparator', () {
test('is initialized by test framework', () {
expect(goldenFileComparator, isNotNull);
expect(goldenFileComparator, const isInstanceOf<LocalFileComparator>());
expect(goldenFileComparator, const TypeMatcher<LocalFileComparator>());
final LocalFileComparator comparator = goldenFileComparator;
expect(comparator.basedir.path, contains('flutter_test'));
});
@@ -133,7 +133,7 @@ void main() {
group('fails', () {
test('when golden file does not exist', () async {
final Future<bool> comparison = doComparison();
expect(comparison, throwsA(const isInstanceOf<TestFailure>()));
expect(comparison, throwsA(const TypeMatcher<TestFailure>()));
});
test('when golden bytes are leading subset of image bytes', () async {

View File

@@ -5,8 +5,8 @@
import 'dart:async';
import 'dart:io';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart' hide TypeMatcher;
import 'package:flutter/material.dart' hide TypeMatcher;
import 'package:flutter_test/flutter_test.dart';
import 'package:test/test.dart' as test_package;
import 'package:test/src/frontend/async_matcher.dart' show AsyncMatcher;
@@ -334,7 +334,7 @@ void main() {
expect(
expectAsync0(tester.pageBack),
throwsA(const isInstanceOf<TestFailure>()),
throwsA(const TypeMatcher<TestFailure>()),
);
});
@@ -490,7 +490,7 @@ void main() {
testWidgets('disallows re-entry', (WidgetTester tester) async {
final Completer<void> completer = new Completer<void>();
tester.runAsync<void>(() => completer.future);
expect(() => tester.runAsync(() async {}), throwsA(const isInstanceOf<TestFailure>()));
expect(() => tester.runAsync(() async {}), throwsA(const TypeMatcher<TestFailure>()));
completer.complete();
});