Commit 5d13742 1 parent 1777854 commit 5d13742 Copy full SHA for 5d13742
File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -423,17 +423,20 @@ pub mod tests {
423
423
424
424
#[ test]
425
425
fn get_measure ( ) {
426
+ // a(scale 0)----measure(scale 5)----b(scale 10)
426
427
let measure = scale ( ) . get_measure ( 5. ) . unwrap ( ) ;
427
428
assert_eq ! ( measure. anchor_name, "a" ) ;
428
429
assert_eq ! ( measure. scale_offset, 5. ) ;
429
430
431
+ // a(scale 0)----b(scale 10)----measure(scale 25)
430
432
let measure = scale ( ) . get_measure ( 25. ) . unwrap ( ) ;
431
433
assert_eq ! ( measure. anchor_name, "b" ) ;
432
434
assert_eq ! ( measure. scale_offset, 15. ) ;
433
435
}
434
436
435
437
#[ test]
436
438
fn get_position ( ) {
439
+ // a(scale 0)----position(scale a+5)----b(scale 10)
437
440
let position = scale ( )
438
441
. get_position ( LrmScaleMeasure {
439
442
anchor_name : "a" . to_string ( ) ,
@@ -442,6 +445,7 @@ pub mod tests {
442
445
. unwrap ( ) ;
443
446
assert_eq ! ( position, 5. ) ;
444
447
448
+ // a(scale 0)----b(scale 10)----position(scale b+15)
445
449
let position = scale ( )
446
450
. get_position ( LrmScaleMeasure {
447
451
anchor_name : "b" . to_string ( ) ,
You can’t perform that action at this time.
0 commit comments