| 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 unittest.backend.metadata; | 5 library test.backend.metadata; |
| 6 | 6 |
| 7 import 'platform_selector.dart'; | 7 import 'platform_selector.dart'; |
| 8 | 8 |
| 9 /// Metadata for a test or test suite. | 9 /// Metadata for a test or test suite. |
| 10 /// | 10 /// |
| 11 /// This metadata comes from declarations on the test itself; it doesn't include | 11 /// This metadata comes from declarations on the test itself; it doesn't include |
| 12 /// configuration from the user. | 12 /// configuration from the user. |
| 13 class Metadata { | 13 class Metadata { |
| 14 /// The selector indicating which platforms the suite supports. | 14 /// The selector indicating which platforms the suite supports. |
| 15 final PlatformSelector testOn; | 15 final PlatformSelector testOn; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 36 /// If the two [Metadata]s have conflicting properties, [other] wins. | 36 /// If the two [Metadata]s have conflicting properties, [other] wins. |
| 37 Metadata merge(Metadata other) => | 37 Metadata merge(Metadata other) => |
| 38 new Metadata(testOn: testOn.intersect(other.testOn)); | 38 new Metadata(testOn: testOn.intersect(other.testOn)); |
| 39 | 39 |
| 40 /// Serializes [this] into a JSON-safe object that can be deserialized using | 40 /// Serializes [this] into a JSON-safe object that can be deserialized using |
| 41 /// [new Metadata.deserialize]. | 41 /// [new Metadata.deserialize]. |
| 42 serialize() => { | 42 serialize() => { |
| 43 'testOn': testOn == PlatformSelector.all ? null : testOn.toString() | 43 'testOn': testOn == PlatformSelector.all ? null : testOn.toString() |
| 44 }; | 44 }; |
| 45 } | 45 } |
| OLD | NEW |