mod common;
#[cfg(test)]
mod tests {
use super::*;
use pretty_assertions::assert_eq;
use log::{info};
fn init() {
let _ = env_logger::builder().is_test(true).try_init();
}
#[test]
fn it_adds_one() {
init();
info!("can log from the test too");
}
#[test]
fn it_handles_negative_numbers() {
init();
info!("logging from another test");
}
#[test]
fn test_add() {
common::setup();
}
#[test]
#[ignore]
fn ignored_test() {
}
#[test]
#[should_panic]
fn it_works() {
assert!(false);
}
#[test]
#[should_panic(expected = "assertion failed")]
fn it_works2() {
assert_eq!("Hello", "world");
}
}