diff options
| author | mat <git@matdoes.dev> | 2025-06-08 22:46:26 -0330 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-06-08 22:46:26 -0330 |
| commit | 3087b0c996dbd3fb9a1dbcac4bf5c32f992c2e5e (patch) | |
| tree | 7d3e889f0f6c45be331d4396f4bdc90496defeef /azalea-client/tests/move_despawned_entity.rs | |
| parent | 338f931c51ab3665c7c18124ca3e35bfd2ff5ca0 (diff) | |
| download | azalea-drasl-3087b0c996dbd3fb9a1dbcac4bf5c32f992c2e5e.tar.xz | |
add support for panicking on warn/error in simulation tests
Diffstat (limited to 'azalea-client/tests/move_despawned_entity.rs')
| -rw-r--r-- | azalea-client/tests/move_despawned_entity.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/azalea-client/tests/move_despawned_entity.rs b/azalea-client/tests/move_despawned_entity.rs index d590cb39..8c33566b 100644 --- a/azalea-client/tests/move_despawned_entity.rs +++ b/azalea-client/tests/move_despawned_entity.rs @@ -1,15 +1,15 @@ -use azalea_client::test_simulation::*; +use azalea_client::test_utils::prelude::*; use azalea_core::{position::ChunkPos, resource_location::ResourceLocation}; use azalea_entity::metadata::Cow; use azalea_protocol::packets::{ConnectionProtocol, game::ClientboundMoveEntityRot}; use azalea_registry::{DataRegistry, DimensionType, EntityKind}; use azalea_world::MinecraftEntityId; use bevy_ecs::query::With; -use bevy_log::tracing_subscriber; +use tracing::Level; #[test] fn test_move_despawned_entity() { - let _ = tracing_subscriber::fmt::try_init(); + init_tracing_with_level(Level::ERROR); // a warning is expected here let mut simulation = Simulation::new(ConnectionProtocol::Game); simulation.receive_packet(make_basic_login_packet( @@ -26,7 +26,7 @@ fn test_move_despawned_entity() { // make sure it's spawned let mut cow_query = simulation.app.world_mut().query_filtered::<(), With<Cow>>(); let cow_iter = cow_query.iter(simulation.app.world()); - assert_eq!(cow_iter.count(), 1, "cow should be despawned"); + assert_eq!(cow_iter.count(), 1, "cow should be spawned"); // despawn the cow by receiving a login packet simulation.receive_packet(make_basic_login_packet( |
