OLD | NEW |
---|---|
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 @TestOn("vm") | 5 @TestOn("vm") |
6 | 6 |
7 import 'dart:io'; | 7 import 'dart:io'; |
8 import 'dart:math' as math; | 8 import 'dart:math' as math; |
9 | 9 |
10 import 'package:path/path.dart' as p; | 10 import 'package:path/path.dart' as p; |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
239 contains('nonexistent.dart: load error'), | 239 contains('nonexistent.dart: load error'), |
240 contains('Failed to load "nonexistent.dart": Does not exist.') | 240 contains('Failed to load "nonexistent.dart": Does not exist.') |
241 ])); | 241 ])); |
242 }); | 242 }); |
243 | 243 |
244 // TODO(nweiz): test what happens when a test file is unreadable once issue | 244 // TODO(nweiz): test what happens when a test file is unreadable once issue |
245 // 15078 is fixed. | 245 // 15078 is fixed. |
246 }); | 246 }); |
247 | 247 |
248 group("runs successful tests", () { | 248 group("runs successful tests", () { |
249 test("defined in a single file", () { | 249 test("defined in a single file", () { |
kevmoo
2015/04/15 02:51:34
This test now fails for me
test/runner/runner_tes
nweiz
2015/04/15 20:03:47
That's probably because I left in the 0-length tim
| |
250 new File(p.join(_sandbox, "test.dart")).writeAsStringSync(_success); | 250 new File(p.join(_sandbox, "test.dart")).writeAsStringSync(_success); |
251 var result = _runUnittest(["test.dart"]); | 251 var result = _runUnittest(["test.dart"]); |
252 expect(result.exitCode, equals(0)); | 252 expect(result.exitCode, equals(0)); |
253 }); | 253 }, timeout: new Timeout(new Duration(seconds: 0))); |
254 | 254 |
255 test("defined in a directory", () { | 255 test("defined in a directory", () { |
256 for (var i = 0; i < 3; i++) { | 256 for (var i = 0; i < 3; i++) { |
257 new File(p.join(_sandbox, "${i}_test.dart")) | 257 new File(p.join(_sandbox, "${i}_test.dart")) |
258 .writeAsStringSync(_success); | 258 .writeAsStringSync(_success); |
259 } | 259 } |
260 | 260 |
261 var result = _runUnittest(["."]); | 261 var result = _runUnittest(["."]); |
262 expect(result.exitCode, equals(0)); | 262 expect(result.exitCode, equals(0)); |
263 }); | 263 }); |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
439 }); | 439 }); |
440 }); | 440 }); |
441 }); | 441 }); |
442 } | 442 } |
443 | 443 |
444 ProcessResult _runUnittest(List<String> args) => | 444 ProcessResult _runUnittest(List<String> args) => |
445 runUnittest(args, workingDirectory: _sandbox); | 445 runUnittest(args, workingDirectory: _sandbox); |
446 | 446 |
447 ProcessResult _runDart(List<String> args) => | 447 ProcessResult _runDart(List<String> args) => |
448 runDart(args, workingDirectory: _sandbox); | 448 runDart(args, workingDirectory: _sandbox); |
OLD | NEW |