Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Unified Diff: tests/standalone/src/io/ProcessSegfaultTest.dart

Issue 9863015: This is a request for comments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/standalone/src/io/ProcessSegfaultTest.dart
diff --git a/tests/standalone/src/io/ProcessSegfaultTest.dart b/tests/standalone/src/io/ProcessSegfaultTest.dart
index 5d27eb382e07ba73e3b26c4ad03ac5982fe5557b..0d0fd686d4005bba3ef999c9cef5eacfcea7772f 100644
--- a/tests/standalone/src/io/ProcessSegfaultTest.dart
+++ b/tests/standalone/src/io/ProcessSegfaultTest.dart
@@ -8,17 +8,30 @@
#import("dart:io");
#source("ProcessTestUtil.dart");
-class ProcessSegfaultTest {
- static void testExit() {
- Process process = new Process.start(getProcessTestFileName(),
- const ["0", "0", "1", "1"]);
+testExit() {
+ Process process = new Process.start(getProcessTestFileName(),
+ const ["0", "0", "1", "1"]);
- process.onExit = (int exitCode) {
- process.close();
- };
- }
+ process.onExit = (int exitCode) {
+ Expect.isTrue(exitCode != 0);
+ process.close();
+ };
}
+
+testExitRun() {
+ Process process = new Process.run(getProcessTestFileName(),
+ const ["0", "0", "1", "1"],
+ null,
+ (exit, out, err) {
+ Expect.isTrue(exit != 0);
+ Expect.equals(out, '');
+ Expect.equals(err, '');
+ });
+}
+
+
main() {
- ProcessSegfaultTest.testExit();
+ testExit();
+ testExitRun();
}
« no previous file with comments | « tests/standalone/src/io/ProcessRunOutput.dart ('k') | tests/standalone/src/io/ProcessStartExceptionTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698