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

Function pop_unordered

cranelift/entity/src/set.rs:282–309  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

280
281 #[test]
282 fn pop_unordered() {
283 let mut blocks = [
284 E(0),
285 E(1),
286 E(6),
287 E(7),
288 E(5),
289 E(9),
290 E(10),
291 E(2),
292 E(3),
293 E(11),
294 E(12),
295 ];
296
297 let mut m = EntitySet::new();
298 for &block in &blocks {
299 m.insert(block);
300 }
301 assert_eq!(m.bitset.max(), Some(12));
302 blocks.sort();
303
304 for &block in blocks.iter().rev() {
305 assert_eq!(block, m.pop().unwrap());
306 }
307
308 assert!(m.is_empty());
309 }
310
311 #[test]
312 fn fmt_debug() {

Callers

nothing calls this directly

Calls 5

sortMethod · 0.80
EClass · 0.70
newFunction · 0.50
insertMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected