()
| 177 | #[test] |
| 178 | #[should_panic] |
| 179 | fn zero_width_height_and_length() { |
| 180 | let mut world = World::default(); |
| 181 | let rect_entity: Entity = world.push((Cube { |
| 182 | width: 1.0f32, |
| 183 | height: 1.0f32, |
| 184 | length: 1.0f32, |
| 185 | },)); |
| 186 | set_cube_size(&mut world, &rect_entity, 0.0f32, 0.0f32, 0.0f32); |
| 187 | |
| 188 | if let Some(entry) = world.entry(rect_entity) { |
| 189 | let cube: Cube = *entry.get_component::<Cube>().unwrap(); |
| 190 | assert_approx_eq!(cube.width, 0.0f32); |
| 191 | assert_approx_eq!(cube.height, 0.0f32); |
| 192 | assert_approx_eq!(cube.length, 0.0f32); |
| 193 | } |
| 194 | } |
| 195 | } |
nothing calls this directly
no test coverage detected