Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Remco Bloemen committed Oct 19, 2020
1 parent dc247a6 commit e85f7e1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion algebra/u256/src/conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,15 @@ impl U256 {
#[cfg(test)]
mod tests {
use super::*;
use num_traits::identities::One;
use num_traits::identities::{One, Zero};
use proptest::prelude::*;

#[test]
fn test_bool() {
assert_eq!(U256::from(true), U256::one());
assert_eq!(U256::from(false), U256::zero());
}

#[cfg(feature = "serde")]
mod serde {
use super::*;
Expand Down

0 comments on commit e85f7e1

Please sign in to comment.