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:
committed by
Todd Volkert
parent
8de0e15e4f
commit
686d8f8a22
@@ -4,11 +4,12 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:test/test.dart';
|
||||
import 'package:collection/collection.dart' show ListEquality, MapEquality;
|
||||
|
||||
import 'package:flutter_devicelab/framework/adb.dart';
|
||||
|
||||
import 'common.dart';
|
||||
|
||||
void main() {
|
||||
group('device', () {
|
||||
Device device;
|
||||
|
||||
14
dev/devicelab/test/common.dart
Normal file
14
dev/devicelab/test/common.dart
Normal file
@@ -0,0 +1,14 @@
|
||||
// Copyright 2018 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
|
||||
import 'package:test/test.dart' as test_package show TypeMatcher;
|
||||
|
||||
export 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
|
||||
|
||||
// Defines a 'package:test' shim.
|
||||
// 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>() => new test_package.TypeMatcher<T>(); // ignore: prefer_const_constructors, https://github.com/dart-lang/sdk/issues/32544
|
||||
@@ -4,10 +4,10 @@
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import 'package:flutter_devicelab/framework/manifest.dart';
|
||||
|
||||
import 'common.dart';
|
||||
|
||||
void main() {
|
||||
group('production manifest', () {
|
||||
test('must be valid', () {
|
||||
|
||||
@@ -7,7 +7,8 @@ import 'dart:io';
|
||||
|
||||
import 'package:path/path.dart' as path;
|
||||
import 'package:process/process.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import 'common.dart';
|
||||
|
||||
void main() {
|
||||
const ProcessManager processManager = LocalProcessManager();
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:test/test.dart';
|
||||
import 'package:flutter_devicelab/framework/utils.dart';
|
||||
|
||||
import 'common.dart';
|
||||
|
||||
void main() {
|
||||
group('grep', () {
|
||||
test('greps lines', () {
|
||||
|
||||
Reference in New Issue
Block a user