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

Function reset_width_and_height

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

Source from the content-addressed store, hash-verified

25
26 #[test]
27 fn reset_width_and_height() {
28 let mut world = World::default();
29 let rect_entity: Entity = world.push((Cube {
30 width: 1.0f32,
31 height: 1.0f32,
32 length: 1.0f32,
33 },));
34 set_cube_size(&mut world, &rect_entity, 2.0f32, 3.0f32, 4.0f32);
35
36 if let Some(entry) = world.entry(rect_entity) {
37 let cube: Cube = *entry.get_component::<Cube>().unwrap();
38 assert_approx_eq!(cube.width, 2.0f32);
39 assert_approx_eq!(cube.height, 3.0f32);
40 assert_approx_eq!(cube.length, 4.0f32);
41 }
42 }
43
44 #[test]
45 #[should_panic]

Callers

nothing calls this directly

Calls 1

set_cube_sizeFunction · 0.85

Tested by

no test coverage detected