-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Configuration.TestFilter a pure-data type (#358)
This modifies the structure of `Configuration.TestFilter` so that it's a pure data type and is easier to become serializable. ### Motivation: For easier integration with tools it would be helpful for the stored properties of `Configuration` to be serializable, or be trivially convertible to/from serializable types at least. `Configuration`'s nested `TestFilter` type currently includes a closure for filtering tests and is therefore cannot be serialized in its current form. This type doesn't really need to _store_ a closure, however; it only needs to store information about how to perform filtering (e.g. data about criteria to match against), and later that can be interpreted when applying filtering. ### Modifications: - Change the `Configuration.TestFilter.Kind` enum so that its cases only store data, and no closures. - Move the filtering logic derived from the pure data `Kind` type above to a new `Configuration.TestFilter.Operation` enum. ### Checklist: - [x] Code and documentation should follow the style of the [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md). - [x] If public symbols are renamed or modified, DocC references should be updated. Resolves rdar://126627664
- Loading branch information
1 parent
0a1ba7b
commit c105aa1
Showing
3 changed files
with
134 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters