//! Property-based differential tests: turbocow `EcoString` vs `std::string::String`.
mod common;
use arbitrary::{Arbitrary, Unstructured};
use common::{StringOp, check_ecostring};
use proptest::prelude::*;
proptest! {
#![proptest_config(ProptestConfig::with_cases(4096))]
#[test]
fn ecostring_matches_std_string(data in proptest::collection::vec(any::<u8>(), 0..1024)) {
let mut u = Unstructured::new(&data);
if let Ok(ops) = Vec::<StringOp>::arbitrary(&mut u) {
check_ecostring(&ops);
}
}
}