Revert "Remove package:test dependency from flutter_test (#23755)" (#24004)

This reverts commit 71e9bd6f25.
This commit is contained in:
Jonah Williams
2018-11-06 09:12:48 -08:00
committed by GitHub
parent 71e9bd6f25
commit 23a7535a39
87 changed files with 964 additions and 410 deletions

View File

@@ -294,23 +294,19 @@ class _CompileExpressionRequest extends _CompilationRequest {
/// The wrapper is intended to stay resident in memory as user changes, reloads,
/// restarts the Flutter app.
class ResidentCompiler {
ResidentCompiler(this._sdkRoot, {
bool trackWidgetCreation = false,
String packagesPath,
List<String> fileSystemRoots,
String fileSystemScheme,
CompilerMessageConsumer compilerMessageConsumer = printError,
String initializeFromDill,
bool unsafePackageSerialization
}) : assert(_sdkRoot != null),
_trackWidgetCreation = trackWidgetCreation,
_packagesPath = packagesPath,
_fileSystemRoots = fileSystemRoots,
_fileSystemScheme = fileSystemScheme,
_stdoutHandler = _StdoutHandler(consumer: compilerMessageConsumer),
_controller = StreamController<_CompilationRequest>(),
_initializeFromDill = initializeFromDill,
_unsafePackageSerialization = unsafePackageSerialization {
ResidentCompiler(this._sdkRoot, {bool trackWidgetCreation = false,
String packagesPath, List<String> fileSystemRoots, String fileSystemScheme,
CompilerMessageConsumer compilerMessageConsumer = printError,
String initializeFromDill, bool unsafePackageSerialization})
: assert(_sdkRoot != null),
_trackWidgetCreation = trackWidgetCreation,
_packagesPath = packagesPath,
_fileSystemRoots = fileSystemRoots,
_fileSystemScheme = fileSystemScheme,
_stdoutHandler = _StdoutHandler(consumer: compilerMessageConsumer),
_controller = StreamController<_CompilationRequest>(),
_initializeFromDill = initializeFromDill,
_unsafePackageSerialization = unsafePackageSerialization {
// This is a URI, not a file path, so the forward slash is correct even on Windows.
if (!_sdkRoot.endsWith('/'))
_sdkRoot = '$_sdkRoot/';

View File

@@ -40,8 +40,7 @@ class FlutterDevice {
generator = generator ?? ResidentCompiler(
artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath),
trackWidgetCreation: trackWidgetCreation,
fileSystemRoots: fileSystemRoots,
fileSystemScheme: fileSystemScheme,
fileSystemRoots: fileSystemRoots, fileSystemScheme: fileSystemScheme
);
final Device device;

View File

@@ -8,14 +8,10 @@ import 'dart:convert';
import 'package:meta/meta.dart';
import 'package:stream_channel/stream_channel.dart';
import 'package:test_api/src/backend/runtime.dart'; // ignore: implementation_imports
import 'package:test_api/src/backend/suite_platform.dart'; // ignore: implementation_imports
import 'package:test_core/src/runner/platform.dart'; // ignore: implementation_imports
import 'package:test_core/src/runner/hack_register_platform.dart' as hack; // ignore: implementation_imports
import 'package:test_core/src/runner/runner_suite.dart'; // ignore: implementation_imports
import 'package:test_core/src/runner/suite.dart'; // ignore: implementation_imports
import 'package:test_core/src/runner/plugin/platform_helpers.dart'; // ignore: implementation_imports
import 'package:test_core/src/runner/environment.dart'; // ignore: implementation_imports
import 'package:test/src/backend/runtime.dart'; // ignore: implementation_imports
import 'package:test/src/backend/suite_platform.dart'; // ignore: implementation_imports
import 'package:test/src/runner/plugin/platform.dart'; // ignore: implementation_imports
import 'package:test/src/runner/plugin/hack_register_platform.dart' as hack; // ignore: implementation_imports
import '../artifacts.dart';
import '../base/common.dart';
@@ -28,6 +24,7 @@ import '../bundle.dart';
import '../compile.dart';
import '../dart/package_map.dart';
import '../globals.dart';
import '../vmservice.dart';
import 'watcher.dart';
/// The timeout we give the test process to connect to the test harness
@@ -136,50 +133,29 @@ String generateTestBootstrap({
final StringBuffer buffer = StringBuffer();
buffer.write('''
import 'dart:async';
import 'dart:convert';
import 'dart:io'; // ignore: dart_io_import
import 'dart:isolate';
// We import this library first in order to trigger an import error for
// package:test (rather than package:stream_channel) when the developer forgets
// to add a dependency on package:test.
import 'package:test/src/runner/plugin/remote_platform_helpers.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:test_api/src/remote_listener.dart';
import 'package:stream_channel/stream_channel.dart';
import 'package:stack_trace/stack_trace.dart';
import 'package:test/src/runner/vm/catch_isolate_errors.dart';
import '$testUrl' as test;
''');
'''
);
if (testConfigFile != null) {
buffer.write('''
import '${Uri.file(testConfigFile.path)}' as test_config;
''');
'''
);
}
buffer.write('''
/// Returns a serialized test suite.
StreamChannel<dynamic> serializeSuite(Function getMain(),
{bool hidePrints = true, Future<dynamic> beforeLoad()}) {
return RemoteListener.start(getMain,
hidePrints: hidePrints, beforeLoad: beforeLoad);
}
/// Capture any top-level errors (mostly lazy syntax errors, since other are
/// caught below) and report them to the parent isolate.
void catchIsolateErrors() {
final ReceivePort errorPort = ReceivePort();
// Treat errors non-fatal because otherwise they'll be double-printed.
Isolate.current.setErrorsFatal(false);
Isolate.current.addErrorListener(errorPort.sendPort);
errorPort.listen((dynamic message) {
// Masquerade as an IsolateSpawnException because that's what this would
// be if the error had been detected statically.
final IsolateSpawnException error = IsolateSpawnException(message[0]);
final Trace stackTrace =
message[1] == null ? Trace(const <Frame>[]) : Trace.parse(message[1]);
Zone.current.handleUncaughtError(error, stackTrace);
});
}
void main() {
print('$_kStartTimeoutTimerMessage');
String serverPort = Platform.environment['SERVER_PORT'];
@@ -188,7 +164,8 @@ void main() {
catchIsolateErrors();
goldenFileComparator = new LocalFileComparator(Uri.parse('$testUrl'));
autoUpdateGoldenFiles = $updateGoldens;
''');
'''
);
if (testConfigFile != null) {
buffer.write('''
return () => test_config.main(test.main);
@@ -208,7 +185,8 @@ void main() {
socket.addStream(channel.stream.map(json.encode));
});
}
''');
'''
);
return buffer.toString();
}
@@ -229,20 +207,21 @@ class _Compiler {
// Compiler maintains and updates single incremental dill file.
// Incremental compilation requests done for each test copy that file away
// for independent execution.
final Directory outputDillDirectory = fs.systemTempDirectory.createTempSync('flutter_test_compiler.');
final Directory outputDillDirectory = fs.systemTempDirectory
.createTempSync('flutter_test_compiler.');
final File outputDill = outputDillDirectory.childFile('output.dill');
printTrace('Compiler will use the following file as its incremental dill file: ${outputDill.path}');
bool suppressOutput = false;
void reportCompilerMessage(String message, {bool emphasis, TerminalColor color}) {
if (suppressOutput) {
if (suppressOutput)
return;
}
if (message.startsWith('Error: Could not resolve the package \'flutter_test\'')) {
if (message.startsWith('Error: Could not resolve the package \'test\'')) {
printTrace(message);
printError('\n\nFailed to load test harness. Are you missing a dependency on flutter_test?\n',
printError(
'\n\nFailed to load test harness. Are you missing a dependency on flutter_test?\n',
emphasis: emphasis,
color: color,
);
@@ -288,12 +267,11 @@ class _Compiler {
}
suppressOutput = false;
final CompilerOutput compilerOutput = await handleTimeout<CompilerOutput>(
compiler.recompile(
request.path,
<String>[request.path],
outputPath: outputDill.path),
request.path,
);
compiler.recompile(
request.path,
<String>[request.path],
outputPath: outputDill.path),
request.path);
final String outputPath = compilerOutput?.outputFilename;
// In case compiler didn't produce output or reported compilation
@@ -329,7 +307,8 @@ class _Compiler {
});
}
final StreamController<_CompilationRequest> compilerController = StreamController<_CompilationRequest>();
final StreamController<_CompilationRequest> compilerController =
StreamController<_CompilationRequest>();
final List<_CompilationRequest> compilationQueue = <_CompilationRequest>[];
ResidentCompiler compiler;
@@ -404,21 +383,6 @@ class _FlutterPlatform extends PlatformPlugin {
int _testCount = 0;
@override
Future<RunnerSuite> load(
String path,
SuitePlatform platform,
SuiteConfiguration suiteConfig,
Object message,
) async {
// loadChannel may throw an exception. That's fine; it will cause the
// LoadSuite to emit an error, which will be presented to the user.
final StreamChannel<dynamic> channel = loadChannel(path, platform);
final RunnerSuiteController controller = deserializeSuite(path, platform,
suiteConfig, const PluginEnvironment(), channel, message);
return await controller.suite;
}
@override
StreamChannel<dynamic> loadChannel(String testPath, SuitePlatform platform) {
if (_testCount > 0) {
@@ -450,6 +414,22 @@ class _FlutterPlatform extends PlatformPlugin {
return remoteChannel;
}
Future<String> _compileExpressionService(String isolateId, String expression,
List<String> definitions, List<String> typeDefinitions,
String libraryUri, String klass, bool isStatic,
) async {
if (compiler == null || compiler.compiler == null) {
throw 'Compiler is not set up properly to compile $expression';
}
final CompilerOutput compilerOutput =
await compiler.compiler.compileExpression(expression, definitions,
typeDefinitions, libraryUri, klass, isStatic);
if (compilerOutput != null && compilerOutput.outputFilename != null) {
return base64.encode(fs.file(compilerOutput.outputFilename).readAsBytesSync());
}
throw 'Failed to compile $expression';
}
Future<_AsyncError> _startTest(
String testPath,
StreamChannel<dynamic> controller,
@@ -457,18 +437,14 @@ class _FlutterPlatform extends PlatformPlugin {
) async {
printTrace('test $ourTestCount: starting test $testPath');
_AsyncError
outOfBandError; // error that we couldn't send to the harness that we need to send via our future
_AsyncError outOfBandError; // error that we couldn't send to the harness that we need to send via our future
final List<_Finalizer> finalizers =
<_Finalizer>[]; // Will be run in reverse order.
final List<_Finalizer> finalizers = <_Finalizer>[]; // Will be run in reverse order.
bool subprocessActive = false;
bool controllerSinkClosed = false;
try {
// Callback can't throw since it's just setting a variable.
controller.sink.done.whenComplete(() { // ignore: unawaited_futures
controllerSinkClosed = true;
}); // ignore: unawaited_futures
controller.sink.done.whenComplete(() { controllerSinkClosed = true; }); // ignore: unawaited_futures
// Prepare our WebSocket server to talk to the engine subproces.
final HttpServer server = await HttpServer.bind(host, port);
@@ -506,8 +482,7 @@ class _FlutterPlatform extends PlatformPlugin {
} else if (precompiledDillFiles != null) {
mainDart = precompiledDillFiles[testPath];
}
mainDart ??=
_createListenerDart(finalizers, ourTestCount, testPath, server);
mainDart ??= _createListenerDart(finalizers, ourTestCount, testPath, server);
if (precompiledDillPath == null && precompiledDillFiles == null) {
// Lazily instantiate compiler so it is built only if it is actually used.
@@ -536,14 +511,10 @@ class _FlutterPlatform extends PlatformPlugin {
process.kill();
final int exitCode = await process.exitCode;
subprocessActive = false;
if (!controllerSinkClosed && exitCode != -15) {
// ProcessSignal.SIGTERM
if (!controllerSinkClosed && exitCode != -15) { // ProcessSignal.SIGTERM
// We expect SIGTERM (15) because we tried to terminate it.
// It's negative because signals are returned as negative exit codes.
final String message = _getErrorMessage(
_getExitCodeMessage(exitCode, 'after tests finished'),
testPath,
shellPath);
final String message = _getErrorMessage(_getExitCodeMessage(exitCode, 'after tests finished'), testPath, shellPath);
controller.sink.addError(message);
}
}
@@ -551,9 +522,8 @@ class _FlutterPlatform extends PlatformPlugin {
final Completer<void> timeout = Completer<void>();
final Completer<void> gotProcessObservatoryUri = Completer<void>();
if (!enableObservatory) {
if (!enableObservatory)
gotProcessObservatoryUri.complete();
}
// Pipe stdout and stderr from the subprocess to our printStatus console.
// We also keep track of what observatory port the engine used, if any.
@@ -563,7 +533,7 @@ class _FlutterPlatform extends PlatformPlugin {
reportObservatoryUri: (Uri detectedUri) {
assert(processObservatoryUri == null);
assert(explicitObservatoryPort == null ||
explicitObservatoryPort == detectedUri.port);
explicitObservatoryPort == detectedUri.port);
if (startPaused && !machine) {
printStatus('The test process has been started.');
printStatus('You can now connect to it using observatory. To connect, load the following Web site in your browser:');
@@ -573,13 +543,21 @@ class _FlutterPlatform extends PlatformPlugin {
printTrace('test $ourTestCount: using observatory uri $detectedUri from pid ${process.pid}');
}
processObservatoryUri = detectedUri;
{
printTrace('Connecting to service protocol: $processObservatoryUri');
final Future<VMService> localVmService = VMService.connect(processObservatoryUri,
compileExpression: _compileExpressionService);
localVmService.then((VMService vmservice) {
printTrace('Successfully connected to service protocol: $processObservatoryUri');
});
}
gotProcessObservatoryUri.complete();
watcher?.handleStartedProcess(
ProcessEvent(ourTestCount, process, processObservatoryUri));
watcher?.handleStartedProcess(ProcessEvent(ourTestCount, process, processObservatoryUri));
},
startTimeoutTimer: () {
Future<_InitialResult>.delayed(_kTestStartupTimeout)
.then<void>((_) => timeout.complete());
Future<_InitialResult>.delayed(_kTestStartupTimeout).then<void>((_) => timeout.complete());
},
);
@@ -589,14 +567,10 @@ class _FlutterPlatform extends PlatformPlugin {
// The local test harness could get bored of us.
printTrace('test $ourTestCount: awaiting initial result for pid ${process.pid}');
final _InitialResult initialResult =
await Future.any<_InitialResult>(<Future<_InitialResult>>[
process.exitCode
.then<_InitialResult>((int exitCode) => _InitialResult.crashed),
timeout.future
.then<_InitialResult>((void value) => _InitialResult.timedOut),
Future<_InitialResult>.delayed(
_kTestProcessTimeout, () => _InitialResult.timedOut),
final _InitialResult initialResult = await Future.any<_InitialResult>(<Future<_InitialResult>>[
process.exitCode.then<_InitialResult>((int exitCode) => _InitialResult.crashed),
timeout.future.then<_InitialResult>((void value) => _InitialResult.timedOut),
Future<_InitialResult>.delayed(_kTestProcessTimeout, () => _InitialResult.timedOut),
gotProcessObservatoryUri.future.then<_InitialResult>((void value) {
return webSocket.future.then<_InitialResult>(
(WebSocket webSocket) => _InitialResult.connected,
@@ -609,11 +583,7 @@ class _FlutterPlatform extends PlatformPlugin {
printTrace('test $ourTestCount: process with pid ${process.pid} crashed before connecting to test harness');
final int exitCode = await process.exitCode;
subprocessActive = false;
final String message = _getErrorMessage(
_getExitCodeMessage(
exitCode, 'before connecting to test harness'),
testPath,
shellPath);
final String message = _getErrorMessage(_getExitCodeMessage(exitCode, 'before connecting to test harness'), testPath, shellPath);
controller.sink.addError(message);
// Awaited for with 'sink.done' below.
controller.sink.close(); // ignore: unawaited_futures
@@ -632,19 +602,15 @@ class _FlutterPlatform extends PlatformPlugin {
controller.sink.close(); // ignore: unawaited_futures
printTrace('test $ourTestCount: waiting for controller sink to close');
await controller.sink.done;
await watcher
?.handleTestTimedOut(ProcessEvent(ourTestCount, process));
await watcher?.handleTestTimedOut(ProcessEvent(ourTestCount, process));
break;
case _InitialResult.connected:
printTrace('test $ourTestCount: process with pid ${process.pid} connected to test harness');
final WebSocket testSocket = await webSocket.future;
final Completer<void> harnessDone = Completer<void>();
final StreamSubscription<dynamic> harnessToTest =
controller.stream.listen(
(dynamic event) {
testSocket.add(json.encode(event));
},
final StreamSubscription<dynamic> harnessToTest = controller.stream.listen(
(dynamic event) { testSocket.add(json.encode(event)); },
onDone: harnessDone.complete,
onError: (dynamic error, dynamic stack) {
// If you reach here, it's unlikely we're going to be able to really handle this well.
@@ -662,8 +628,7 @@ class _FlutterPlatform extends PlatformPlugin {
final Completer<void> testDone = Completer<void>();
final StreamSubscription<dynamic> testToHarness = testSocket.listen(
(dynamic encodedEvent) {
assert(encodedEvent
is String); // we shouldn't ever get binary messages
assert(encodedEvent is String); // we shouldn't ever get binary messages
controller.sink.add(json.decode(encodedEvent));
},
onDone: testDone.complete,
@@ -681,17 +646,10 @@ class _FlutterPlatform extends PlatformPlugin {
);
printTrace('test $ourTestCount: awaiting test result for pid ${process.pid}');
final _TestResult testResult =
await Future.any<_TestResult>(<Future<_TestResult>>[
process.exitCode.then<_TestResult>((int exitCode) {
return _TestResult.crashed;
}),
harnessDone.future.then<_TestResult>((void value) {
return _TestResult.harnessBailed;
}),
testDone.future.then<_TestResult>((void value) {
return _TestResult.testBailed;
}),
final _TestResult testResult = await Future.any<_TestResult>(<Future<_TestResult>>[
process.exitCode.then<_TestResult>((int exitCode) { return _TestResult.crashed; }),
harnessDone.future.then<_TestResult>((void value) { return _TestResult.harnessBailed; }),
testDone.future.then<_TestResult>((void value) { return _TestResult.testBailed; }),
]);
await Future.wait<void>(<Future<void>>[
@@ -704,11 +662,7 @@ class _FlutterPlatform extends PlatformPlugin {
printTrace('test $ourTestCount: process with pid ${process.pid} crashed');
final int exitCode = await process.exitCode;
subprocessActive = false;
final String message = _getErrorMessage(
_getExitCodeMessage(
exitCode, 'before test harness closed its WebSocket'),
testPath,
shellPath);
final String message = _getErrorMessage(_getExitCodeMessage(exitCode, 'before test harness closed its WebSocket'), testPath, shellPath);
controller.sink.addError(message);
// Awaited for with 'sink.done' below.
controller.sink.close(); // ignore: unawaited_futures
@@ -723,8 +677,7 @@ class _FlutterPlatform extends PlatformPlugin {
assert(testResult == _TestResult.testBailed);
printTrace('test $ourTestCount: process with pid ${process.pid} no longer needs test harness');
}
await watcher?.handleFinishedTest(
ProcessEvent(ourTestCount, process, processObservatoryUri));
await watcher?.handleFinishedTest(ProcessEvent(ourTestCount, process, processObservatoryUri));
break;
}
break;
@@ -773,7 +726,8 @@ class _FlutterPlatform extends PlatformPlugin {
String _createListenerDart(List<_Finalizer> finalizers, int ourTestCount,
String testPath, HttpServer server) {
// Prepare a temporary directory to store the Dart file that will talk to us.
final Directory tempDir = fs.systemTempDirectory.createTempSync('flutter_test_listener.');
final Directory tempDir = fs.systemTempDirectory
.createTempSync('flutter_test_listener.');
finalizers.add(() async {
printTrace('test $ourTestCount: deleting temporary directory');
tempDir.deleteSync(recursive: true);
@@ -803,7 +757,7 @@ class _FlutterPlatform extends PlatformPlugin {
}
if (directory.childFile(_kProjectRootSentinel).existsSync()) {
printTrace('Stopping scan for $_kTestConfigFileName; '
'found project root at ${directory.path}');
'found project root at ${directory.path}');
break;
}
directory = directory.parent;
@@ -834,9 +788,8 @@ class _FlutterPlatform extends PlatformPlugin {
/// Returns a Fontconfig config file that limits font fallback to the
/// artifact cache directory.
File get _fontConfigFile {
if (_cachedFontConfig != null) {
if (_cachedFontConfig != null)
return _cachedFontConfig;
}
final StringBuffer sb = StringBuffer();
sb.writeln('<fontconfig>');
@@ -879,15 +832,13 @@ class _FlutterPlatform extends PlatformPlugin {
// the obvious simplification to this code and remove this entire feature.
if (observatoryPort != null)
command.add('--observatory-port=$observatoryPort');
if (startPaused) {
if (startPaused)
command.add('--start-paused');
}
} else {
command.add('--disable-observatory');
}
if (host.type == InternetAddressType.IPv6) {
if (host.type == InternetAddressType.IPv6)
command.add('--ipv6');
}
command.add('--enable-checked-mode');
command.addAll(<String>[
@@ -914,41 +865,36 @@ class _FlutterPlatform extends PlatformPlugin {
void reportObservatoryUri(Uri uri),
}) {
const String observatoryString = 'Observatory listening on ';
for (Stream<List<int>> stream in <Stream<List<int>>>[
process.stderr,
process.stdout
]) {
stream
.transform<String>(utf8.decoder)
.transform<String>(const LineSplitter())
.listen(
(String line) {
if (line == _kStartTimeoutTimerMessage) {
if (startTimeoutTimer != null) {
startTimeoutTimer();
}
} else if (line.startsWith('error: Unable to read Dart source \'package:test/')) {
printTrace('Shell: $line');
printError('\n\nFailed to load test harness. Are you missing a dependency on flutter_test?\n');
} else if (line.startsWith(observatoryString)) {
printTrace('Shell: $line');
try {
final Uri uri = Uri.parse(line.substring(observatoryString.length));
if (reportObservatoryUri != null) {
reportObservatoryUri(uri);
for (Stream<List<int>> stream in
<Stream<List<int>>>[process.stderr, process.stdout]) {
stream.transform<String>(utf8.decoder)
.transform<String>(const LineSplitter())
.listen(
(String line) {
if (line == _kStartTimeoutTimerMessage) {
if (startTimeoutTimer != null)
startTimeoutTimer();
} else if (line.startsWith('error: Unable to read Dart source \'package:test/')) {
printTrace('Shell: $line');
printError('\n\nFailed to load test harness. Are you missing a dependency on flutter_test?\n');
} else if (line.startsWith(observatoryString)) {
printTrace('Shell: $line');
try {
final Uri uri = Uri.parse(line.substring(observatoryString.length));
if (reportObservatoryUri != null)
reportObservatoryUri(uri);
} catch (error) {
printError('Could not parse shell observatory port message: $error');
}
} catch (error) {
printError('Could not parse shell observatory port message: $error');
} else if (line != null) {
printStatus('Shell: $line');
}
} else if (line != null) {
printStatus('Shell: $line');
}
},
onError: (dynamic error) {
printError('shell console stream for process pid ${process.pid} experienced an unexpected error: $error');
},
cancelOnError: true,
);
},
onError: (dynamic error) {
printError('shell console stream for process pid ${process.pid} experienced an unexpected error: $error');
},
cancelOnError: true,
);
}
}
@@ -1023,7 +969,7 @@ class _FlutterPlatformStreamSinkWrapper<S> implements StreamSink<S> {
@override
void add(S event) => _parent.add(event);
@override
void addError(dynamic errorEvent, [StackTrace stackTrace]) => _parent.addError(errorEvent, stackTrace);
void addError(dynamic errorEvent, [ StackTrace stackTrace ]) => _parent.addError(errorEvent, stackTrace);
@override
Future<dynamic> addStream(Stream<S> stream) => _parent.addStream(stream);
}

View File

@@ -9,7 +9,7 @@ environment:
dependencies:
# To update these, use "flutter update-packages --force-upgrade".
analyzer: 0.33.2
analyzer: 0.33.0
archive: 2.0.4
args: 1.5.0
cli_util: 0.1.3+2
@@ -21,14 +21,14 @@ dependencies:
intl: 0.15.7
json_rpc_2: 2.0.9
json_schema: 1.0.10
linter: 0.1.71
linter: 0.1.70
meta: 1.1.6
mustache: 1.0.2
package_config: 1.0.5
platform: 2.2.0
plugin: 0.2.0+3
process: 3.0.5
quiver: 2.0.1
quiver: 2.0.0+1
stack_trace: 1.9.3
stream_channel: 1.6.8
usage: 3.4.1
@@ -42,8 +42,7 @@ 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_api: 0.2.1
test_core: 0.2.0
test: 1.3.4
async: 2.0.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -51,19 +50,28 @@ dependencies:
convert: 2.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
csslib: 0.14.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dart2_constant: 1.0.2+dart2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
front_end: 0.1.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
front_end: 0.1.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
glob: 1.1.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
html: 0.13.3+3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
http_multi_server: 2.0.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
http_parser: 3.1.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
io: 0.3.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
kernel: 0.3.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
js: 0.6.1+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
kernel: 0.3.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
logging: 0.11.3+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
matcher: 0.12.3+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
mime: 0.9.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
multi_server_socket: 1.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
node_preamble: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
package_resolver: 1.0.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
path: 1.6.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
petitparser: 2.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
pool: 1.3.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
pub_semver: 1.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
shelf: 0.7.3+3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
shelf_packages_handler: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
shelf_static: 0.2.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
shelf_web_socket: 0.2.2+4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
source_map_stack_trace: 1.1.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
source_maps: 0.10.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
source_span: 1.4.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -75,22 +83,11 @@ dependencies:
dev_dependencies:
collection: 1.14.11
mockito: 4.0.0
mockito: 3.0.0
file_testing: 2.0.3
http_multi_server: 2.0.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
js: 0.6.1+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
mime: 0.9.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
multi_server_socket: 1.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
node_preamble: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
shelf: 0.7.3+3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
shelf_packages_handler: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
shelf_static: 0.2.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
shelf_web_socket: 0.2.2+4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
test: 1.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dartdoc:
# Exclude this package from the hosted API docs.
nodoc: true
# PUBSPEC CHECKSUM: 4115
# PUBSPEC CHECKSUM: c4f6

View File

@@ -5,7 +5,7 @@
// this is simply Flutter's version of that.
import 'package:flutter_driver/flutter_driver.dart';
import 'package:test_api/test_api.dart';
import 'package:test/test.dart';
void main() {
group('end-to-end test', () {

View File

@@ -5,8 +5,8 @@
import 'dart:async';
import 'package:args/command_runner.dart';
import 'package:test_api/test_api.dart' hide TypeMatcher, isInstanceOf;
import 'package:test_api/test_api.dart' as test_package show TypeMatcher;
import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
import 'package:test/test.dart' as test_package show TypeMatcher;
import 'package:flutter_tools/src/base/common.dart';
import 'package:flutter_tools/src/base/file_system.dart';
@@ -16,7 +16,7 @@ import 'package:flutter_tools/src/commands/create.dart';
import 'package:flutter_tools/src/runner/flutter_command.dart';
import 'package:flutter_tools/src/runner/flutter_command_runner.dart';
export 'package:test_api/test_api.dart' hide TypeMatcher, isInstanceOf; // Defines a 'package:test' shim.
export 'package:test/test.dart' hide TypeMatcher, isInstanceOf; // Defines a 'package:test' shim.
/// A matcher that compares the type of the actual value to the type argument T.
// TODO(ianh): Remove this once https://github.com/dart-lang/matcher/issues/98 is fixed