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

Side by Side Diff: test/runner/runner_test.dart

Issue 983573002: Add support for running browser tests to the test runner. (Closed) Base URL: git@github.com:dart-lang/unittest@master
Patch Set: Created 5 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 import 'dart:io'; 5 import 'dart:io';
6 6
7 import 'package:path/path.dart' as p; 7 import 'package:path/path.dart' as p;
8 import 'package:unittest/src/util/exit_codes.dart' as exit_codes; 8 import 'package:unittest/src/util/exit_codes.dart' as exit_codes;
9 import 'package:unittest/unittest.dart'; 9 import 'package:unittest/unittest.dart';
10 10
(...skipping 18 matching lines...) Expand all
29 29
30 void main() { 30 void main() {
31 test("failure", () => throw new TestFailure("oh no")); 31 test("failure", () => throw new TestFailure("oh no"));
32 } 32 }
33 """; 33 """;
34 34
35 final _usage = """ 35 final _usage = """
36 Usage: pub run unittest:unittest [files or directories...] 36 Usage: pub run unittest:unittest [files or directories...]
37 37
38 -h, --help Shows this usage information. 38 -h, --help Shows this usage information.
39 -p, --platform The platform(s) on which to run the tests.
40 [vm (default), chrome]
41
39 --[no-]color Whether to use terminal colors. 42 --[no-]color Whether to use terminal colors.
40 (auto-detected by default) 43 (auto-detected by default)
41 """; 44 """;
42 45
43 void main() { 46 void main() {
44 setUp(() { 47 setUp(() {
45 _sandbox = Directory.systemTemp.createTempSync('unittest_').path; 48 _sandbox = Directory.systemTemp.createTempSync('unittest_').path;
46 }); 49 });
47 50
48 tearDown(() { 51 tearDown(() {
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 expect(result.stdout, contains("\u001b[31m")); 229 expect(result.stdout, contains("\u001b[31m"));
227 }); 230 });
228 }); 231 });
229 } 232 }
230 233
231 ProcessResult _runUnittest(List<String> args) => 234 ProcessResult _runUnittest(List<String> args) =>
232 runUnittest(args, workingDirectory: _sandbox); 235 runUnittest(args, workingDirectory: _sandbox);
233 236
234 ProcessResult _runDart(List<String> args) => 237 ProcessResult _runDart(List<String> args) =>
235 runDart(args, workingDirectory: _sandbox); 238 runDart(args, workingDirectory: _sandbox);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698