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

Function test_pop_reg

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

Source from the content-addressed store, hash-verified

497
498 #[test]
499 fn test_pop_reg() {
500 let mut stack = Stack::new();
501 let reg = Reg::int(2usize);
502 stack.push(Val::reg(reg, WasmValType::I32));
503 stack.push(Val::i32(4));
504
505 assert_eq!(None, stack.pop_reg());
506 let _ = stack.pop().unwrap();
507 assert_eq!(reg, stack.pop_reg().unwrap().reg);
508 }
509
510 #[test]
511 fn test_pop_named_reg() {

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