book/listings/ch11-writing-automated-tests/listing-11-03/src/lib.rs

15 lines
211 B
Rust

// ANCHOR: here
#[cfg(test)]
mod tests {
#[test]
fn exploration() {
assert_eq!(2 + 2, 4);
}
#[test]
fn another() {
panic!("Make this test fail");
}
}
// ANCHOR_END: here