denemo-devel
[Top][All Lists]
Advanced

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

[Denemo-devel] First interactive test of Denemo


From: Richard Shann
Subject: [Denemo-devel] First interactive test of Denemo
Date: Thu, 07 Nov 2013 16:28:37 +0000

I have created the first of what I hope will be a collection of
interactive tests for Denemo.
If you open the file test/playback_test.denemo the file has a large
button to run the test and tells you what you should expect when you do
this.
In this case, it tests for regression in playback from the cursor when a
large file is involved (and playback is near the end). This was a bug I
fixed recently.

Tests such as this will be needed for things we cannot automate. This
example shows how to do it. The machinery is visible when you load the
file and open the scheme window. In there is the scheme that creates the
button; the script for action of pressing the button is more scheme
(embedded) which includes the code for changing the button to tell the
tester what they should expect.

 (CreateButton "Test"  "<span font_desc=\"36\"><b>Click to run test</b></span>")
 
 (d-SetDirectiveTagActionScript "Test"  
            "(CreateButton \"Test\"  
                        \"<span font_desc=\\\"36\\\"><b>You should hear a C 
major scale</b></span>\")
                        (d-DenemoPlayCursorToEnd)")

As you can see, when the scheme is embedded we need to double up the
escaping of the backslashes.

Please try out this test, it works on my machine. I am not sure what the
conventions are for distributing tests with programs ...
and, of course, we will need automated tests too.


Richard




reply via email to

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