%% Generated by lilypond-book
%% Options: [exampleindent=10.16\mm,indent=0\mm,line-width=160\mm,paper-height=845.047\pt,paper-width=597.508\pt,papersize='(cons (* 597.508 pt) (* 845.047 pt))]
\include "lilypond-book-preamble.ly"


% ****************************************************************
% Start cut-&-pastable-section
% ****************************************************************

#(ly:set-option 'eps-box-padding 3.000000)



\paper {
  #(set-paper-size '(cons (* 597.508 pt) (* 845.047 pt)))
  indent = 0\mm
  line-width = 160\mm
  % offset the left padding, also add 1mm as lilypond creates cropped
  % images with a little space on the right
  line-width = #(- line-width (* mm  3.000000) (* mm 1))
}

\layout {
  
}




% ****************************************************************
% ly snippet:
% ****************************************************************
\sourcefilename "/lilypond-2.26.0/input/regression/other/start-and-length.ly"
\sourcefileline 0
\version "2.25.3"

\header {
  texidoc = "This tests the calculation of music start and length for
various kinds of music.  Problems are reported on stderr."
}

\include "testing-functions.ily"
#(ly:set-option 'warning-as-error #t)
#(ly:expect-warning (G_ "skipping zero-duration score"))
#(ly:expect-warning (G_ "to suppress this, consider adding a spacer rest"))

\fixed c' <<

\testStartAndLength ##{#}
#ZERO-MOMENT
#ZERO-MOMENT

\testStartAndLength $#{#}
#ZERO-MOMENT
#ZERO-MOMENT

\testStartAndLength \partial 1*0
#ZERO-MOMENT
#ZERO-MOMENT

\testStartAndLength { \partial 1*0 }
#ZERO-MOMENT
#ZERO-MOMENT

\testStartAndLength << \partial 1*0 >>
#ZERO-MOMENT
#ZERO-MOMENT

\testStartAndLength \partial 8
#ZERO-MOMENT
#ZERO-MOMENT

\testStartAndLength { \partial 8 }
#ZERO-MOMENT
#ZERO-MOMENT

\testStartAndLength << \partial 8 >>
#ZERO-MOMENT
#ZERO-MOMENT

\testStartAndLength r8
#ZERO-MOMENT
#(ly:make-moment 1/8 0)

\testStartAndLength { r8 }
#ZERO-MOMENT
#(ly:make-moment 1/8 0)

\testStartAndLength << r8 >>
#ZERO-MOMENT
#(ly:make-moment 1/8 0)

\testStartAndLength s8
#ZERO-MOMENT
#(ly:make-moment 1/8 0)

\testStartAndLength { s8 }
#ZERO-MOMENT
#(ly:make-moment 1/8 0)

\testStartAndLength << s8 >>
#ZERO-MOMENT
#(ly:make-moment 1/8 0)

\testStartAndLength \skip 8
#ZERO-MOMENT
#(ly:make-moment 1/8 0)

\testStartAndLength { \skip 8 }
#ZERO-MOMENT
#(ly:make-moment 1/8 0)

\testStartAndLength << \skip 8 >>
#ZERO-MOMENT
#(ly:make-moment 1/8 0)

\testStartAndLength \unfoldRepeats \skip \repeat volta 2 c8
#ZERO-MOMENT
#(ly:make-moment 1/4 0)

\testStartAndLength <d>8
#ZERO-MOMENT
#(ly:make-moment 1/8 0)

\testStartAndLength { <d>8 }
#ZERO-MOMENT
#(ly:make-moment 1/8 0)

\testStartAndLength { <d>8 q }
#ZERO-MOMENT
#(ly:make-moment 1/4 0)

\testStartAndLength c8
#ZERO-MOMENT
#(ly:make-moment 1/8 0)

\testStartAndLength { c8 }
#ZERO-MOMENT
#(ly:make-moment 1/8 0)

\testStartAndLength << c8 >>
#ZERO-MOMENT
#(ly:make-moment 1/8 0)

\testStartAndLength { c8 c4 }
#ZERO-MOMENT
#(ly:make-moment 3/8)

\testStartAndLength << c8 c4 >>
#ZERO-MOMENT
#(ly:make-moment 1/4)

\testStartAndLength \initialContextFrom d1
#ZERO-MOMENT
#ZERO-MOMENT

\testStartAndLength \times 0/1 c4.
#ZERO-MOMENT
#ZERO-MOMENT

\testStartAndLength \times 2/3 c4.
#ZERO-MOMENT
#(ly:make-moment 1/4)

\testStartAndLength \tuplet 3/2 4 c4.
#ZERO-MOMENT
#(ly:make-moment 1/4)

%% This certainly looks strange, but tuplet creates TimeScaledMusic with the
%% reciprocal of its argument, so this should scale the music down to nothing.
\testStartAndLength \tuplet 1/0 4 c4.
#ZERO-MOMENT
#ZERO-MOMENT

>>



% ****************************************************************
% end ly snippet
% ****************************************************************
