MCPcopy Create free account
hub / github.com/OxideEngine/Oxide / zero_length

Function zero_length

oxide_math/test/cube.rs:160–175  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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]

Callers

nothing calls this directly

Calls 1

set_cube_sizeFunction · 0.85

Tested by

no test coverage detected