()
| 8 | #[test] |
| 9 | #[should_panic] |
| 10 | fn no_circle_component() { |
| 11 | let mut world = World::default(); |
| 12 | let circle_entity: Entity = world.push((Position { |
| 13 | x: 1.0f32, |
| 14 | y: 1.0f32, |
| 15 | },)); |
| 16 | set_circle_size(&mut world, &circle_entity, 2.0f32); |
| 17 | |
| 18 | if let Some(entry) = world.entry(circle_entity) { |
| 19 | let circle: Circle = *entry.get_component::<Circle>().unwrap(); |
| 20 | assert_approx_eq!(circle.radius, 2.0f32); |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | #[test] |
| 25 | fn reset_radius() { |
nothing calls this directly
no test coverage detected