Add b128 type to fix tests

This commit is contained in:
bjorn3
2019-07-08 18:42:28 +02:00
committed by Dan Gohman
parent fa9602df80
commit 67593d997b
6 changed files with 41 additions and 25 deletions

View File

@@ -12,6 +12,8 @@ pub enum Bool {
B32 = 32,
/// 64-bit bool.
B64 = 64,
/// 128-bit bool.
B128 = 128,
}
/// This provides an iterator through all of the supported bool variants.
@@ -34,6 +36,7 @@ impl Iterator for BoolIterator {
2 => Some(Bool::B16),
3 => Some(Bool::B32),
4 => Some(Bool::B64),
5 => Some(Bool::B128),
_ => return None,
};
self.index += 1;
@@ -192,6 +195,7 @@ mod iter_tests {
assert_eq!(bool_iter.next(), Some(Bool::B16));
assert_eq!(bool_iter.next(), Some(Bool::B32));
assert_eq!(bool_iter.next(), Some(Bool::B64));
assert_eq!(bool_iter.next(), Some(Bool::B128));
assert_eq!(bool_iter.next(), None);
}