Skip to content

Commit

Permalink
test: assert that the last tag iterations are None
Browse files Browse the repository at this point in the history
Signed-off-by: William Casarin <[email protected]>
  • Loading branch information
jb55 committed Apr 7, 2024
1 parent d55bcd9 commit c332a70
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/tags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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(),
Expand All @@ -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"));
}
Expand Down

0 comments on commit c332a70

Please sign in to comment.