caelum0x 8af85c6e28 style: format workspace to rustfmt.toml (use_small_heuristics = Max)
Bring the whole workspace into compliance with the repo's rustfmt config
(edition 2024, max_width 100, use_small_heuristics = "Max"), which had drifted
across many crates. Pure formatting — no logic changes; `cargo fmt --check` is
now clean and `cargo build --workspace` is green.
2026-08-18 16:59:40 +03:00

14 lines
495 B
Rust

use lawsynth_core::Identifier;
use lawsynth_world::{Event, EventDirection, crosses_zero};
#[test]
fn event_marker_preserves_typed_identity_and_direction() {
let id = Identifier::new("threshold").unwrap();
let event = Event::new(id.clone(), 1.25, EventDirection::Rising).unwrap();
assert_eq!(event.id, id);
assert!(crosses_zero(-0.01, 0.02, event.direction));
assert!(
Event::new(Identifier::new("invalid").unwrap(), f64::NAN, EventDirection::Any).is_none()
);
}