()
| 109 | #[test] |
| 110 | #[should_panic] |
| 111 | fn zero_height() { |
| 112 | let mut world = World::default(); |
| 113 | let rect_entity: Entity = world.push((Rect { |
| 114 | width: 1.0f32, |
| 115 | height: 1.0f32, |
| 116 | },)); |
| 117 | set_rect_size(&mut world, &rect_entity, 2.0f32, 0.0f32); |
| 118 | |
| 119 | if let Some(entry) = world.entry(rect_entity) { |
| 120 | let rect: Rect = *entry.get_component::<Rect>().unwrap(); |
| 121 | assert_approx_eq!(rect.width, 2.0f32); |
| 122 | assert_approx_eq!(rect.height, 0.0f32); |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | #[test] |
| 127 | #[should_panic] |
nothing calls this directly
no test coverage detected