wasm_interp: rename ValueStack::len -> depth

This commit is contained in:
Brian Carroll 2022-12-10 00:00:13 +00:00
parent 76341c7611
commit ed18bf7709
No known key found for this signature in database
GPG key ID: 5C7B2EC4101703C0
4 changed files with 11 additions and 11 deletions

View file

@ -840,7 +840,7 @@ fn test_set_get_local() {
state.execute_next_instruction(&module).unwrap();
state.execute_next_instruction(&module).unwrap();
state.execute_next_instruction(&module).unwrap();
assert_eq!(state.value_stack.len(), 1);
assert_eq!(state.value_stack.depth(), 1);
assert_eq!(state.value_stack.pop(), Value::I32(12345));
}
@ -876,7 +876,7 @@ fn test_tee_get_local() {
state.execute_next_instruction(&module).unwrap();
state.execute_next_instruction(&module).unwrap();
state.execute_next_instruction(&module).unwrap();
assert_eq!(state.value_stack.len(), 2);
assert_eq!(state.value_stack.depth(), 2);
assert_eq!(state.value_stack.pop(), Value::I32(12345));
assert_eq!(state.value_stack.pop(), Value::I32(12345));
}
@ -903,7 +903,7 @@ fn test_global() {
state.execute_next_instruction(&module).unwrap();
state.execute_next_instruction(&module).unwrap();
state.execute_next_instruction(&module).unwrap();
assert_eq!(state.value_stack.len(), 2);
assert_eq!(state.value_stack.depth(), 2);
assert_eq!(state.value_stack.pop(), Value::I32(555));
assert_eq!(state.value_stack.pop(), Value::I32(222));
}