Skip to content
This repository has been archived by the owner on Jun 17, 2023. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
akashivskyy committed Apr 25, 2022
2 parents 2c4e058 + 2569372 commit 9701330
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 26 deletions.
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
"repositoryURL": "https://github.com/Quick/Quick",
"state": {
"branch": null,
"revision": "bd86ca0141e3cfb333546de5a11ede63f0c4a0e6",
"version": "4.0.0"
"revision": "f9d519828bb03dfc8125467d8f7b93131951124c",
"version": "5.0.1"
}
},
{
Expand Down
5 changes: 1 addition & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/Quick/Nimble", from: "9.0.0"),
.package(url: "https://github.com/Quick/Quick", from: "4.0.0"),
.package(url: "https://github.com/Quick/Quick", from: "5.0.0"),
.package(url: "https://github.com/typelift/SwiftCheck", from: "0.12.0"),
],
targets: [
Expand All @@ -23,8 +23,5 @@ let package = Package(
dependencies: ["Nimble", "Quick", "SwiftCheck"],
path: "Sources"
)
],
swiftLanguageVersions: [
.v5,
]
)
7 changes: 5 additions & 2 deletions QuickSwiftCheck.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Pod::Spec.new do |spec|

spec.name = 'QuickSwiftCheck'
spec.version = '3.3.0'
spec.version = '3.4.0'
spec.summary = 'Quick + Nimble + SwiftCheck'
spec.homepage = 'https://github.com/akashivskyy/quick-swift-check'

Expand All @@ -24,7 +24,7 @@ Pod::Spec.new do |spec|
spec.source_files = 'Sources'

spec.dependency 'Nimble', '~> 9.0'
spec.dependency 'Quick', '~> 4.0'
spec.dependency 'Quick', '~> 5.0'
spec.dependency 'SwiftCheck', '~> 0.12'

spec.frameworks = 'XCTest'
Expand All @@ -36,4 +36,7 @@ Pod::Spec.new do |spec|
spec.ios.deployment_target = '9.0'
spec.tvos.deployment_target = '9.0'

spec.deprecated = true
spec.deprecated_in_favor_of = 'Swift Package Manager'

end
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![](https://img.shields.io/github/release/akashivskyy/quick-swift-check.svg)](https://github.com/akashivskyy/quick-swift-check/releases)
[![](https://img.shields.io/badge/swiftpm-compatible-green.svg)](https://github.com/apple/swift-package-manager)
[![](https://img.shields.io/badge/cocoapods-compatible-green.svg)](https://cocoapods.org)
[![](https://img.shields.io/badge/cocoapods-deprecated-red.svg)](https://cocoapods.org)

Interoperability between [Quick](https://github.com/Quick/Quick), [Nimble](https://github.com/Quick/Nimble) and [SwiftCheck](https://github.com/typelift/SwiftCheck).

Expand Down Expand Up @@ -30,20 +30,16 @@ sc_it("integer addition is commutative") {

## Installation

### Swift Package Manager

If you're using [Swift Package Manager](https://github.com/apple/swift-package-manager), add the following dependency to your `Package.swift`:
In Xcode, select File → Add Packages and use the on-screen UI to search for the following Package URL:

```none
.package(url: "https://github.com/akashivskyy/QuickSwiftCheck", from: "X.Y.Z"),
https://github.com/akashivskyy/quick-swift-check
```

### CocoaPods

If you're using [CocoaPods](http://cocoapods.org), add the following dependency to your `Podfile`:
If you're using [Swift Package Manager](https://github.com/apple/swift-package-manager) directly, add the following dependency to your `Package.swift`:

```none
pod 'QuickSwiftCheck', '~> X.Y.Z'
.package(url: "https://github.com/akashivskyy/quick-swift-check", from: "X.Y.Z"),
```

## Roadmap
Expand Down
18 changes: 9 additions & 9 deletions Sources/It.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,41 +20,41 @@ import SwiftCheck
/// - arguments: Checker arguments for replaying tests.
/// - flags: Flags to filter examples or example groups.
/// - closure: Closure containing a property test.
public func sc_it(_ description: String, arguments: CheckerArguments? = nil, flags: FilterFlags = [:], file: StaticString = #file, line: UInt = #line, _ closure: @escaping () -> Property) {
public func sc_it(_ description: String, arguments: CheckerArguments? = nil, file: StaticString = #file, line: UInt = #line, _ closure: @escaping () -> Property) {
#if SWIFT_PACKAGE
it(description, flags: flags, file: file, line: line) {
it(description, file: file, line: line) {
property(description, arguments: arguments, file: file, line: line) <- closure()
}
#else
it(description, flags: flags, file: String(describing: file), line: line) {
it(description, file: String(describing: file), line: line) {
property(description, arguments: arguments, file: file, line: line) <- closure()
}
#endif
}

/// Wrap a SwiftCheck `Property` in a focused Quick example. This makes it
/// possible to write property tests inside Quick specs.
public func sc_fit(_ description: String, arguments: CheckerArguments? = nil, flags: FilterFlags = [:], file: StaticString = #file, line: UInt = #line, _ closure: @escaping () -> Property) {
public func sc_fit(_ description: String, arguments: CheckerArguments? = nil, file: StaticString = #file, line: UInt = #line, _ closure: @escaping () -> Property) {
#if SWIFT_PACKAGE
fit(description, flags: flags, file: file, line: line) {
fit(description, file: file, line: line) {
property(description, arguments: arguments, file: file, line: line) <- closure()
}
#else
fit(description, flags: flags, file: String(describing: file), line: line) {
fit(description, file: String(describing: file), line: line) {
property(description, arguments: arguments, file: file, line: line) <- closure()
}
#endif
}

/// Wrap a SwiftCheck `Property` in a pending Quick example. This makes it
/// possible to write property tests inside Quick specs.
public func sc_xit(_ description: String, arguments: CheckerArguments? = nil, flags: FilterFlags = [:], file: StaticString = #file, line: UInt = #line, _ closure: @escaping () -> Property) {
public func sc_xit(_ description: String, arguments: CheckerArguments? = nil, file: StaticString = #file, line: UInt = #line, _ closure: @escaping () -> Property) {
#if SWIFT_PACKAGE
xit(description, flags: flags, file: file, line: line) {
xit(description, file: file, line: line) {
property(description, arguments: arguments, file: file, line: line) <- closure()
}
#else
xit(description, flags: flags, file: String(describing: file), line: line) {
xit(description, file: String(describing: file), line: line) {
property(description, arguments: arguments, file: file, line: line) <- closure()
}
#endif
Expand Down

0 comments on commit 9701330

Please sign in to comment.