blob: 052970730dd5428e01672134681fb8c313cf8833 [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 pid
* Process id of the process.
* @description Checks that [pid] of a new ProcessResult object created with the
* same parameters as ProcessResult received after completion
* method, is equal to pid of ProcessResult of completed
* @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) {
dynamic pId =;
ProcessResult pr = new ProcessResult(, result.exitCode, result.stdout, result.stderr);
Expect.isTrue( == pId);