Commit 4f3b7067 authored by James Lin's avatar James Lin Committed by James D. Lin

Add assert messages

parent e3ffa768
......@@ -90,7 +90,9 @@ Future<void> runCommand(String executable, List<String> arguments, {
Duration timeout = _kLongTimeout,
bool Function(String) removeLine,
}) async {
assert((outputMode == OutputMode.capture) == (output != null));
assert((outputMode == OutputMode.capture) == (output != null),
'The output parameter must be non-null with and only with '
'OutputMode.capture');
final String commandDescription = '${path.relative(executable, from: workingDirectory)} ${arguments.join(' ')}';
final String relativeWorkingDir = path.relative(workingDirectory);
......
......@@ -816,8 +816,8 @@ Future<void> _runFlutterTest(String workingDirectory, {
Map<String, String> environment,
List<String> tests = const <String>[],
}) async {
// Support printing output or capturing it for matching, but not both.
assert(!printOutput || outputChecker == null);
assert(!printOutput || outputChecker == null,
'Output either can be printed or checked but not both');
final List<String> args = <String>[
'test',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment