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, { ...@@ -90,7 +90,9 @@ Future<void> runCommand(String executable, List<String> arguments, {
Duration timeout = _kLongTimeout, Duration timeout = _kLongTimeout,
bool Function(String) removeLine, bool Function(String) removeLine,
}) async { }) 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 commandDescription = '${path.relative(executable, from: workingDirectory)} ${arguments.join(' ')}';
final String relativeWorkingDir = path.relative(workingDirectory); final String relativeWorkingDir = path.relative(workingDirectory);
......
...@@ -816,8 +816,8 @@ Future<void> _runFlutterTest(String workingDirectory, { ...@@ -816,8 +816,8 @@ Future<void> _runFlutterTest(String workingDirectory, {
Map<String, String> environment, Map<String, String> environment,
List<String> tests = const <String>[], List<String> tests = const <String>[],
}) async { }) 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>[ final List<String> args = <String>[
'test', '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