From 6383f12ad0e5c7fe63aae30ade42872cb45ff28f Mon Sep 17 00:00:00 2001 From: Tangent 128 Date: Sat, 1 Jul 2017 16:55:24 -0400 Subject: [PATCH] Make tests pass again --- src/webm.rs | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/webm.rs b/src/webm.rs index 75c2573..09f7017 100644 --- a/src/webm.rs +++ b/src/webm.rs @@ -95,9 +95,46 @@ mod tests { assert_eq!(iter.next(), Some(WebmElement::Void)); assert_eq!(iter.next(), Some(WebmElement::Info)); assert_eq!(iter.next(), Some(WebmElement::Tracks(&TEST_FILE[358..421]))); + assert_eq!(iter.next(), Some(WebmElement::Cluster)); + assert_eq!(iter.next(), Some(WebmElement::Timecode(0))); + assert_eq!(iter.next(), Some(WebmElement::SimpleBlock { + track: 1, + timecode: 0, + flags: 0b10000000, + data: &TEST_FILE[443..3683] + })); + assert_eq!(iter.next(), Some(WebmElement::SimpleBlock { + track: 1, + timecode: 33, + flags: 0b00000000, + data: &TEST_FILE[3690..4735] + })); + assert_eq!(iter.next(), Some(WebmElement::SimpleBlock { + track: 1, + timecode: 67, + flags: 0b00000000, + data: &TEST_FILE[4741..4801] + })); + for _ in 3..30 { + // skip remaining contents for brevity + iter.next(); + } + assert_eq!(iter.next(), Some(WebmElement::Cluster)); + assert_eq!(iter.next(), Some(WebmElement::Timecode(1000))); + for _ in 0..30 { + // skip contents for brevity + iter.next(); + } + assert_eq!(iter.next(), Some(WebmElement::Cluster)); + assert_eq!(iter.next(), Some(WebmElement::Timecode(2000))); + for _ in 0..30 { + // skip contents for brevity + iter.next(); + } + assert_eq!(iter.next(), Some(WebmElement::Cues)); assert_eq!(iter.next(), None); }