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

Function zero_height

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

Source from the content-addressed store, hash-verified

139 #[test]
140 #[should_panic]
141 fn zero_height() {
142 let mut world = World::default();
143 let rect_entity: Entity = world.push((Cube {
144 width: 1.0f32,
145 height: 1.0f32,
146 length: 1.0f32,
147 },));
148 set_cube_size(&mut world, &rect_entity, 2.0f32, 0.0f32, 4.0f32);
149
150 if let Some(entry) = world.entry(rect_entity) {
151 let cube: Cube = *entry.get_component::<Cube>().unwrap();
152 assert_approx_eq!(cube.width, 2.0f32);
153 assert_approx_eq!(cube.height, 0.0f32);
154 assert_approx_eq!(cube.length, 4.0f32);
155 }
156 }
157
158 #[test]
159 #[should_panic]

Callers

nothing calls this directly

Calls 1

set_cube_sizeFunction · 0.85

Tested by

no test coverage detected