()
| 158 | #[test] |
| 159 | #[should_panic] |
| 160 | fn zero_length() { |
| 161 | let mut world = World::default(); |
| 162 | let rect_entity: Entity = world.push((Cube { |
| 163 | width: 1.0f32, |
| 164 | height: 1.0f32, |
| 165 | length: 1.0f32, |
| 166 | },)); |
| 167 | set_cube_size(&mut world, &rect_entity, 2.0f32, 3.0f32, 0.0f32); |
| 168 | |
| 169 | if let Some(entry) = world.entry(rect_entity) { |
| 170 | let cube: Cube = *entry.get_component::<Cube>().unwrap(); |
| 171 | assert_approx_eq!(cube.width, 2.0f32); |
| 172 | assert_approx_eq!(cube.height, 3.0f32); |
| 173 | assert_approx_eq!(cube.length, 0.0f32); |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | #[test] |
| 178 | #[should_panic] |
nothing calls this directly
no test coverage detected