Update bool_bitfield tests
This commit is contained in:
parent
acb5a17748
commit
eb2ac990d7
@ -119,14 +119,13 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_bitfield_get() {
|
fn test_bitfield_get() {
|
||||||
let mut b = BooleanBitfield::new();
|
|
||||||
let test_nums = vec![0, 8, 15, 42, 1337];
|
let test_nums = vec![0, 8, 15, 42, 1337];
|
||||||
for i in test_nums {
|
for i in test_nums {
|
||||||
b = BooleanBitfield::new();
|
let mut b = BooleanBitfield::new();
|
||||||
assert_eq!(b.get_bit(&0), false);
|
assert_eq!(b.get_bit(&i), false);
|
||||||
b.set_bit(&0, &true);
|
b.set_bit(&i, &true);
|
||||||
assert_eq!(b.get_bit(&0), true);
|
assert_eq!(b.get_bit(&i), true);
|
||||||
b.set_bit(&0, &true);
|
b.set_bit(&i, &true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user