this post was submitted on 21 Sep 2023
6 points (100.0% liked)

iOSProgramming

230 readers
1 users here now

A community to discuss iOS, macOS, watchOS, tvOS, and visionOS development. Ask questions. Share articles. Share links to open source projects. Links to commercial projects are acceptable if it is not self-promotional in nature.

For now, it is okay to ask for feedback on an app. Please be considerate and do not spam the community.

Quick Links

founded 1 year ago
MODERATORS
 

I’m excited to announce a new open source project exploring improvements to the testing experience for Swift. My colleagues @briancroom, @grynspan, @chefski, @Dennis and I have been working on this in recent months and have some early progress we're excited to share.

Inspired by what’s possible with Swift macros, we’ve built a testing library API that can:

Provide granular details about individual tests using an attached macro named @Test. This enables many new features like expressing requirements, passing arguments, or adding custom tags, all directly in code instead of separate configuration files. Validate expected conditions in tests with detailed and actionable failure information using an expression macro spelled #expect(...). This works by capturing the values of passed-in expressions and their source code automatically to inform failure messages, and is also easier to learn than specialized assertion functions since it accepts built-in operator expressions like #expect(a == b). Easily repeat a test multiple times with different inputs by adding a parameter to the function and specifying its arguments in the @Test attribute.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here