]>
git.proxmox.com Git - rustc.git/blob - src/doc/book/listings/ch11-writing-automated-tests/no-listing-09-guess-with-panic-msg-bug/src/lib.rs
6 pub fn new(value
: i32) -> Guess
{
10 "Guess value must be less than or equal to 100, got {}.",
13 } else if value
> 100 {
15 "Guess value must be greater than or equal to 1, got {}.",
30 #[should_panic(expected = "less than or equal to 100")]
31 fn greater_than_100() {