lawsynth/crates/lawsynth-plugin-api/tests/algorithm_property.rs
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

11 lines
444 B
Rust

use lawsynth_plugin_api::{Frame, FrameKind, LifecycleEvent, PluginState};
#[test]
fn frame_roundtrip_is_lossless_and_state_machine_rejects_invalid_transition() {
for size in [0, 1, 19, 1024] {
let frame = Frame::new(FrameKind::Request, 7, vec![42; size]).unwrap();
assert_eq!(Frame::decode(&frame.encode().unwrap()).unwrap(), frame);
}
assert!(PluginState::Discovered.transition(LifecycleEvent::Ready).is_err());
}