()
| 193 | |
| 194 | #[test] |
| 195 | fn stack_slot() { |
| 196 | let mut func = Function::new(); |
| 197 | |
| 198 | let ss0 = |
| 199 | func.create_sized_stack_slot(StackSlotData::new(StackSlotKind::ExplicitSlot, 4, 0)); |
| 200 | let ss1 = |
| 201 | func.create_sized_stack_slot(StackSlotData::new(StackSlotKind::ExplicitSlot, 8, 0)); |
| 202 | assert_eq!(ss0.to_string(), "ss0"); |
| 203 | assert_eq!(ss1.to_string(), "ss1"); |
| 204 | |
| 205 | assert_eq!(func.sized_stack_slots[ss0].size, 4); |
| 206 | assert_eq!(func.sized_stack_slots[ss1].size, 8); |
| 207 | |
| 208 | assert_eq!(func.sized_stack_slots[ss0].to_string(), "explicit_slot 4"); |
| 209 | assert_eq!(func.sized_stack_slots[ss1].to_string(), "explicit_slot 8"); |
| 210 | } |
| 211 | |
| 212 | #[test] |
| 213 | fn dynamic_stack_slot() { |
nothing calls this directly
no test coverage detected