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

Function negative_width

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

Source from the content-addressed store, hash-verified

41 #[test]
42 #[should_panic]
43 fn negative_width() {
44 let mut world = World::default();
45 let rect_entity: Entity = world.push((Rect {
46 width: 1.0f32,
47 height: 1.0f32,
48 },));
49 set_rect_size(&mut world, &rect_entity, -2.0f32, 3.0f32);
50
51 if let Some(entry) = world.entry(rect_entity) {
52 let rect: Rect = *entry.get_component::<Rect>().unwrap();
53 assert_approx_eq!(rect.width, -2.0f32);
54 assert_approx_eq!(rect.height, 3.0f32);
55 }
56 }
57
58 #[test]
59 #[should_panic]

Callers

nothing calls this directly

Calls 1

set_rect_sizeFunction · 0.85

Tested by

no test coverage detected