| Index: test/runner/browser/compact_reporter_test.dart
|
| diff --git a/test/runner/browser/compact_reporter_test.dart b/test/runner/browser/compact_reporter_test.dart
|
| index 529f308d1e53d0cc346951f9081b83739327dfc9..30d402bee78be81b228c1d93a77a029d44a556bf 100644
|
| --- a/test/runner/browser/compact_reporter_test.dart
|
| +++ b/test/runner/browser/compact_reporter_test.dart
|
| @@ -4,27 +4,16 @@
|
|
|
| @TestOn("vm")
|
|
|
| -import 'dart:io';
|
| -
|
| -import 'package:path/path.dart' as p;
|
| -import 'package:test/src/util/io.dart';
|
| -import 'package:test/test.dart';
|
| +import 'package:scheduled_test/descriptor.dart' as d;
|
| +import 'package:scheduled_test/scheduled_test.dart';
|
|
|
| import '../../io.dart';
|
|
|
| -String _sandbox;
|
| -
|
| void main() {
|
| - setUp(() {
|
| - _sandbox = createTempDir();
|
| - });
|
| -
|
| - tearDown(() {
|
| - new Directory(_sandbox).deleteSync(recursive: true);
|
| - });
|
| + useSandbox();
|
|
|
| test("prints the platform name when running on multiple platforms", () {
|
| - new File(p.join(_sandbox, "test.dart")).writeAsStringSync("""
|
| + d.file("test.dart", """
|
| import 'dart:async';
|
|
|
| import 'package:path/path.dart' as p;
|
| @@ -33,24 +22,18 @@ import 'package:test/test.dart';
|
| void main() {
|
| test("success", () {});
|
| }
|
| -""");
|
| -
|
| - var result = _runTest([
|
| - "-r",
|
| - "compact",
|
| - "-p",
|
| - "content-shell",
|
| - "-p",
|
| - "vm",
|
| - "-j",
|
| - "1",
|
| +""").create();
|
| +
|
| + var test = runTest([
|
| + "-r", "compact",
|
| + "-p", "content-shell",
|
| + "-p", "vm",
|
| + "-j", "1",
|
| "test.dart"
|
| - ]);
|
| - expect(result.stdout, contains("[VM]"));
|
| - expect(result.stdout, contains("[Dartium Content Shell]"));
|
| - expect(result.exitCode, equals(0));
|
| + ], compact: true);
|
| +
|
| + test.stdout.expect(containsInOrder(["[VM]", "[Dartium Content Shell]"]));
|
| +
|
| + test.shouldExit(0);
|
| });
|
| }
|
| -
|
| -ProcessResult _runTest(List<String> args) =>
|
| - runTest(args, workingDirectory: _sandbox);
|
|
|