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

Function no_rect_component

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

Source from the content-addressed store, hash-verified

8 #[test]
9 #[should_panic]
10 fn no_rect_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_rect_size(&mut world, &rect_entity, 2.0f32, 3.0f32);
17
18 if let Some(entry) = world.entry(rect_entity) {
19 let rect: Rect = *entry.get_component::<Rect>().unwrap();
20 assert_approx_eq!(rect.width, 2.0f32);
21 assert_approx_eq!(rect.height, 3.0f32);
22 }
23 }
24
25 #[test]
26 fn reset_width_and_height() {

Callers

nothing calls this directly

Calls 1

set_rect_sizeFunction · 0.85

Tested by

no test coverage detected