mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-16 20:25:02 +00:00
aaf: exercise default Bento writer API
This commit is contained in:
@@ -15,3 +15,13 @@ fn external_consumer_reads_named_values_and_references() {
|
||||
assert_eq!(container.resolve(first, second), second);
|
||||
assert!(Container::open(&bytes[..bytes.len() - 1]).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn default_writer_builds_a_readable_empty_container() -> Result<(), String> {
|
||||
let bytes = Writer::default().finish();
|
||||
let container = Container::open(&bytes)?;
|
||||
let ids: Vec<_> = container.object_ids().collect();
|
||||
assert!(!ids.is_empty());
|
||||
assert!(ids.windows(2).all(|pair| pair[0] < pair[1]));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user