Writing unit tests for a rust project
#[derive(Debug)]
pub enum Value {
Int(i32),
Bool(bool)
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
let y = Value::Bool(true);
match y {
Value::Bool(val) => assert!(val),
_ => ()
}
}
}