()
| 92 | #[test] |
| 93 | #[should_panic] |
| 94 | fn zero_radius() { |
| 95 | let mut world = World::default(); |
| 96 | let cone_entity: Entity = world.push((Cone { |
| 97 | radius: 1.0f32, |
| 98 | height: 1.0f32, |
| 99 | },)); |
| 100 | set_cone_size(&mut world, &cone_entity, 0.0f32, 3.0f32); |
| 101 | |
| 102 | if let Some(entry) = world.entry(cone_entity) { |
| 103 | let cone: Cone = *entry.get_component::<Cone>().unwrap(); |
| 104 | assert_approx_eq!(cone.radius, 0.0f32); |
| 105 | assert_approx_eq!(cone.height, 3.0f32); |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | #[test] |
| 110 | #[should_panic] |
nothing calls this directly
no test coverage detected