| 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("corelib_test_config"); | 5 #library("corelib_test_config"); |
| 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 | 9 |
| 10 class CorelibTestSuite { | 10 class CorelibTestSuite { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 throw s; | 44 throw s; |
| 45 }; | 45 }; |
| 46 dir.fileHandler = processFile; | 46 dir.fileHandler = processFile; |
| 47 dir.doneHandler = doDone; | 47 dir.doneHandler = doDone; |
| 48 dir.list(false); | 48 dir.list(false); |
| 49 } | 49 } |
| 50 | 50 |
| 51 void processFile(String filename) { | 51 void processFile(String filename) { |
| 52 if (!filename.endsWith("Test.dart")) return; | 52 if (!filename.endsWith("Test.dart")) return; |
| 53 | 53 |
| 54 Expect.isTrue(filename.contains(directoryPath)); | |
| 55 int start = filename.lastIndexOf(pathSeparator); | 54 int start = filename.lastIndexOf(pathSeparator); |
| 56 String testName = filename.substring(start + 1, filename.length - 5); | 55 String testName = filename.substring(start + 1, filename.length - 5); |
| 57 Set<String> expectations = testExpectationsMap.expectations(testName); | 56 Set<String> expectations = testExpectationsMap.expectations(testName); |
| 58 | 57 |
| 59 // TODO(whesse): Skip files with internal directives, and multipart files, | 58 // TODO(whesse): Skip files with internal directives, and multipart files, |
| 60 // until they are handled correctly. | 59 // until they are handled correctly. |
| 61 if (expectations.contains(SKIP)) return; | 60 if (expectations.contains(SKIP)) return; |
| 62 | 61 |
| 63 | 62 |
| 64 doTest(new TestCase(testName, | 63 doTest(new TestCase(testName, |
| 65 shellPath, | 64 shellPath, |
| 66 <String>["--enable_type_checks", | 65 <String>["--enable_type_checks", |
| 67 "--ignore-unrecognized-flags", | 66 "--ignore-unrecognized-flags", |
| 68 filename ], | 67 filename ], |
| 69 completeHandler, | 68 completeHandler, |
| 70 expectations)); | 69 expectations)); |
| 71 } | 70 } |
| 72 | 71 |
| 73 void completeHandler(TestCase testCase) { | 72 void completeHandler(TestCase testCase) { |
| 74 TestOutput output = testCase.output; | |
| 75 String expected = ""; | |
| 76 testCase.expectedOutcomes.forEach((value) { expected += value + " "; }); | |
| 77 print(""); | |
| 78 print(testCase.displayName); | |
| 79 print(" Result:${output.result} Expected:$expected"); | |
| 80 print(" Exit code: ${output.exitCode} Time: ${output.time}"); | |
| 81 } | 73 } |
| 82 } | 74 } |
| OLD | NEW |