()
| 49 | #[test] |
| 50 | #[should_panic] |
| 51 | fn zero_radius() { |
| 52 | let mut world = World::default(); |
| 53 | let sphere_entity: Entity = world.push((Sphere { radius: 1.0f32 },)); |
| 54 | set_sphere_size(&mut world, &sphere_entity, 0.0f32); |
| 55 | |
| 56 | if let Some(entry) = world.entry(sphere_entity) { |
| 57 | let sphere: Sphere = *entry.get_component::<Sphere>().unwrap(); |
| 58 | assert_approx_eq!(sphere.radius, 0.0f32); |
| 59 | } |
| 60 | } |
| 61 | } |
nothing calls this directly
no test coverage detected