diff --git a/files/03f3eb2c-d33d-44ea-ba60-67b685d1140d.qbot b/files/03f3eb2c-d33d-44ea-ba60-67b685d1140d.qbot new file mode 100644 index 0000000..001beb3 --- /dev/null +++ b/files/03f3eb2c-d33d-44ea-ba60-67b685d1140d.qbot @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26e9c6d3473370bd652c29079657a8f5271d9c3bd0fe0cc90009228afc32b070 +size 1780 diff --git a/integration-tests/src/main.rs b/integration-tests/src/main.rs index df563ab..4fca99b 100644 --- a/integration-tests/src/main.rs +++ b/integration-tests/src/main.rs @@ -33,3 +33,18 @@ fn get_position_no_panic(){ // This can panic if the head is mismanaged! let _pos=head.get_position(&bot,SessionTime::ZERO); } + +#[test] +fn get_position_no_panic2(){ + let bot_file=include_bytes!("../../files/03f3eb2c-d33d-44ea-ba60-67b685d1140d.qbot"); + let timelines=v0::read_all_to_block(std::io::Cursor::new(bot_file)).unwrap(); + let bot=bot::CompleteBot::new(timelines); + println!("duration={}",bot.duration()); + println!("num_events={}",bot.timelines().output_events.len()); + for event in &bot.timelines().output_events{ + println!("time={}",event.time); + } + let head=head::PlaybackHead::new(&bot,SessionTime::ZERO); + // This can panic if the head is mismanaged! + let _pos=head.get_position(&bot,SessionTime::ZERO); +}