mirror of
https://github.com/tlsnotary/tlsn-utils.git
synced 2026-01-08 04:13:59 -05:00
* clippy fixes * fmt fixes * mirgrate to 2024 and fix workspace warning * fix profile * rustfmt --------- Co-authored-by: sinu <65924192+sinui0@users.noreply.github.com>
20 lines
414 B
Rust
20 lines
414 B
Rust
#![no_main]
|
|
|
|
use std::{collections::HashSet, ops::Range};
|
|
|
|
use libfuzzer_sys::fuzz_target;
|
|
|
|
use rangeset_fuzz::SmallSet;
|
|
|
|
use rangeset::*;
|
|
|
|
fuzz_target!(|r: (Range<u8>, SmallSet)| {
|
|
let s1 = r.0;
|
|
let s2: RangeSet<u8> = r.1.into();
|
|
|
|
let h1: HashSet<u8> = HashSet::from_iter(s1.clone());
|
|
let h2: HashSet<u8> = HashSet::from_iter(s2.iter());
|
|
|
|
assert_eq!(s1.is_subset(&s2), h1.is_subset(&h2));
|
|
});
|