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

Side by Side Diff: tests/standalone/src/io/TestRunnerTest.dart

Issue 9572005: Move all tests using dart:io to a separate directory (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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");
6
7 #import("dart:io"); 5 #import("dart:io");
8 #import("../../../tools/testing/dart/test_runner.dart"); 6 #import("../../../../tools/testing/dart/test_runner.dart");
9 #import("../../../tools/testing/dart/status_file_parser.dart"); 7 #import("../../../../tools/testing/dart/status_file_parser.dart");
10 #source("ProcessTestUtil.dart"); 8 #source("ProcessTestUtil.dart");
11 9
12 class TestController { 10 class TestController {
13 static final int numTests = 4; 11 static final int numTests = 4;
14 static int numCompletedTests = 0; 12 static int numCompletedTests = 0;
15 13
16 // Used as TestCase.completedCallback. 14 // Used as TestCase.completedCallback.
17 static processCompletedTest(TestCase testCase) { 15 static processCompletedTest(TestCase testCase) {
18 TestOutput output = testCase.output; 16 TestOutput output = testCase.output;
19 print("Test: ${testCase.commands.last().commandLine}"); 17 print("Test: ${testCase.commands.last().commandLine}");
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 new RunningProcess(new TestCase("CrashTest", 65 new RunningProcess(new TestCase("CrashTest",
68 [new Command(getProcessTestFileName(), 66 [new Command(getProcessTestFileName(),
69 const ["0", "0", "1", "1"])], 67 const ["0", "0", "1", "1"])],
70 configuration, 68 configuration,
71 TestController.processCompletedTest, 69 TestController.processCompletedTest,
72 new Set<String>.from([CRASH]))).start(); 70 new Set<String>.from([CRASH]))).start();
73 Expect.equals(4, TestController.numTests); 71 Expect.equals(4, TestController.numTests);
74 // Throw must be from body of start() function for this test to work. 72 // Throw must be from body of start() function for this test to work.
75 Expect.throws(new RunningProcess(MakeTestCase("PassTest", [SKIP])).start); 73 Expect.throws(new RunningProcess(MakeTestCase("PassTest", [SKIP])).start);
76 } 74 }
77
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698