Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Unified Diff: tests/standalone/src/TestRunnerTest.dart

Issue 8662004: Update test scripts to deal with current VM behavior on optional constructor arguments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/standalone/src/ProcessTestUtil.dart ('k') | tools/testing/dart/test_options.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/TestRunnerTest.dart
diff --git a/tests/standalone/src/TestRunnerTest.dart b/tests/standalone/src/TestRunnerTest.dart
index 5205a39b4dacab18ed69c3077433ff38f2154532..8e676acd369116f726f0a5dfa1c4445a4d080703 100644
--- a/tests/standalone/src/TestRunnerTest.dart
+++ b/tests/standalone/src/TestRunnerTest.dart
@@ -6,8 +6,7 @@
#import("../../../tools/testing/dart/test_runner.dart");
#import("../../../tools/testing/dart/status_file_parser.dart");
-
-// TODO(whesse) source("ProcessTestUtil.dart"); when it is committed.
+#source("ProcessTestUtil.dart");
class TestController {
static final int numTests = 4;
@@ -36,6 +35,7 @@ class TestController {
}
}
+
TestCase MakeTestCase(String testName, List<String> expectations) {
String test_path = "tests/standalone/src/${testName}.dart";
// Working directory may be dart/runtime rather than dart.
@@ -56,35 +56,26 @@ TestCase MakeTestCase(String testName, List<String> expectations) {
String getDartBinName() {
- var names = ["out/Debug_ia32/dart",
- "out/Release_ia32/dart",
- "xcodebuild/Debug_ia32/dart",
- "xcodebuild/Release_ia32/dart",
- "Debug_ia32/dart.exe",
- "Release_ia32/dart.exe"];
- for (var name in names) {
- if (new File(name).existsSync()) {
- return name;
- }
+ var os = new Platform().operatingSystem();
+
+ var outDir = '';
+ if (os == 'linux') {
+ outDir = 'out';
+ } else if (os == 'macos') {
+ outDir = 'xcodebuild';
}
-}
+ var names = ['$outDir/Debug_ia32/dart',
+ '$outDir/Release_ia32/dart'];
-String getProcessTestFileName() {
- var names = ['out/Release_ia32/process_test',
- 'out/Debug_ia32/process_test',
- 'xcodebuild/Release_ia32/process_test',
- 'xcodebuild/Debug_ia32/process_test',
- 'Release_ia32/process_test.exe',
- 'Debug_ia32/process_test.exe'];
for (var name in names) {
if (new File(name).existsSync()) {
return name;
}
}
- Expect.fail('Could not find the process_test program.');
}
+
void main() {
int timeout = 2;
new RunningProcess(MakeTestCase("PassTest", [PASS]), timeout).start();
« no previous file with comments | « tests/standalone/src/ProcessTestUtil.dart ('k') | tools/testing/dart/test_options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698