killercup / killercup/a-range

Add doc tests to Panic documentation

Aperta
#11 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
good first issue Hacktoberfest help wanted in progress
Lingua principale
Rust
Stelle
15
Fork
7
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
rust
Ambito
documentation, testing
Tipo di issue
Documentazione
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.