Chromium Code Reviews

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

Issue 1390883002: Make Suite contain a single Group. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 5 years, 2 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/runner/engine.dart ('k') | lib/src/runner/load_suite.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.runner.load_exception_suite; 5 library test.runner.load_exception_suite;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import '../backend/group.dart';
9 import '../backend/invoker.dart'; 10 import '../backend/invoker.dart';
10 import '../backend/metadata.dart'; 11 import '../backend/metadata.dart';
11 import '../backend/suite.dart'; 12 import '../backend/suite.dart';
12 import 'load_exception.dart'; 13 import 'load_exception.dart';
13 14
14 /// A test suite generated from a load exception. 15 /// A test suite generated from a load exception.
15 /// 16 ///
16 /// Load exceptions are exposed as test suites so that they can be presented 17 /// Load exceptions are exposed as test suites so that they can be presented
17 /// alongside successful tests. 18 /// alongside successful tests.
18 class LoadExceptionSuite extends Suite { 19 class LoadExceptionSuite extends Suite {
19 /// The exception that this suite exposes. 20 /// The exception that this suite exposes.
20 final LoadException exception; 21 final LoadException exception;
21 final StackTrace stackTrace; 22 final StackTrace stackTrace;
22 23
23 LoadExceptionSuite(LoadException exception, stackTrace) 24 LoadExceptionSuite(LoadException exception, stackTrace)
24 : exception = exception, 25 : exception = exception,
25 stackTrace = stackTrace, 26 stackTrace = stackTrace,
26 super([ 27 super(new Group.root([
27 new LocalTest("load error", new Metadata(), 28 new LocalTest("load error", new Metadata(),
28 () => new Future.error(exception, stackTrace)) 29 () => new Future.error(exception, stackTrace))
29 ], path: exception.path); 30 ]), path: exception.path);
30 } 31 }
OLDNEW
« no previous file with comments | « lib/src/runner/engine.dart ('k') | lib/src/runner/load_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine