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

@@ -6,13 +6,14 @@ import 'dart:async';
import 'dart:math' as math;
import 'dart:ui' as ui;
import 'package:meta/meta.dart';
import 'package:test/test.dart';
import 'package:test/src/frontend/async_matcher.dart'; // ignore: implementation_imports
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/material.dart' hide TypeMatcher;
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'package:meta/meta.dart';
import 'package:test/test.dart' hide TypeMatcher;
import 'package:test/src/frontend/async_matcher.dart'; // ignore: implementation_imports
import 'binding.dart';
import 'finders.dart';
@@ -147,7 +148,7 @@ const Matcher hasAGoodToStringDeep = const _HasGoodToStringDeep();
/// A matcher for functions that throw [FlutterError].
///
/// This is equivalent to `throwsA(const isInstanceOf<FlutterError>())`.
/// This is equivalent to `throwsA(const TypeMatcher<FlutterError>())`.
///
/// See also:
///
@@ -158,7 +159,7 @@ final Matcher throwsFlutterError = throwsA(isFlutterError);
/// A matcher for functions that throw [AssertionError].
///
/// This is equivalent to `throwsA(const isInstanceOf<AssertionError>())`.
/// This is equivalent to `throwsA(const TypeMatcher<AssertionError>())`.
///
/// See also:
///
@@ -169,23 +170,23 @@ final Matcher throwsAssertionError = throwsA(isAssertionError);
/// A matcher for [FlutterError].
///
/// This is equivalent to `const isInstanceOf<FlutterError>()`.
/// This is equivalent to `const TypeMatcher<FlutterError>()`.
///
/// See also:
///
/// * [throwsFlutterError], to test if a function throws a [FlutterError].
/// * [isAssertionError], to test if any object is any kind of [AssertionError].
const Matcher isFlutterError = const isInstanceOf<FlutterError>();
const Matcher isFlutterError = const TypeMatcher<FlutterError>();
/// A matcher for [AssertionError].
///
/// This is equivalent to `const isInstanceOf<AssertionError>()`.
/// This is equivalent to `const TypeMatcher<AssertionError>()`.
///
/// See also:
///
/// * [throwsAssertionError], to test if a function throws any [AssertionError].
/// * [isFlutterError], to test if any object is a [FlutterError].
const Matcher isAssertionError = const isInstanceOf<AssertionError>();
const Matcher isAssertionError = const TypeMatcher<AssertionError>();
/// Asserts that two [double]s are equal, within some tolerated error.
///

View File

@@ -8,10 +8,10 @@ dependencies:
# We depend on very specific internal implementation details of the
# 'test' package, which change between versions, so when upgrading
# this, make sure the tests are still running correctly.
test: 0.12.41
test: 0.12.42
# Used by golden file comparator
path: 1.6.0
path: 1.6.1
# We use FakeAsync and other testing utilities.
quiver: 0.29.0+1
@@ -31,7 +31,7 @@ dependencies:
charcode: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
collection: 1.14.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
convert: 2.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 2.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 2.0.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
csslib: 0.14.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
front_end: 0.1.0-alpha.12 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
glob: 1.1.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -44,7 +44,7 @@ dependencies:
json_rpc_2: 2.0.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
kernel: 0.3.0-alpha.12 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
logging: 0.11.3+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
matcher: 0.12.2+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
matcher: 0.12.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
meta: 1.1.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
mime: 0.9.6+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
multi_server_socket: 1.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -76,4 +76,4 @@ dev_dependencies:
intl: 0.15.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
# PUBSPEC CHECKSUM: 13e3
# PUBSPEC CHECKSUM: 038c

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();
});