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

Function reset_width_and_height

oxide_math/test/rect.rs:26–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

set_rect_sizeFunction · 0.85

Tested by

no test coverage detected