You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 16, 2021. It is now read-only.
As a big fan of python doctests I actually had a proof of concept swift doctest working a few years ago. I didn’t get much beyond proof of concept (although I do have some doctest comments still sprinkled in my codebase). One difference between your doctest and mine was that my version didn’t try to run the tests - it would merely codegen XCTest files that you could include and run as part of your normal unit test phase.
I definitely see the advantage of doctest being used to run the tests - but using it for codegen-ing removes some of burden of installing another tool, integrates well with other testing tools/CI etc and allows users to migrate away from doctest if it for whatever reason it doesn’t work out for them.