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
I was following the steps from README.md to learn about SwiftCheck.
Unfortunately, the example for complex properties doesn't compile:
property("Shrunken lists of integers always contain [] or [0]")<- forAll {(l :[Int])in// Here we use the Implication Operator `==>` to define a precondition for// this test. If the precondition fails the test is discarded. If it holds// the test proceeds.return(!l.isEmpty && l !=[0])==>{letls=self.shrinkArbitrary(l)// ^ Value of type 'ExampleTests' has no member 'shrinkArbitrary'return(ls.filter({ $0 ==[] || $0 ==[0]}).count >=1)}}
I'm no expert on QuickCheck (or SwiftCheck), so I don't know how to fix this message.
Steps To Reproduce
Create a new test function
Copy the code block from README.md
Expected Result
The code compiles and produces a passing test case.
Actual Result
There is a compiler error: Value of type 'ExampleTests' has no member 'shrinkArbitrary'
Additional information
--
The text was updated successfully, but these errors were encountered:
Version
077c096c3ddfc38db223ac8e525ad16ffb987138
Environment
macOS 10.15.6, Swift 5.2, Xcode 11.6
Description
I was following the steps from
README.md
to learn about SwiftCheck.Unfortunately, the example for complex properties doesn't compile:
I'm no expert on QuickCheck (or SwiftCheck), so I don't know how to fix this message.
Steps To Reproduce
README.md
Expected Result
The code compiles and produces a passing test case.
Actual Result
There is a compiler error:
Value of type 'ExampleTests' has no member 'shrinkArbitrary'
Additional information
--
The text was updated successfully, but these errors were encountered: