| 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("standalone_test_config"); | 5 #library("standalone_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 StandaloneTestSuite { | 10 class StandaloneTestSuite { |
| 11 String directoryPath = "tests/standalone/src"; | 11 String directoryPath = "tests/standalone/src"; |
| 12 final String statusFilePath = "tests/standalone/standalone.status"; | 12 final String statusFilePath = "tests/standalone/standalone.status"; |
| 13 Function doTest; | 13 Function doTest; |
| 14 Function doDone; | 14 Function doDone; |
| 15 String shellPath; | 15 String shellPath; |
| 16 String pathSeparator; | 16 String pathSeparator; |
| 17 Map<String, String> configuration; | 17 Map<String, String> configuration; |
| 18 TestExpectationsMap testExpectationsMap; | 18 TestExpectationsMap testExpectationsMap; |
| 19 | 19 |
| 20 StandaloneTestSuite() { | 20 StandaloneTestSuite(Map this.configuration) { |
| 21 shellPath = getDartShellFileName() ; | 21 shellPath = getDartShellFileName(configuration) ; |
| 22 pathSeparator = new Platform().pathSeparator(); | 22 pathSeparator = new Platform().pathSeparator(); |
| 23 configuration = {"mode": "debug", | |
| 24 "arch": "ia32", | |
| 25 "checked": "true", | |
| 26 "component": "vm", | |
| 27 "system": new Platform().operatingSystem()}; | |
| 28 } | 23 } |
| 29 | 24 |
| 30 void forEachTest(Function onTest, [Function onDone = null]) { | 25 void forEachTest(Function onTest, [Function onDone = null]) { |
| 31 doTest = onTest; | 26 doTest = onTest; |
| 32 doDone = onDone; | 27 doDone = onDone; |
| 33 | 28 |
| 34 // Read test expectations from status file. | 29 // Read test expectations from status file. |
| 35 testExpectationsMap = ReadTestExpectations(statusFilePath, configuration); | 30 testExpectationsMap = ReadTestExpectations(statusFilePath, configuration); |
| 36 | 31 |
| 37 processDirectory(); | 32 processDirectory(); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 void completeHandler(TestCase testCase) { | 68 void completeHandler(TestCase testCase) { |
| 74 TestOutput output = testCase.output; | 69 TestOutput output = testCase.output; |
| 75 String expected = ""; | 70 String expected = ""; |
| 76 testCase.expectedOutcomes.forEach((value) { expected += value + " "; }); | 71 testCase.expectedOutcomes.forEach((value) { expected += value + " "; }); |
| 77 print(""); | 72 print(""); |
| 78 print(testCase.displayName); | 73 print(testCase.displayName); |
| 79 print(" Result:${output.result} Expected:$expected"); | 74 print(" Result:${output.result} Expected:$expected"); |
| 80 print(" Exit code: ${output.exitCode} Time: ${output.time}"); | 75 print(" Exit code: ${output.exitCode} Time: ${output.time}"); |
| 81 } | 76 } |
| 82 } | 77 } |
| OLD | NEW |