]> git.donarmstrong.com Git - lilypond.git/commitdiff
coverage fixes.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 4 Jan 2007 13:43:36 +0000 (14:43 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 4 Jan 2007 13:43:36 +0000 (14:43 +0100)
input/regression/general-scheme-bindings.ly
input/regression/identifiers.ly [new file with mode: 0644]
input/regression/midi-microtone.ly [new file with mode: 0644]
input/regression/multi-measure-rest-usebreve.ly [new file with mode: 0644]
input/regression/multi-measure-rest.ly
lily/duration-scheme.cc
lily/lily-parser-scheme.cc
lily/multi-measure-rest.cc
lily/parser.yy

index 677b270069f07eb1e60da5077dc31a2e7d47ed24..f4ebf049b3e60a120181e9c98c1a12e1809c0440 100644 (file)
@@ -7,4 +7,10 @@
 
 \version "2.11.8"
 
+%% todo : use macro, to show the statement tested. 
 #(ly:progress "~a" (ly:expand-environment "${HOME} $HOME $$ "))
+#(ly:font-config-display-fonts)
+#(ly:progress "~A" (ly:duration->string (ly:make-duration 2 2 3 7)))
+
+
+#(ly:parser-parse-string (ly:parser-clone parser) "foo  = #1 #(ly:progress \"hello there\n\")")
diff --git a/input/regression/identifiers.ly b/input/regression/identifiers.ly
new file mode 100644 (file)
index 0000000..682a156
--- /dev/null
@@ -0,0 +1,31 @@
+
+\header {
+  texidoc = "test identifiers."
+  }
+\version "2.10.8"
+
+num = #3
+mus = { c'4 }
+paperId = \paper { line-width = 5.0 \cm }
+layoutId = \layout { ragged-right = ##t }
+perfId = \midi {}
+markupId = \markup { hoi }
+stringId = "title"
+
+% headers not allowed  as Id's
+
+scoreId = \score {
+  \repeat unfold \num \mus
+  \layout { \layoutId }
+  \midi { \perfId }
+  }
+
+bookId = \book {
+  \score { \scoreId }
+  \paper { \paperId }
+  }
+
+
+\book { \bookId }
+
+
diff --git a/input/regression/midi-microtone.ly b/input/regression/midi-microtone.ly
new file mode 100644 (file)
index 0000000..cf1f9f1
--- /dev/null
@@ -0,0 +1,10 @@
+\version "2.10.8"
+\header {
+  texidoc = "The pitch wheel is used for microtones."
+  }
+
+\score { 
+  { c4 cih cis cisih d }
+  \midi { }
+  }
+    
diff --git a/input/regression/multi-measure-rest-usebreve.ly b/input/regression/multi-measure-rest-usebreve.ly
new file mode 100644 (file)
index 0000000..444bece
--- /dev/null
@@ -0,0 +1,24 @@
+\version "2.10.0"
+\header{
+
+  texidoc="For longer measure lengths, the breve rest is used."
+
+}
+
+\layout {
+  \context {
+    \Score
+    skipBars = ##t
+  }
+  ragged-right = ##t   
+}
+
+
+{
+  \time 8/4
+  R1*12
+  \time 4/4
+  R1*6
+}
+
+
index 5fb534401811eca66b36fa032e84127b339accc2..8ea6f3155c34bd9d8324a23cefb85a343b206a98 100644 (file)
@@ -27,8 +27,7 @@ are used then a different symbol is used.
   \time 3/4 \key cis \major
   R2.*15
   
-  R2.
-  R2.*3
+  R2.*7
   R2.*9
   R2.*11
 
index 361036256d3642d70328db3614eda2f471f43615..d10d8f2ee3ddbf04f9bc362bdf369721ec9b675e 100644 (file)
@@ -121,6 +121,14 @@ LY_DEFINE (ly_duration_length, "ly:duration-length",
   return Moment (unsmob_duration (dur)->get_length ()).smobbed_copy ();
 }
 
+LY_DEFINE (ly_duration2string, "ly:duration->string",
+          1, 0, 0, (SCM dur),
+          "Convert{dur} to string.")
+{
+  SCM_ASSERT_TYPE (unsmob_duration (dur), dur, SCM_ARG1, __FUNCTION__, "duration");
+  return ly_string2scm (unsmob_duration (dur)->to_string ());
+}
+
 LY_DEFINE (ly_duration_factor, "ly:duration-factor",
           1, 0, 0, (SCM dur),
           "Extract the compression factor from @var{dur}. Return as a pair.")
index bb08e3c01b4ef5849d866121f292bcc89739e0b2..cd46e9774b403b6280749603645975582844a6d9 100644 (file)
@@ -147,22 +147,6 @@ LY_DEFINE (ly_parse_file, "ly:parse-file",
   return SCM_UNSPECIFIED;
 }
 
-LY_DEFINE (ly_parse_string, "ly:parse-string",
-          1, 0, 0, (SCM ly_code),
-          "Parse the string LY_CODE.  "
-          "Upon failure, throw @code{ly-file-failed} key.")
-{
-  SCM_ASSERT_TYPE (scm_is_string (ly_code), ly_code, SCM_ARG1, __FUNCTION__, "string");
-
-  Sources sources;
-  sources.set_path (&global_path);
-  Lily_parser *parser = new Lily_parser (&sources);
-  parser->parse_string (ly_scm2string (ly_code));
-  parser->unprotect ();
-  parser = 0;
-
-  return SCM_UNSPECIFIED;
-}
 
 LY_DEFINE (ly_parser_lexer, "ly:parser-lexer",
           1, 0, 0, (SCM parser_smob),
index 44d699b7ce1bcd0b35137945f03c1ad490c008cf..bc6f7927bcaff9aeae466bc3b0992677263d798a 100644 (file)
@@ -205,11 +205,11 @@ Multi_measure_rest::church_rest (Grob *me, Font_metric *musfont, int measures,
   int count = 0;
   Real symbols_width = 0.0;
 
-  SCM sml = me->get_property ("use-breve-rest");
+  bool use_breve = to_boolean (me->get_property ("use-breve-rest"));
 
   while (l)
     {
-      if (sml == SCM_BOOL_T)
+      if (use_breve)
        {
          int k;
          if (l >= 2)
index 977f1a697f73b8ca50a8678afca5a58781bfc5b3..0d42a60a18ea1663bc3a5f1bd260de0457ca208c 100644 (file)
@@ -503,7 +503,7 @@ embedded_scm:
 
 lilypond_header_body:
        {
-               $$ = get_header(PARSER);
+               $$ = get_header (PARSER);
                PARSER->lexer_->add_scope ($$);
        }
        | lilypond_header_body assignment  {