killercup / killercup/a-range

Add doc tests to Panic documentation

Open
#11 3 comments 0 reactions 0 assignees View on GitHub
good first issue Hacktoberfest help wanted in progress
Dominant language
Rust
Stars
15
Forks
7
PR merge metrics
No merged PRs in 30d

Description

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](https://doc.rust-lang.org/1.29.2/rustdoc/documentation-tests.html#attributes) (as I've just found out), which would make this more visible.

- [ ] Turn `fail_up_to_invalid_range` and `fail_down_to_invalid_range` tests into doc tests

Contributor guide

Open the contributing guide

Research direction

Start in src/lib.rs at the Panic documentation around lines 54-58 and the unit tests around lines 393-397. Review the fail_up_to_invalid_range and fail_down_to_invalid_range tests, then run the Rust documentation tests to verify both cases are covered as doc tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation, testing
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.