chore: apply rustfmt to binding/core sources and sync Cargo.lock
Normalises whitespace in sources committed earlier in this branch before rustfmt was run over them (Node/WASM bindings, and three core indicator test modules), and records the wasm-bindgen-test dependency tree added in B6 into Cargo.lock. No functional change; cargo fmt --all --check is now clean.
This commit is contained in:
@@ -251,6 +251,10 @@ mod tests {
|
||||
assert_eq!(bb.update(f64::INFINITY).unwrap(), last);
|
||||
// The window still holds 1..=5, so a real input slides it to 2..=6.
|
||||
let after = bb.update(6.0).unwrap();
|
||||
assert_relative_eq!(after.middle, (2.0 + 3.0 + 4.0 + 5.0 + 6.0) / 5.0, epsilon = 1e-12);
|
||||
assert_relative_eq!(
|
||||
after.middle,
|
||||
(2.0 + 3.0 + 4.0 + 5.0 + 6.0) / 5.0,
|
||||
epsilon = 1e-12
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,7 +205,10 @@ mod tests {
|
||||
assert_relative_eq!(o.upper, m + 2.0 * av, epsilon = 1e-9);
|
||||
assert_relative_eq!(o.lower, m - 2.0 * av, epsilon = 1e-9);
|
||||
}
|
||||
_ => assert!(got.is_none(), "Keltner must be None until both ready (i={i})"),
|
||||
_ => assert!(
|
||||
got.is_none(),
|
||||
"Keltner must be None until both ready (i={i})"
|
||||
),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,7 +180,10 @@ mod tests {
|
||||
for (i, v) in out.iter().enumerate().take(5) {
|
||||
assert!(v.is_none(), "candle index {i} must be None during warmup");
|
||||
}
|
||||
assert!(out[5].is_some(), "first MFI value lands at index period (5)");
|
||||
assert!(
|
||||
out[5].is_some(),
|
||||
"first MFI value lands at index period (5)"
|
||||
);
|
||||
assert_eq!(mfi.warmup_period(), 6);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user