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

Function no_cube_component

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

Source from the content-addressed store, hash-verified

8 #[test]
9 #[should_panic]
10 fn no_cube_component() {
11 let mut world = World::default();
12 let rect_entity: Entity = world.push((Position {
13 x: 1.0f32,
14 y: 1.0f32,
15 },));
16 set_cube_size(&mut world, &rect_entity, 2.0f32, 3.0f32, 4.0f32);
17
18 if let Some(entry) = world.entry(rect_entity) {
19 let cube: Cube = *entry.get_component::<Cube>().unwrap();
20 assert_approx_eq!(cube.width, 2.0f32);
21 assert_approx_eq!(cube.height, 3.0f32);
22 assert_approx_eq!(cube.length, 4.0f32);
23 }
24 }
25
26 #[test]
27 fn reset_width_and_height() {

Callers

nothing calls this directly

Calls 1

set_cube_sizeFunction · 0.85

Tested by

no test coverage detected