()
| 58 | #[test] |
| 59 | #[should_panic] |
| 60 | fn negative_height() { |
| 61 | let mut world = World::default(); |
| 62 | let rect_entity: Entity = world.push((Rect { |
| 63 | width: 1.0f32, |
| 64 | height: 1.0f32, |
| 65 | },)); |
| 66 | set_rect_size(&mut world, &rect_entity, 2.0f32, -3.0f32); |
| 67 | |
| 68 | if let Some(entry) = world.entry(rect_entity) { |
| 69 | let rect: Rect = *entry.get_component::<Rect>().unwrap(); |
| 70 | assert_approx_eq!(rect.width, 2.0f32); |
| 71 | assert_approx_eq!(rect.height, -3.0f32); |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | #[test] |
| 76 | #[should_panic] |
nothing calls this directly
no test coverage detected