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.metadata; | 5 library test.backend.metadata; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 | 8 |
9 import '../backend/operating_system.dart'; | |
10 import '../backend/test_platform.dart'; | |
11 import '../frontend/skip.dart'; | 9 import '../frontend/skip.dart'; |
12 import '../frontend/timeout.dart'; | 10 import '../frontend/timeout.dart'; |
13 import '../utils.dart'; | 11 import '../utils.dart'; |
| 12 import 'operating_system.dart'; |
14 import 'platform_selector.dart'; | 13 import 'platform_selector.dart'; |
| 14 import 'test_platform.dart'; |
15 | 15 |
16 /// Metadata for a test or test suite. | 16 /// Metadata for a test or test suite. |
17 /// | 17 /// |
18 /// This metadata comes from declarations on the test itself; it doesn't include | 18 /// This metadata comes from declarations on the test itself; it doesn't include |
19 /// configuration from the user. | 19 /// configuration from the user. |
20 class Metadata { | 20 class Metadata { |
21 /// The selector indicating which platforms the suite supports. | 21 /// The selector indicating which platforms the suite supports. |
22 final PlatformSelector testOn; | 22 final PlatformSelector testOn; |
23 | 23 |
24 /// The modification to the timeout for the test or suite. | 24 /// The modification to the timeout for the test or suite. |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 _serializeTimeout(Timeout timeout) { | 200 _serializeTimeout(Timeout timeout) { |
201 if (timeout == Timeout.none) return 'none'; | 201 if (timeout == Timeout.none) return 'none'; |
202 return { | 202 return { |
203 'duration': timeout.duration == null | 203 'duration': timeout.duration == null |
204 ? null | 204 ? null |
205 : timeout.duration.inMicroseconds, | 205 : timeout.duration.inMicroseconds, |
206 'scaleFactor': timeout.scaleFactor | 206 'scaleFactor': timeout.scaleFactor |
207 }; | 207 }; |
208 } | 208 } |
209 } | 209 } |
OLD | NEW |