From 52e7c449909decc3bbe6fee16a7bdf0c45c47821 Mon Sep 17 00:00:00 2001 From: Weksa Date: Tue, 10 Nov 2026 07:11:04 +0000 Subject: [PATCH] rustfmt the new tests Co-Authored-By: Claude Sonnet 5.5 --- crates/weksa/src/run.rs | 11 ++++++----- crates/weksa/tests/golf_loop.rs | 11 +++++++++-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/crates/weksa/src/run.rs b/crates/weksa/src/run.rs index 89f6917..b2e774f 100644 --- a/crates/weksa/src/run.rs +++ b/crates/weksa/src/run.rs @@ -1527,15 +1527,16 @@ mod tests { #[test] fn the_floor_is_the_spread_of_each_field_of_the_two_replicates() { let record = record_of("d1"); - let rounds = [ - replicate(1, "d1", 60.0, 0.5), - replicate(2, "d1", 50.0, 0.7), - ]; + let rounds = [replicate(1, "d1", 60.0, 0.5), replicate(2, "d1", 50.0, 0.7)]; let floor = floor_of(&rounds, &record).unwrap(); // composites 0.55 and 0.6. assert_eq!(floor.chrf, 10.0); assert!((floor.meaning - 0.2).abs() < 1e-12); - assert!((floor.composite - 0.05).abs() < 1e-12, "{}", floor.composite); + assert!( + (floor.composite - 0.05).abs() < 1e-12, + "{}", + floor.composite + ); // The order of the replicates does not matter, and a third round, or a // round under another inventory or from a cycle, is not a replicate. diff --git a/crates/weksa/tests/golf_loop.rs b/crates/weksa/tests/golf_loop.rs index e80ed1f..5257d1d 100644 --- a/crates/weksa/tests/golf_loop.rs +++ b/crates/weksa/tests/golf_loop.rs @@ -1623,7 +1623,10 @@ fn two_accepts_make_the_latest_the_head_and_a_reject_after_them_is_told_so() { assert_eq!(d1.verdict(), Verdict::Accepted); assert_eq!(d2.verdict(), Verdict::Accepted); assert_eq!((d2.base_round(), d2.base_rev()), (3, 4)); - assert_eq!((d2.candidate_round(), d2.candidate_rev()), (Some(4), Some(5))); + assert_eq!( + (d2.candidate_round(), d2.candidate_rev()), + (Some(4), Some(5)) + ); // The head is the second accept, live and reopened. assert_eq!(head_rev(&dao.root), 5); @@ -2194,7 +2197,11 @@ fn source_tripwires() { let count = |needle: &str| code.iter().filter(|l| l.contains(needle)).count(); assert!(!run.contains("pub fn new")); assert_eq!(count("admit_revision("), 1, "one door call"); - assert_eq!(count("std::fs::copy"), 1, "the cycle's copy; create's is copy_new"); + assert_eq!( + count("std::fs::copy"), + 1, + "the cycle's copy; create's is copy_new" + ); assert_eq!( count("Path::new(&record.inventory)"), 1,