# HG changeset patch # User Emmanuel Gil Peyrot # Date 1565264311 -7200 # Node ID 3331eb7389b304d8b353d0e0caac05ac70d837a6 # Parent 1520b559cacc527f177ea30e0dba9c2796b07b14 Fix AnmRunner instance in test (requires Prng). diff --git a/src/th06/anm0_vm.rs b/src/th06/anm0_vm.rs --- a/src/th06/anm0_vm.rs +++ b/src/th06/anm0_vm.rs @@ -430,7 +430,8 @@ mod tests { assert_eq!(anm0.size, (256, 256)); assert_eq!(anm0.format, 5); let sprite = Rc::new(RefCell::new(Sprite::new(0., 0.))); - let mut anm_runner = AnmRunner::new(&anm0, 1, sprite.clone(), 0); + let prng = Rc::new(RefCell::new(Prng::new(0))); + let mut anm_runner = AnmRunner::new(&anm0, 1, sprite.clone(), Rc::downgrade(&prng), 0); for _ in 0..50 { anm_runner.run_frame(); }