| 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("TestRunnerTest"); | 5 #library("TestRunnerTest"); |
| 6 | 6 |
| 7 #import("../../../tools/testing/dart/test_runner.dart"); | 7 #import("../../../tools/testing/dart/test_runner.dart"); |
| 8 #import("../../../tools/testing/dart/status_file_parser.dart"); | 8 #import("../../../tools/testing/dart/status_file_parser.dart"); |
| 9 #source("ProcessTestUtil.dart"); | 9 #source("ProcessTestUtil.dart"); |
| 10 | 10 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 "--enable_type_checks", | 50 "--enable_type_checks", |
| 51 test_path], | 51 test_path], |
| 52 timeout, | 52 timeout, |
| 53 TestController.processCompletedTest, | 53 TestController.processCompletedTest, |
| 54 new Set<String>.from(expectations)); | 54 new Set<String>.from(expectations)); |
| 55 } | 55 } |
| 56 | 56 |
| 57 | 57 |
| 58 void main() { | 58 void main() { |
| 59 int timeout = 2; | 59 int timeout = 2; |
| 60 new RunningProcess(MakeTestCase("PassTest", [PASS]), timeout).start(); | 60 new RunningProcess(MakeTestCase("PassTest", [PASS])).start(); |
| 61 new RunningProcess(MakeTestCase("FailTest", [FAIL]), timeout).start(); | 61 new RunningProcess(MakeTestCase("FailTest", [FAIL])).start(); |
| 62 new RunningProcess(MakeTestCase("TimeoutTest", [TIMEOUT]), timeout).start(); | 62 new RunningProcess(MakeTestCase("TimeoutTest", [TIMEOUT])).start(); |
| 63 | 63 |
| 64 new RunningProcess(new TestCase("CrashTest", | 64 new RunningProcess(new TestCase("CrashTest", |
| 65 getProcessTestFileName(), | 65 getProcessTestFileName(), |
| 66 const ["0", "0", "1", "1"], | 66 const ["0", "0", "1", "1"], |
| 67 timeout, | 67 timeout, |
| 68 TestController.processCompletedTest, | 68 TestController.processCompletedTest, |
| 69 new Set<String>.from([CRASH])), | 69 new Set<String>.from([CRASH]))).start(); |
| 70 timeout).start(); | |
| 71 Expect.equals(4, TestController.numTests); | 70 Expect.equals(4, TestController.numTests); |
| 72 // Throw must be from body of start() function for this test to work. | 71 // Throw must be from body of start() function for this test to work. |
| 73 Expect.throws( | 72 Expect.throws(new RunningProcess(MakeTestCase("PassTest", [SKIP])).start); |
| 74 new RunningProcess(MakeTestCase("PassTest", [SKIP]), timeout).start); | |
| 75 } | 73 } |
| 76 | 74 |
| OLD | NEW |