Quick / Nimble

A Matcher Framework for Swift and Objective-C
https://quick.github.io/Nimble/documentation/nimble/
Apache License 2.0
4.8k stars 601 forks source link

When integrating nimbe using swiftpm in a test case project, it failed. #950

Closed iT-Boyer closed 2 years ago

iT-Boyer commented 2 years ago

What did you do?

Please replace this with what you did.

What did you expect to happen?

Please replace this with what you expected to happen.

What actually happened instead?

Please replace this with what happened instead.

#if SWIFT_PACKAGE
    XCTFail("\(message)", file: location.file, line: location.line)
#else

this error:

Cannot find 'XCTFail' in scope

Environment

List the software versions you're using:

Please also mention which package manager you used and its version. Delete the other package managers in this list:

Project that demonstrates the issue

Please link to a project we can download that reproduces the issue. Feel free to delete this section if it's not relevant to the issue (eg - feature request).

https://github.com/Quick/QuickOnLinuxExample

The project should be short, self-contained, and correct example.

younata commented 2 years ago

In the testing I just did, the QuickOnLinuxExample correctly builds and runs, with the single expected test failure. Moreover, I've been able to run Quick & Nimble on linux for years in my own projects.

Perhaps you accidentally included Nimble as a dependency in your app or library target, and not the test target?

I'm going to close this as I'm unable to reproduce it.