a-range
a-range copied to clipboard
Add doc tests to Panic documentation
We recently added these docs:
https://github.com/killercup/a-range/blob/ce391ed856e5fb52e9445496ccec046b91359ed5/src/lib.rs#L54-L58
This behavior is tested in this unit test:
https://github.com/killercup/a-range/blob/ce391ed856e5fb52e9445496ccec046b91359ed5/src/lib.rs#L393-L397
It is also possible for this to become a doc test (as I've just found out), which would make this more visible.
- [ ] Turn
fail_up_to_invalid_rangeandfail_down_to_invalid_rangetests into doc tests
cc @babhishek21 -- just found out that should_panic is also available on doc tests :)
Ok. On it. ✌️
Hey @killercup , do you think it makes sense to keep the original tests after putting in the doc tests?