Conversation
| + ["children": <array:expression>,] ; any available child expressions within | ||
| + ; this expression |
There was a problem hiding this comment.
Might be good to call out explicitly in the documentation that if this is a value which structurally does not have children, the field will be omitted entirely rather than being an empty array. (It is optional already which I agree with.) That's to distinguish between a type which may have children but has zero.
| implementation details that shouldn't be presented to users. But when running | ||
| tests, that developer may want to be able to see more extensive information. |
There was a problem hiding this comment.
I think the motivation could also mention the opposite scenario: There might be situations where a value has a very complex substructure and using the default Mirror(reflecting:) could lead to poor performance. So an alternative use of this API could be to limit the amount of reflection information for certain kinds of values.
There was a problem hiding this comment.
I'll add a blurb about that option too.
af85690 to
9a6a59c
Compare
9a6a59c to
f225db9
Compare
Swift Testing includes the ability to log details about a failed expectation including members of values captured while that expectation was evaluated. This proposal covers adding a customization point for developers to let them specify exactly what information should be included in test output.