blob: 3efed5dde5761a0c662213823a4f3062d4d429bc [file] [log] [blame]
* Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
* @assertion int exitCode
* Exit code for the process.
* @description Checks that if constructor ProcessResult creates a new object
* with the same parameters as ProcessResult received after completion
* method, [exitCode] of new object returns 0 when the process was
* completed successfully.
* @author
import "dart:async";
import "dart:io";
import "../../../Utils/expect.dart";
main() {
String command = Platform.resolvedExecutable;
List<String> args = ['--version'];
Future<ProcessResult> fProcessResult =, args);
fProcessResult.then((ProcessResult result) {
ProcessResult pr = new ProcessResult(, result.exitCode, result.stdout, result.stderr);
Expect.equals(0, pr.exitCode);