1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 06:16:04 +00:00

fix tests

This commit is contained in:
mat 2023-08-15 23:51:13 -05:00
parent 4ed4be529f
commit 8a90a8e109
2 changed files with 3 additions and 3 deletions

View file

@ -377,7 +377,7 @@ mod tests {
let entity_pos = *app.world.get::<Position>(entity).unwrap();
// delta is applied before gravity, so the first tick only sets the delta
assert_eq!(entity_pos.y, 70.);
let entity_physics = app.world.get::<Physics>(entity).unwrap().clone();
let entity_physics = app.world.get::<Physics>(entity).unwrap();
assert!(entity_physics.delta.y < 0.);
}
app.world.run_schedule(FixedUpdate);
@ -439,7 +439,7 @@ mod tests {
let entity_pos = *app.world.get::<Position>(entity).unwrap();
// delta will change, but it won't move until next tick
assert_eq!(entity_pos.y, 70.);
let entity_physics = app.world.get::<Physics>(entity).unwrap().clone();
let entity_physics = app.world.get::<Physics>(entity).unwrap();
assert!(entity_physics.delta.y < 0.);
}
app.world.run_schedule(FixedUpdate);

View file

@ -200,7 +200,7 @@ mod tests {
// just make sure it doesn't panic
if let Err(e) = ClientboundPlayerChatPacket::read_from(&mut Cursor::new(&data)) {
let default_backtrace = Backtrace::capture();
let backtrace = std::any::request_ref::<Backtrace>(&e).unwrap_or(&default_backtrace);
let backtrace = std::error::request_ref::<Backtrace>(&e).unwrap_or(&default_backtrace);
eprintln!("{e}\n{backtrace}");
panic!("failed to read player chat packet");