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

Unified Diff: test/runner/loader_test.dart

Issue 1027193004: Respect top-level @TestOn declarations. (Closed) Base URL: git@github.com:dart-lang/unittest@master
Patch Set: Add another test. 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 side-by-side diff with in-line comments
Download patch
Index: test/runner/loader_test.dart
diff --git a/test/runner/loader_test.dart b/test/runner/loader_test.dart
index de83e82047f5c102b8bb701b050b6e733f853273..4f2a1ddf80e47f96178dbcdb945dcb77eff4ca14 100644
--- a/test/runner/loader_test.dart
+++ b/test/runner/loader_test.dart
@@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+@TestOn("vm")
+
import 'dart:io';
import 'package:path/path.dart' as p;
@@ -84,14 +86,11 @@ void main() {
test("throws a nice error if the package root doesn't exist", () {
var loader = new Loader([TestPlatform.vm]);
- expect(() {
- try {
- loader.loadFile(p.join(_sandbox, 'a_test.dart'));
- } finally {
- loader.close();
- }
- }, throwsA(isLoadException(
- "Directory ${p.join(_sandbox, 'packages')} does not exist.")));
+ expect(
+ loader.loadFile(p.join(_sandbox, 'a_test.dart'))
+ .whenComplete(loader.close),
+ throwsA(isLoadException(
+ "Directory ${p.join(_sandbox, 'packages')} does not exist.")));
});
});

Powered by Google App Engine
This is Rietveld 408576698