| OLD | NEW |
| 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.backend.suite; | 5 library test.backend.suite; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 | 9 |
| 10 import '../util/async_thunk.dart'; | 10 import '../util/async_thunk.dart'; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 } | 89 } |
| 90 | 90 |
| 91 /// Returns a new suite with the given fields updated. | 91 /// Returns a new suite with the given fields updated. |
| 92 /// | 92 /// |
| 93 /// In the new suite, [metadata] and [tests] will be filtered according to | 93 /// In the new suite, [metadata] and [tests] will be filtered according to |
| 94 /// [platform] and [os]. | 94 /// [platform] and [os]. |
| 95 Suite change({String path, Metadata metadata, Iterable<Test> tests}) { | 95 Suite change({String path, Metadata metadata, Iterable<Test> tests}) { |
| 96 if (path == null) path = this.path; | 96 if (path == null) path = this.path; |
| 97 if (metadata == null) metadata = this.metadata; | 97 if (metadata == null) metadata = this.metadata; |
| 98 if (tests == null) tests = this.tests; | 98 if (tests == null) tests = this.tests; |
| 99 return new Suite(tests, path: path, metadata: metadata, | 99 return new Suite(tests, platform: platform, os: os, path: path, |
| 100 onClose: this.close); | 100 metadata: metadata, onClose: this.close); |
| 101 } | 101 } |
| 102 | 102 |
| 103 /// Closes the suite and releases any resources associated with it. | 103 /// Closes the suite and releases any resources associated with it. |
| 104 Future close() { | 104 Future close() { |
| 105 return _closeThunk.run(() async { | 105 return _closeThunk.run(() async { |
| 106 if (_onClose != null) await _onClose(); | 106 if (_onClose != null) await _onClose(); |
| 107 }); | 107 }); |
| 108 } | 108 } |
| 109 } | 109 } |
| OLD | NEW |