Skip to content

Commit c2af72b

Browse files
committed
Update README.md
1 parent 6a5b678 commit c2af72b

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ Add the following line to the dependencies array in your `Package.swift` file:
3333
.package(url: "https://github.com/x-sheep/swift-property-based.git", from: "1.0.0")
3434
```
3535

36+
Then add the following to your test target:
37+
```swift
38+
dependencies: [
39+
.product(name: "PropertyBased", package: "swift-property-based"),
40+
]
41+
```
42+
3643
### When writing an Xcode project:
3744

3845
1. Open your Project
@@ -105,10 +112,10 @@ For example, the following test fails when the given numbers sum to a value abov
105112

106113
```swift
107114
@Test func checkSumInRange() async {
108-
await propertyCheck(input: Gen.int(in: 0...100).array(of: 1...10)) { numbers in
109-
let sum = numbers.reduce(0, +)
110-
#expect(sum < 250)
111-
}
115+
await propertyCheck(input: Gen.int(in: 0...100).array(of: 1...10)) { numbers in
116+
let sum = numbers.reduce(0, +)
117+
#expect(sum < 250)
118+
}
112119
}
113120
```
114121

0 commit comments

Comments
 (0)