MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / test_pop_named_reg

Function test_pop_named_reg

winch/codegen/src/stack.rs:511–520  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

509
510 #[test]
511 fn test_pop_named_reg() {
512 let mut stack = Stack::new();
513 let reg = Reg::int(2usize);
514 stack.push(Val::reg(reg, WasmValType::I32));
515 stack.push(Val::reg(Reg::int(4), WasmValType::I32));
516
517 assert_eq!(None, stack.pop_named_reg(reg));
518 let _ = stack.pop().unwrap();
519 assert_eq!(reg, stack.pop_named_reg(reg).unwrap().reg);
520 }
521}

Callers

nothing calls this directly

Calls 4

newFunction · 0.50
pushMethod · 0.45
unwrapMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected