gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r11058: Make visual output more ters


From: Sandro Santilli
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r11058: Make visual output more terse to have space for adding more tests. Add consistency checking in the runner (check that test run to completion)
Date: Wed, 10 Jun 2009 13:08:18 +0200
User-agent: Bazaar (1.13.1)

------------------------------------------------------------
revno: 11058
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Wed 2009-06-10 13:08:18 +0200
message:
  Make visual output more terse to have space for adding more tests. Add 
consistency checking in the runner (check that test run to completion)
modified:
  testsuite/misc-ming.all/eventSoundTest1-Runner.cpp
  testsuite/misc-ming.all/eventSoundTest1.c
=== modified file 'testsuite/misc-ming.all/eventSoundTest1-Runner.cpp'
--- a/testsuite/misc-ming.all/eventSoundTest1-Runner.cpp        2009-04-20 
06:46:58 +0000
+++ b/testsuite/misc-ming.all/eventSoundTest1-Runner.cpp        2009-06-10 
11:08:18 +0000
@@ -89,12 +89,12 @@
         12
        };
 
-    /// Expected success for each test
+       /// Expected success for each test
        bool testPasses[] = {
                true,
                true,
                true,
-        true
+               true
        };
 
        // Advance and check...
@@ -107,12 +107,14 @@
                        root->delProperty(st.find("testReady"));
                        
                        // When a test is ready, check the result of the 
previous test.
+                       check_equals(tester.soundsStarted(), 
numSoundsStarted[test]);
                        if (testPasses[test]) {
                                check_equals(tester.soundsStarted(), 
numSoundsStarted[test]);
                        }
                        else {
                                xcheck_equals(tester.soundsStarted(), 
numSoundsStarted[test]);
                        }
+
                        check_equals(tester.soundsStopped(), 
tester.soundsStarted());
                        ++test;
                        tester.click();
@@ -122,5 +124,10 @@
                frame++;
        }
 
+    // Consistency checking
+    as_value eot;
+    bool endOfTestFound = root->get_member(st.find("endoftest"), &eot);
+    check(endOfTestFound);
+
 }
 

=== modified file 'testsuite/misc-ming.all/eventSoundTest1.c'
--- a/testsuite/misc-ming.all/eventSoundTest1.c 2009-04-20 06:52:17 +0000
+++ b/testsuite/misc-ming.all/eventSoundTest1.c 2009-06-10 11:08:18 +0000
@@ -39,6 +39,7 @@
 void runMultipleSoundsTest(SWFMovie mo, SWFSound so, int* frame);
 void runNoMultipleSoundsTest(SWFMovie mo, SWFSound so, int* frame);
 void pauseForNextTest(SWFMovie mo);
+void endOfTests(SWFMovie mo);
 void printFrameInfo(SWFMovie mo, int i, const char* desc);
 
 void pauseForNextTest(SWFMovie mo)
@@ -52,6 +53,11 @@
                  "testReady = true; stop();");
 }
 
+void endOfTests(SWFMovie mo)
+{
+  add_actions(mo, "stop(); _root.endOfTest=1; note('END OF TESTS');");
+}
+
 void setupMovie(SWFMovie mo, const char* srcdir)
 {
   SWFDisplayItem it;
@@ -104,16 +110,13 @@
 void
 printFrameInfo(SWFMovie mo, int i, const char* desc)
 {
-    char descBuf[200];
-    char frameBuf[50];
+    char acts[2048];
 
-    sprintf(descBuf, "note('%s');", desc);
-    sprintf(frameBuf, "note('Frame: ' + %d);", i);
+    sprintf(acts, "note('Frame: ' + %d + ' - %s');", i, desc);
 
     /* Display frame number and description
     at the beginning of each frame */
-    add_actions(mo, frameBuf);
-    add_actions(mo, descBuf);
+    add_actions(mo, acts);
 }
 
 void
@@ -124,7 +127,7 @@
 
     SWFMovie_nextFrame(mo);
     add_actions(mo,
-              "note('Attached Embedded Sound Test.\n"
+              "note('\nAttached Embedded Sound Test.\n"
               "The notes should start exactly at the beginning of a frame "
               "(to coincide with the appearance of the description text).\n"
               "Test should start in two seconds.');");
@@ -189,7 +192,7 @@
 
     SWFMovie_nextFrame(mo);
     add_actions(mo,
-              "note('Multiple Sound Test.\n"
+              "note('\nMultiple Sound Test.\n"
               "The notes should start exactly at the beginning of a frame "
               "(to coincide with the appearance of the description text).\n"
               "Test should start in two seconds.');");
@@ -227,7 +230,8 @@
   int i;
 
   SWFMovie_nextFrame(mo);
-  add_actions(mo, "note('Non-multiple Sound Test\n"
+  add_actions(mo,
+              "note('\nNon-multiple Sound Test\n"
               "The notes should start exactly at the beginning "
               "of a frame (to coincide with the appearance of the description "
               "text). Test should start in two seconds.');");
@@ -319,7 +323,8 @@
   pauseForNextTest(mo);
   runAttachedSoundsTest(mo, so, &frame);
 
-  pauseForNextTest(mo);
+  endOfTests(mo);
+
   //Output movie
   puts("Saving " OUTPUT_FILENAME );
   SWFMovie_save(mo, OUTPUT_FILENAME);


reply via email to

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