commit c332a706e4e77be1de6e5aaf07fc42cf2547ac78
parent d55bcd9a9180970a274556eaae7209c5cd5766dc
Author: William Casarin <jb55@jb55.com>
Date: Sun, 7 Apr 2024 13:36:06 -0700
test: assert that the last tag iterations are None
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/tags.rs b/src/tags.rs
@@ -188,6 +188,7 @@ mod tests {
let t0 = tags_iter.next().expect("t0");
let t0_e0 = t0.get(0).expect("e tag ok");
let t0_e1 = t0.get(1).expect("e id ok");
+ assert_eq!(t0.get(2).is_none(), true);
assert_eq!(t0_e0.variant(), NdbStrVariant::Str("e"));
assert_eq!(
t0_e1.variant(),
@@ -201,6 +202,7 @@ mod tests {
let t1 = tags_iter.next().expect("t1");
let t1_e0 = t1.get(0).expect("p tag ok");
let t1_e1 = t1.get(1).expect("p id ok");
+ assert_eq!(t1.get(2).is_none(), true);
assert_eq!(t1_e0.variant(), NdbStrVariant::Str("p"));
assert_eq!(
t1_e1.variant(),
@@ -214,6 +216,7 @@ mod tests {
let t2 = tags_iter.next().expect("t2");
let t2_e0 = t2.get(0).expect("hi tag ok");
let t2_e1 = t2.get(1).expect("hi value ok");
+ assert_eq!(t2.get(2).is_none(), true);
assert_eq!(t2_e0.variant(), NdbStrVariant::Str("hi"));
assert_eq!(t2_e1.variant(), NdbStrVariant::Str("3"));
}