Skip to content

Commit

Permalink
increase coverage in upgraded_struct_read_as_old() test
Browse files Browse the repository at this point in the history
  • Loading branch information
dwrensha committed Nov 30, 2023
1 parent 22cc8c9 commit a73a6d1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions capnpc/test/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1265,6 +1265,14 @@ mod tests {
assert_eq!(names.get(0).unwrap(), "alice");
assert_eq!(names.get(1).unwrap(), "bob");
}
{
let mut old_version = message.get_root::<test_old_version::Builder<'_>>().unwrap();
assert_eq!(old_version.reborrow().get_old1(), 123);
let mut names = old_version.get_old4().unwrap();
assert_eq!(names.len(), 2);
assert_eq!(names.reborrow().get(0).unwrap(), "alice");
assert_eq!(names.reborrow().get(1).unwrap(), "bob");
}
}

#[test]
Expand Down

0 comments on commit a73a6d1

Please sign in to comment.