| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #library("test_runner"); | 5 #library("test_runner"); |
| 6 | 6 |
| 7 | 7 |
| 8 #import("status_file_parser.dart"); | 8 #import("status_file_parser.dart"); |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 TestOutput(this.testCase, this.exitCode, this.timedOut, this.stdout, | 77 TestOutput(this.testCase, this.exitCode, this.timedOut, this.stdout, |
| 78 this.stderr, this.time) { | 78 this.stderr, this.time) { |
| 79 testCase.output = this; | 79 testCase.output = this; |
| 80 } | 80 } |
| 81 | 81 |
| 82 String get result() => | 82 String get result() => |
| 83 hasCrashed ? CRASH : (hasTimedOut ? TIMEOUT : (hasFailed ? FAIL : PASS)); | 83 hasCrashed ? CRASH : (hasTimedOut ? TIMEOUT : (hasFailed ? FAIL : PASS)); |
| 84 | 84 |
| 85 bool get unexpectedOutput() => !testCase.expectedOutcomes.contains(result); | 85 bool get unexpectedOutput() => !testCase.expectedOutcomes.contains(result); |
| 86 | 86 |
| 87 bool get hasCrashed() => !timedOut && exitCode != 255 && exitCode != 0; | 87 bool get hasCrashed() => !timedOut && exitCode != -1 && exitCode != 0; |
| 88 | 88 |
| 89 bool get hasTimedOut() => timedOut; | 89 bool get hasTimedOut() => timedOut; |
| 90 | 90 |
| 91 bool get didFail() => exitCode != 0 && !hasCrashed; | 91 bool get didFail() => exitCode != 0 && !hasCrashed; |
| 92 | 92 |
| 93 // Reverse result of a negative test. | 93 // Reverse result of a negative test. |
| 94 bool get hasFailed() => (testCase.isNegative ? !didFail : didFail); | 94 bool get hasFailed() => (testCase.isNegative ? !didFail : didFail); |
| 95 } | 95 } |
| 96 | 96 |
| 97 | 97 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 new RunningProcess(test, 60).start(); | 182 new RunningProcess(test, 60).start(); |
| 183 numProcesses++; | 183 numProcesses++; |
| 184 } | 184 } |
| 185 } | 185 } |
| 186 | 186 |
| 187 runTest(TestCase test) { | 187 runTest(TestCase test) { |
| 188 tests.add(test); | 188 tests.add(test); |
| 189 tryRunTest(); | 189 tryRunTest(); |
| 190 } | 190 } |
| 191 } | 191 } |
| OLD | NEW |