mirror of
https://github.com/ruuda/rcl.git
synced 2025-12-23 04:47:19 +00:00
This is only the start, but let's verify Decimal::cmp against f64::cmp.
It instantly finds an input where they disagree:
Compare {
a: NormalF64(
-0.16406250000007813,
),
b: NormalF64(
0.0,
),
}
53 lines
1.1 KiB
Text
53 lines
1.1 KiB
Text
let root = import "//Cargo.rcl";
|
|
|
|
{
|
|
package =
|
|
root.package
|
|
| {
|
|
name = "rcl-fuzz",
|
|
description = "Fuzz targets and helpers for testing RCL.",
|
|
publish = false,
|
|
metadata = { cargo-fuzz = true },
|
|
},
|
|
|
|
dependencies = {
|
|
arbitrary = { version = "1.3.0", features = ["derive"] },
|
|
libfuzzer-sys = "0.4.7",
|
|
rcl = { path = ".." },
|
|
serde = "1.0.114",
|
|
serde_json = "1.0.114",
|
|
tree-sitter = "0.20.10",
|
|
tree-sitter-rcl = { path = "../grammar/tree-sitter-rcl" },
|
|
toml = {
|
|
version = "0.8.10",
|
|
default-features = false,
|
|
features = ["parse"],
|
|
},
|
|
},
|
|
|
|
bin = [
|
|
// Helper binaries.
|
|
{
|
|
name = "smithctl",
|
|
path = "tools/smithctl.rs",
|
|
},
|
|
// Fuzz targets.
|
|
let fuzz_targets = [
|
|
"fuzz_cli",
|
|
"fuzz_decimal",
|
|
"fuzz_escapes",
|
|
"fuzz_is_identifier",
|
|
"fuzz_smith",
|
|
"fuzz_source",
|
|
"fuzz_string_len",
|
|
"fuzz_tree_sitter",
|
|
];
|
|
for target in fuzz_targets:
|
|
{
|
|
name = target,
|
|
path = f"fuzz_targets/{target}.rs",
|
|
test = false,
|
|
doc = false,
|
|
},
|
|
],
|
|
}
|