()
| 24 | |
| 25 | #[test] |
| 26 | fn reset_width_and_height() { |
| 27 | let mut world = World::default(); |
| 28 | let rect_entity: Entity = world.push((Rect { |
| 29 | width: 1.0f32, |
| 30 | height: 1.0f32, |
| 31 | },)); |
| 32 | set_rect_size(&mut world, &rect_entity, 2.0f32, 3.0f32); |
| 33 | |
| 34 | if let Some(entry) = world.entry(rect_entity) { |
| 35 | let rect: Rect = *entry.get_component::<Rect>().unwrap(); |
| 36 | assert_approx_eq!(rect.width, 2.0f32); |
| 37 | assert_approx_eq!(rect.height, 3.0f32); |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | #[test] |
| 42 | #[should_panic] |
nothing calls this directly
no test coverage detected