M1b: Brücke und Hülle #6
@@ -106,6 +106,13 @@ fn a_recording_can_start_in_the_middle_of_a_session() {
|
||||
}
|
||||
assert_eq!(recording.tick_count(), 70);
|
||||
assert_eq!(recording.end_tick(), 120);
|
||||
|
||||
// Decoding derives the start tick from the stored start world. The
|
||||
// decoded recording must end at the same tick and equal the original.
|
||||
let (decoded, _) = Recording::from_bytes(&recording.to_bytes(&world)).unwrap();
|
||||
assert_eq!(decoded.end_tick(), 120);
|
||||
assert_eq!(decoded, recording);
|
||||
|
||||
assert_eq!(recording.replay(), Ok(world));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user