Chromium Code Reviews

Side by Side Diff: lib/src/runner/load_exception_suite.dart

Issue 1083433002: More gracefully handle load errors. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « lib/src/executable.dart ('k') | lib/src/runner/loader.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 library test.runner.load_exception_suite;
6
7 import '../backend/invoker.dart';
8 import '../backend/metadata.dart';
9 import '../backend/suite.dart';
10 import 'load_exception.dart';
11
12 /// A test suite generated from a load exception.
13 ///
14 /// Load exceptions are exposed as test suites so that they can be presented
15 /// alongside successful tests.
16 class LoadExceptionSuite extends Suite {
17 /// The exception that this suite exposes.
18 final LoadException exception;
19
20 LoadExceptionSuite(LoadException exception)
21 : exception = exception,
22 super([
23 new LocalTest("load error", new Metadata(), () => throw exception)
24 ], path: exception.path);
25 }
OLDNEW
« no previous file with comments | « lib/src/executable.dart ('k') | lib/src/runner/loader.dart » ('j') | no next file with comments »

Powered by Google App Engine