about summary refs log blame commit diff
path: root/users/zseri/store-ref-scanner/fuzz/fuzz_targets/hbm-roundtrip.rs
blob: 0738da68b77df484dee28b80ec26baea0bb7c040 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13












                                                     
#![no_main]
use libfuzzer_sys::fuzz_target;

fuzz_target!(|data: &[u8]| {
    use core::convert::TryInto;
    use store_ref_scanner::HalfBytesMask;
    for i in data.chunks_exact(16) {
        let a = HalfBytesMask(i.try_into().unwrap());
        let b = a.into_expanded();
        let c = HalfBytesMask::from_expanded(b);
        assert_eq!(a, c);
    }
});