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

Function clear

cranelift/codegen/src/ir/constant.rs:301–308  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

299
300 #[test]
301 fn clear() {
302 let mut sut = ConstantPool::new();
303 sut.insert(vec![1, 2, 3].into());
304 assert_eq!(sut.len(), 1);
305
306 sut.clear();
307 assert_eq!(sut.len(), 0);
308 }
309
310 #[test]
311 fn iteration_order() {

Callers

nothing calls this directly

Calls 3

newFunction · 0.50
insertMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected