OLD | NEW |
| (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 'dart:async'; | |
8 | |
9 import '../backend/group.dart'; | |
10 import '../backend/invoker.dart'; | |
11 import '../backend/metadata.dart'; | |
12 import '../backend/suite.dart'; | |
13 import 'load_exception.dart'; | |
14 | |
15 /// A test suite generated from a load exception. | |
16 /// | |
17 /// Load exceptions are exposed as test suites so that they can be presented | |
18 /// alongside successful tests. | |
19 class LoadExceptionSuite extends Suite { | |
20 /// The exception that this suite exposes. | |
21 final LoadException exception; | |
22 final StackTrace stackTrace; | |
23 | |
24 LoadExceptionSuite(LoadException exception, stackTrace) | |
25 : exception = exception, | |
26 stackTrace = stackTrace, | |
27 super(new Group.root([ | |
28 new LocalTest("load error", new Metadata(), | |
29 () => new Future.error(exception, stackTrace)) | |
30 ]), path: exception.path); | |
31 } | |
OLD | NEW |