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

Function negative_height

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

Source from the content-addressed store, hash-verified

58 #[test]
59 #[should_panic]
60 fn negative_height() {
61 let mut world = World::default();
62 let rect_entity: Entity = world.push((Rect {
63 width: 1.0f32,
64 height: 1.0f32,
65 },));
66 set_rect_size(&mut world, &rect_entity, 2.0f32, -3.0f32);
67
68 if let Some(entry) = world.entry(rect_entity) {
69 let rect: Rect = *entry.get_component::<Rect>().unwrap();
70 assert_approx_eq!(rect.width, 2.0f32);
71 assert_approx_eq!(rect.height, -3.0f32);
72 }
73 }
74
75 #[test]
76 #[should_panic]

Callers

nothing calls this directly

Calls 1

set_rect_sizeFunction · 0.85

Tested by

no test coverage detected