OLD | NEW |
1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 library test.decode_exit_code; | 5 library test.decode_exit_code; |
6 | 6 |
7 import 'status_file_parser.dart' show | 7 import 'status_file_parser.dart' show |
8 Expectation; | 8 Expectation; |
9 | 9 |
10 import 'test_runner.dart' show | 10 import 'test_runner.dart' show |
11 TestCase; | 11 TestCase; |
12 | 12 |
13 import '../../../pkg/fletchc/lib/src/hub/exit_codes.dart' show | 13 import '../../../pkg/dartino_compiler/lib/src/hub/exit_codes.dart' show |
14 COMPILER_EXITCODE_CRASH, | 14 COMPILER_EXITCODE_CRASH, |
15 DART_VM_EXITCODE_COMPILE_TIME_ERROR, | 15 DART_VM_EXITCODE_COMPILE_TIME_ERROR, |
16 DART_VM_EXITCODE_UNCAUGHT_EXCEPTION; | 16 DART_VM_EXITCODE_UNCAUGHT_EXCEPTION; |
17 | 17 |
18 abstract class DecodeExitCode { | 18 abstract class DecodeExitCode { |
19 int get exitCode; | 19 int get exitCode; |
20 bool get hasTimedOut; | 20 bool get hasTimedOut; |
21 | 21 |
22 Expectation decodeExitCode() { | 22 Expectation decodeExitCode() { |
23 switch (exitCode) { | 23 switch (exitCode) { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 return Expectation.MISSING_ERROR; | 75 return Expectation.MISSING_ERROR; |
76 } | 76 } |
77 return outcome.canBeOutcomeOf(Expectation.FAIL) | 77 return outcome.canBeOutcomeOf(Expectation.FAIL) |
78 ? Expectation.PASS | 78 ? Expectation.PASS |
79 : outcome; | 79 : outcome; |
80 } | 80 } |
81 | 81 |
82 return outcome; | 82 return outcome; |
83 } | 83 } |
84 } | 84 } |
OLD | NEW |