[roads] rustfmt the QA tests and the fuzz targets (no change in behaviour)

This commit is contained in:
2026-11-25 08:16:24 +01:00
parent d5917e7aab
commit 7087b06e24
4 changed files with 114 additions and 35 deletions
+32 -3
View File
@@ -70,7 +70,14 @@ fn plans_json(store: &Store) -> (Vec<String>, roads::Compiled) {
fn baseline() -> &'static Vec<String> {
static B: OnceLock<Vec<String>> = OnceLock::new();
B.get_or_init(|| plans_json(&Store::from_parts(&files(None), Some(DIRECTORY), Some(DEVICES))).0)
B.get_or_init(|| {
plans_json(&Store::from_parts(
&files(None),
Some(DIRECTORY),
Some(DEVICES),
))
.0
})
}
/// The id the file claims, so the file name can match it and the fuzzer reaches past `id.file-name`.
@@ -101,8 +108,30 @@ fuzz_target!(|data: &[u8]| {
};
assert_eq!(again.render(), text, "render is not a fixed point");
assert_eq!(
(&again.id, &again.subject, again.verb, &again.object, &again.until, &again.ports, &again.via, again.classic, &again.created, &again.body),
(&road.id, &road.subject, road.verb, &road.object, &road.until, &road.ports, &road.via, road.classic, &road.created, &road.body),
(
&again.id,
&again.subject,
again.verb,
&again.object,
&again.until,
&again.ports,
&again.via,
again.classic,
&again.created,
&again.body
),
(
&road.id,
&road.subject,
road.verb,
&road.object,
&road.until,
&road.ports,
&road.via,
road.classic,
&road.created,
&road.body
),
"the canonical text means something else:\n{text}"
);
}