implicit-casts:false in fuchsia_remote_debug_protocol (#45239)

This commit is contained in:
Alexandre Ardhuin
2019-11-22 20:33:47 +01:00
committed by GitHub
parent e2cf2f0fa2
commit 0a66d8a7a4
4 changed files with 31 additions and 19 deletions

View File

@@ -53,11 +53,11 @@ void main() {
interface: interface,
sshConfigPath: '/whatever',
);
when<String>(mockProcessResult.stdout).thenReturn('somestuff');
when<dynamic>(mockProcessResult.stdout).thenReturn('somestuff');
when(mockProcessResult.exitCode).thenReturn(0);
await runner.run('ls /whatever');
final List<String> passedCommand =
verify(mockProcessManager.run(captureAny)).captured.single;
verify(mockProcessManager.run(captureAny)).captured.single as List<String>;
expect(passedCommand, contains('$ipV6Addr%$interface'));
});
@@ -67,11 +67,11 @@ void main() {
mockProcessManager,
address: ipV6Addr,
);
when<String>(mockProcessResult.stdout).thenReturn('somestuff');
when<dynamic>(mockProcessResult.stdout).thenReturn('somestuff');
when(mockProcessResult.exitCode).thenReturn(0);
await runner.run('ls /whatever');
final List<String> passedCommand =
verify(mockProcessManager.run(captureAny)).captured.single;
verify(mockProcessManager.run(captureAny)).captured.single as List<String>;
expect(passedCommand, contains(ipV6Addr));
});
@@ -79,7 +79,7 @@ void main() {
const String addr = '192.168.1.1';
runner = SshCommandRunner.withProcessManager(mockProcessManager,
address: addr);
when<String>(mockProcessResult.stdout).thenReturn('''this
when<dynamic>(mockProcessResult.stdout).thenReturn('''this
has
four
lines''');
@@ -92,7 +92,7 @@ void main() {
const String addr = '192.168.1.1';
runner = SshCommandRunner.withProcessManager(mockProcessManager,
address: addr);
when<String>(mockProcessResult.stdout).thenReturn('whatever');
when<dynamic>(mockProcessResult.stdout).thenReturn('whatever');
when(mockProcessResult.exitCode).thenReturn(1);
Future<void> failingFunction() async {
await runner.run('oihaw');
@@ -109,11 +109,11 @@ void main() {
address: addr,
sshConfigPath: config,
);
when<String>(mockProcessResult.stdout).thenReturn('somestuff');
when<dynamic>(mockProcessResult.stdout).thenReturn('somestuff');
when(mockProcessResult.exitCode).thenReturn(0);
await runner.run('ls /whatever');
final List<String> passedCommand =
verify(mockProcessManager.run(captureAny)).captured.single;
verify(mockProcessManager.run(captureAny)).captured.single as List<String>;
expect(passedCommand, contains('-F'));
final int indexOfFlag = passedCommand.indexOf('-F');
final String passedConfig = passedCommand[indexOfFlag + 1];
@@ -126,11 +126,11 @@ void main() {
mockProcessManager,
address: addr,
);
when<String>(mockProcessResult.stdout).thenReturn('somestuff');
when<dynamic>(mockProcessResult.stdout).thenReturn('somestuff');
when(mockProcessResult.exitCode).thenReturn(0);
await runner.run('ls /whatever');
final List<String> passedCommand =
verify(mockProcessManager.run(captureAny)).captured.single;
verify(mockProcessManager.run(captureAny)).captured.single as List<String>;
final int indexOfFlag = passedCommand.indexOf('-F');
expect(indexOfFlag, equals(-1));
});