MCPcopy Create free account
hub / github.com/SoftbearStudios/bitcode / test_inner

Function test_inner

src/pack_ints.rs:565–574  ·  view source on GitHub ↗
(ints: &[T])

Source from the content-addressed store, hash-verified

563 }
564
565 fn test_inner<T: Int>(ints: &[T]) -> Vec<u8> {
566 let out = pack_ints(&mut ints.to_owned());
567 let unpacked = unpack_ints::<T>(&out, ints.len()).unwrap();
568 assert_eq!(unpacked, ints);
569
570 let packing = out[0];
571 let size = 100.0 * out.len() as f32 / std::mem::size_of_val(ints) as f32;
572 println!("{packing} {size:>5.1}%");
573 out
574 }
575
576 #[rustfmt::skip]
577 macro_rules! test {

Callers

nothing calls this directly

Calls 2

pack_intsFunction · 0.85
lenMethod · 0.45

Tested by

no test coverage detected