jweinst1
4/30/2019 - 9:12 PM

Writing unit tests for a rust project

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),
			_ => ()
		}
	}
}