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 '../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 } |
OLD | NEW |