diff --git a/src/lrm_scale.rs b/src/lrm_scale.rs index f13d352..6800b14 100644 --- a/src/lrm_scale.rs +++ b/src/lrm_scale.rs @@ -423,10 +423,12 @@ pub mod tests { #[test] fn get_measure() { + // a(scale 0)----measure(scale 5)----b(scale 10) let measure = scale().get_measure(5.).unwrap(); assert_eq!(measure.anchor_name, "a"); assert_eq!(measure.scale_offset, 5.); + // a(scale 0)----b(scale 10)----measure(scale 25) let measure = scale().get_measure(25.).unwrap(); assert_eq!(measure.anchor_name, "b"); assert_eq!(measure.scale_offset, 15.); @@ -434,6 +436,7 @@ pub mod tests { #[test] fn get_position() { + // a(scale 0)----position(scale a+5)----b(scale 10) let position = scale() .get_position(LrmScaleMeasure { anchor_name: "a".to_string(), @@ -442,6 +445,7 @@ pub mod tests { .unwrap(); assert_eq!(position, 5.); + // a(scale 0)----b(scale 10)----position(scale b+15) let position = scale() .get_position(LrmScaleMeasure { anchor_name: "b".to_string(),