()
| 44 | #[test] |
| 45 | #[should_panic] |
| 46 | fn negative_width() { |
| 47 | let mut world = World::default(); |
| 48 | let rect_entity: Entity = world.push((Cube { |
| 49 | width: 1.0f32, |
| 50 | height: 1.0f32, |
| 51 | length: 1.0f32, |
| 52 | },)); |
| 53 | set_cube_size(&mut world, &rect_entity, -2.0f32, 3.0f32, 4.0f32); |
| 54 | |
| 55 | if let Some(entry) = world.entry(rect_entity) { |
| 56 | let cube: Cube = *entry.get_component::<Cube>().unwrap(); |
| 57 | assert_approx_eq!(cube.width, -2.0f32); |
| 58 | assert_approx_eq!(cube.height, 3.0f32); |
| 59 | assert_approx_eq!(cube.length, 4.0f32); |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | #[test] |
| 64 | #[should_panic] |
nothing calls this directly
no test coverage detected