swiftlang / swift-testing

A modern, expressive testing package for Swift
Apache License 2.0
1.81k stars 77 forks source link

Ability to write tests right in the same file #795

Open MahdiBM opened 3 weeks ago

MahdiBM commented 3 weeks ago

Description

It would be nice if we had the ability to write test in the same file, and not in files far away in a dedicated Tests folder. This will have some benefits like:

Languages like Rust do support this.

I saw some discussions about this a few months ago, I think the compiler needs to support better discovery of stuff like tests for this to be possible.

grynspan commented 3 weeks ago

Tracked internally as rdar://112339873.