Catch2 icon indicating copy to clipboard operation
Catch2 copied to clipboard

Does Catch integrate with XCTest?

Open audulus opened this issue 10 years ago • 6 comments

I noticed the following line in the documentation

Implement test fixtures using Obj-C classes too (like OCUnit)

This is perhaps wishful thinking, but does Catch integrate with XCTest? I'd love to have cross-platform unit testing that also plays nice with Xcode.

audulus avatar Jan 19 '15 19:01 audulus

It doesn't, currently. I was going to do a lot more integration work on the Obj-C side (including an iOS test runner) but with Swift gaining traction now I'm no sure it' worth it.

philsquared avatar Mar 04 '15 18:03 philsquared

What about https://github.com/philsquared/Catch/pull/454?

MichaelSchmittQM avatar Sep 23 '15 09:09 MichaelSchmittQM

#454 solves my xcode integration problem! @philsquared accepting the pull request would be awesome ;)

usq avatar Sep 23 '15 09:09 usq

@usq @philsquared strongly agree – I get a lot of mileage out of Catch for Objective-C++ unit testing but having this integration would be fantastic.

As for Swift: a lot of library code is getting retrofitted with _Nonnull qualifiers in order to be fully Swiftable; I for one would find it certifiably worth the effort (which admittedly is easy to say when the effort isn’t mine, erm) but yeah Catch and XCTest could be the chocolate and peanut butter of the impending Swift parifait, so to speak.

tl;dr: 👍🏽

fish2000 avatar Jan 28 '16 21:01 fish2000

Any news on this? I'm open for any suggestions for how to run my unit tests when cross-compiling for iOS. I know CMake offers some XCTest integration, but all my unit tests are currently written for Catch, and I'd like to use Catch on all platforms, if possible. @horenmar

benthevining avatar Dec 07 '22 04:12 benthevining