mirror of
https://github.com/storytold/cadcraft.git
synced 2026-12-02 02:38:30 -06:00
Dynamic blocks: rotation test compares with a plain bound, not an approximate TAU
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
ebeb263874
commit
6977a58a59
@@ -73,7 +73,7 @@ fn rotation_and_flip_are_read() {
|
||||
let (d, _) = symbol();
|
||||
let m = dynamic_block(&d, "Symbol").unwrap();
|
||||
let p = |node: i32| &m.parameters.iter().find(|p| p.node == node).unwrap().kind;
|
||||
assert!(matches!(p(15), ParameterKind::Rotation { label, values, .. } if label == "Angle1" && values.maximum > 6.28));
|
||||
assert!(matches!(p(15), ParameterKind::Rotation { label, values, .. } if label == "Angle1" && values.maximum > 6.0));
|
||||
assert!(
|
||||
matches!(p(20), ParameterKind::Flip { label, states, .. } if label == "Flip state1" && states == &["Not flipped".to_string(), "Flipped".to_string()])
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user