swift-corelibs-xctest | The XCTest Project, A Swift core library for providing unit test support | iOS library
kandi X-RAY | swift-corelibs-xctest Summary
kandi X-RAY | swift-corelibs-xctest Summary
The XCTest Project, A Swift core library for providing unit test support
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of swift-corelibs-xctest
swift-corelibs-xctest Key Features
swift-corelibs-xctest Examples and Code Snippets
Community Discussions
Trending Discussions on swift-corelibs-xctest
QUESTION
I'd like to write some custom test assertion types and have them be displayed in Xcode, similarly to how the XCTAssert() failures are displayed:
Is there a way for me to hook into Xcode and make this happen?
I want my own assertion function to show its error inline the same way here:
The best resource I've found so far is Apple's XCTest source code, but I haven't been able to understand if that even includes the logic that is responsible for displaying the error UI.
...ANSWER
Answered 2018-Nov-08 at 16:45The easiest way is to call XCTFail()
from your custom assertion, but pass along the file name and line number of the call site. For example:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install swift-corelibs-xctest
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page