[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: regression tests

From: Trevor Bača
Subject: Re: regression tests
Date: Tue, 11 Sep 2007 15:32:49 -0500

On 9/11/07, Mats Bengtsson <address@hidden> wrote:
> Trevor Bača wrote:
> >
> >Criterion 1: There's a *complete* enumeration of acceptable values for
> >each property, and
> >
> >Criterion 2: There's a working, one-line example of each value for
> >each property of each grob
> >
> >
> >
> I guess you haven't studied combinatorics. If so, you would
> quickly realize that the resulting number of examples would
> be so huge that it's is completely impossible,
> especially if you want to cover all cases where different
> settings interact with eachother. Also, as has already been
> pointed out, many properties can take an arbitrary Scheme
> function as the value.

You misunderstand. 5 or 6 interfaces on average per grob on average,
times between 2 and 8 user-settable properties per interface
(excepting the grob interface, which 21) times between, say, 2 to 4
acceptable values per property gives around 6 * 8 * 4 or approximately
200 total settings per grob (leaving out the base settings in

200 is hardly a combinatorial quagmire.

200 is actually quite a nice number for some snarfing function to
aggregate and put in a nice table, one per grob, with an example of
the correct setting syntax for each, cut-and-pasteable.

Anyway, the point that both you and Carl have made about some
properties taking arbitrary Scheme functions is a much more
interesting one. Are we talking about, for example, Stem #'direction?
By default Stem #'direction = #ly:stem::calc-direction ... which is a
very, very cool function that incorporates the correct musical
knowledge about whether a stem should point up or down ... far more
sophisticated than #up and #down (which are also permitted as
acceptable values, of course). So, an observation: quite frequently
very powerful things happen *when you assign a Scheme function* to
some user-settable property (like assigning ly:stem::calc-direction to
Stem #'direction). BUT my intuition -- and maybe this is wrong --  is
that there are other really cool functions like
ly:stem::calc-direction hiding out there that would be available to us
as users ... if only they were documented in the grob reference. Is
this intuition right? Are there cool Scheme functions hiding out there
that aren't documented in the grob reference?

If that is in fact the case, then it's exactly the wrong instinct to
think "hm, well these properties can take arbitrary Scheme functions,
so let's avoid documenting"; quite the opposite. Those are precisely
the cases where documentation will help the most -- it's not hard to
take a guess and assign #up or #down to any ole grob property ... but
you *need* docs to help you come up with an incantation like

Trevor Bača

reply via email to

[Prev in Thread] Current Thread [Next in Thread]