Skip to content

Commit

Permalink
Test Charm FromStr implementation for exhaustiveness (#4107)
Browse files Browse the repository at this point in the history
  • Loading branch information
casey authored Nov 26, 2024
1 parent 482ac97 commit 487b8a9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/ordinals/src/charm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,11 @@ mod tests {
let flags = Charm::Coin.unset(flags);
assert!(!Charm::Coin.is_set(flags));
}

#[test]
fn from_str() {
for charm in Charm::ALL {
assert_eq!(charm.to_string().parse::<Charm>().unwrap(), charm);
}
}
}

0 comments on commit 487b8a9

Please sign in to comment.