| Crates.io | moosicbox_arb |
| lib.rs | moosicbox_arb |
| version | 0.1.4 |
| created_at | 2025-05-07 13:26:43.755726+00 |
| updated_at | 2025-07-21 20:02:44.400511+00 |
| description | MoosicBox arbitrary arb package |
| homepage | |
| repository | https://github.com/MoosicBox/MoosicBox |
| max_upload_size | |
| id | 1663848 |
| size | 16,349 |
Arbitrary data generation utilities for testing and property-based testing.
The MoosicBox ARB package provides:
Add this to your Cargo.toml:
[dependencies]
moosicbox_arb = { path = "../arb" }
# Enable specific features
moosicbox_arb = {
path = "../arb",
features = ["xml", "css", "serde"]
}
use moosicbox_arb::xml::{XmlString, XmlAttrNameString};
use quickcheck::{quickcheck, TestResult};
quickcheck! {
fn valid_xml_strings(xml_str: XmlString) -> TestResult {
// Test with valid XML strings
TestResult::from_bool(is_valid_xml(&xml_str.0))
}
fn valid_xml_attributes(attr: XmlAttrNameString) -> TestResult {
// Test with valid XML attribute names
TestResult::from_bool(is_valid_attr_name(&attr.0))
}
}
xml: Enable XML string generation utilitiescss: Enable CSS string generation utilitiesserde: Enable serde integration utilities