Skip to content

Commit

Permalink
test: Add explicit tests of empty bitflags types (#527)
Browse files Browse the repository at this point in the history
  • Loading branch information
molpopgen committed Aug 21, 2023
1 parent ef6f48c commit 750b52f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/sys/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,16 @@ impl From<RawFlags> for IndividualFlags {
mod tests {
use super::*;

#[test]
fn default_looks_like_zero() {
let n = NodeFlags::default();
assert_eq!(n.bits(), 0);
assert!(n.contains(NodeFlags::NONE));
let s = SimplificationOptions::default();
assert_eq!(s.bits(), 0);
assert!(s.contains(SimplificationOptions::NONE));
}

#[test]
fn node_is_not_sample() {
let n = NodeFlags::default();
Expand Down

0 comments on commit 750b52f

Please sign in to comment.