()
| 126 | #[test] |
| 127 | #[should_panic] |
| 128 | fn zero_width_and_height() { |
| 129 | let mut world = World::default(); |
| 130 | let rect_entity: Entity = world.push((Rect { |
| 131 | width: 1.0f32, |
| 132 | height: 1.0f32, |
| 133 | },)); |
| 134 | set_rect_size(&mut world, &rect_entity, 0.0f32, 0.0f32); |
| 135 | |
| 136 | if let Some(entry) = world.entry(rect_entity) { |
| 137 | let rect: Rect = *entry.get_component::<Rect>().unwrap(); |
| 138 | assert_approx_eq!(rect.width, 0.0f32); |
| 139 | assert_approx_eq!(rect.height, 0.0f32); |
| 140 | } |
| 141 | } |
| 142 | } |
nothing calls this directly
no test coverage detected