[examples] lang2/Flipper: add contract tests

parent 723d29d1
Pipeline #55384 failed with stages
in 22 seconds
......@@ -48,4 +48,17 @@ mod flipper {
*self.value
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
let mut flipper = Flipper::new(false);
assert_eq!(flipper.get(), false);
flipper.flip();
assert_eq!(flipper.get(), true);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment