You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
@Sample, in the new product UnderstudySamples: on a struct, it writes static func sample(...), with one parameter per stored property, each with a default, so a test gets a complete value in one call, such as Product.sample(price: 0). @SampleDefault(value) sets a property's default. The sample is written for debug builds only, and is as visible as the struct.
CallOrder { ... }, which watches every spy in a block of Watched(spy, as: name) lines, for Spy and ThrowingSpy alike. watch(_:as:) stays, for a spy the test starts watching later.
@Recorded, a property wrapper that spies on a property whose first value is at its declaration: @Recorded var user = "ana", with $user its PropertySpy. It works in doubles written by hand and in @GenerateSpies classes, next to @SpiedProperty, and a @GenerateSpies class may have @Recorded properties only. @GenerateSpies refuses it on an actor, where @SpiedProperty is the way.
Fixed
Understudy now asks for swift-syntax 602 or later. It said 600, but the macros don't build with 600, and 601 gives a wrong extra error for a @SpiedProperty with accessors, so a project that resolved either got a broken Understudy.