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

Function zero_height

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

Source from the content-addressed store, hash-verified

109 #[test]
110 #[should_panic]
111 fn zero_height() {
112 let mut world = World::default();
113 let rect_entity: Entity = world.push((Rect {
114 width: 1.0f32,
115 height: 1.0f32,
116 },));
117 set_rect_size(&mut world, &rect_entity, 2.0f32, 0.0f32);
118
119 if let Some(entry) = world.entry(rect_entity) {
120 let rect: Rect = *entry.get_component::<Rect>().unwrap();
121 assert_approx_eq!(rect.width, 2.0f32);
122 assert_approx_eq!(rect.height, 0.0f32);
123 }
124 }
125
126 #[test]
127 #[should_panic]

Callers

nothing calls this directly

Calls 1

set_rect_sizeFunction · 0.85

Tested by

no test coverage detected