gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/masks_t...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/masks_t...
Date: Mon, 21 Jan 2008 10:20:44 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  08/01/21 10:20:44

Modified files:
        .              : ChangeLog 
        testsuite/misc-ming.all: masks_test.c masks_testrunner.cpp 

Log message:
        Improved self-containment:
        print instructions on how to manually run and verify.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5440&r2=1.5441
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/masks_test.c?cvsroot=gnash&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/masks_testrunner.cpp?cvsroot=gnash&r1=1.13&r2=1.14

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5440
retrieving revision 1.5441
diff -u -b -r1.5440 -r1.5441
--- ChangeLog   21 Jan 2008 07:52:09 -0000      1.5440
+++ ChangeLog   21 Jan 2008 10:20:43 -0000      1.5441
@@ -1,5 +1,11 @@
 2008-01-21 Sandro Santilli <address@hidden>
 
+       * testsuite/misc-ming.all/: masks_test.c, masks_testrunner.cpp:
+         Improved self-containment: print instructions on how
+         to manually run and verify.
+
+2008-01-21 Sandro Santilli <address@hidden>
+
        * testsuite/misc-ming.all/masks_testrunner.cpp: pixel checking and
          invalidated bounds testing after mask/maskee swapping.
 

Index: testsuite/misc-ming.all/masks_test.c
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/masks_test.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- testsuite/misc-ming.all/masks_test.c        20 Jan 2008 19:38:04 -0000      
1.7
+++ testsuite/misc-ming.all/masks_test.c        21 Jan 2008 10:20:43 -0000      
1.8
@@ -67,7 +67,7 @@
 add_static_mc(SWFMovie mo, const char* name, int depth, int x, int y, int 
width, int height, int r, int g, int b)
 {
        SWFShape sh;
-       SWFMovieClip mc, mc2;
+       SWFMovieClip mc;
        SWFDisplayItem it;
 
        sh = make_fill_square (0, 0, width, height, r, g, b, r, g, b);
@@ -86,7 +86,7 @@
 add_static_mask(SWFMovie mo, const char* name, int depth, int x, int y, int 
width, int height, int masklevel)
 {
        SWFShape sh;
-       SWFMovieClip mc, mc2;
+       SWFMovieClip mc;
        SWFDisplayItem it;
 
        sh = make_fill_square (-(width/2), -(height/2), width, height, 255, 0, 
0, 255, 0, 0);
@@ -200,9 +200,17 @@
        check(mo, "dynamicmc5.hitTest(240, 310, true)");
        check(mo, "dynamicmc5.hitTest(280, 350, true)");
 
-       SWFMovie_nextFrame(mo);  // FRAME 3 starts here
+       add_actions(mo,
+               "note('Placed staticmc2 (red), staticmc3 (yellow), staticmc4 
(green), staticmc5 (cyan) characters');"
+               "note('Placed dynamicmc2 (blue), dynamicmc3 (violet), 
dynamicmc4 (dark green), dynamicmc5 (light blue) characters');"
+               "note(' - Press any key to continue -');"
+               "stop();"
+               "l = new Object();"
+               "l.onKeyUp = function() { nextFrame(); };"
+               "Key.addListener(l);"
+       );
 
-       add_actions(mo, "note('Using setMask on chars in the static depth range 
2.mask(3) and 5.mask(4)');");
+       SWFMovie_nextFrame(mo);  // FRAME 3 starts here
 
        add_actions(mo, 
                "sm23 = staticmc2.setMask(staticmc3);" // red masked by yellow
@@ -211,6 +219,13 @@
                "dm54 = dynamicmc5.setMask(dynamicmc4);" // light blue masked 
by dark green 
                );
 
+       add_actions(mo,
+               "note('staticmc2.setMask(staticmc3) [red masked by yellow]');"
+               "note('staticmc5.setMask(staticmc4) [cyan masked by green]');"
+               "note('dynamicmc2.setMask(dynamicmc3) [blue masked by violet');"
+               "note('dynamicmc5.setMask(dynamicmc4) [light blue masked by 
dark green');"
+       );
+
        check_equals(mo, "typeof(sm23)", "'boolean'");
        check_equals(mo, "sm23", "true");
        check_equals(mo, "typeof(sm54)", "'boolean'");
@@ -278,9 +293,12 @@
        check(mo, "!dynamicmc5.hitTest(280, 350, true)");
        check(mo, "dynamicmc5.hitTest(280, 350, false)");
 
-       SWFMovie_nextFrame(mo);  // FRAME 4 starts here
+       add_actions(mo,
+               "note(' - Press any key to continue -');"
+               "stop();"
+       );
 
-       add_actions(mo, "note('Swapping chars 2/3 and 4/5 to see if masks are 
still in effect');");
+       SWFMovie_nextFrame(mo);  // FRAME 4 starts here
 
        add_actions(mo,
                "staticmc2.swapDepths(staticmc3);"
@@ -289,6 +307,13 @@
                "dynamicmc4.swapDepths(dynamicmc5);"
                );
 
+       add_actions(mo,
+               "note('Swapped depths of chars 2/3 and 4/5 to see if masks are 
still in effect');"
+               "note(' - Press any key to continue -');"
+               "stop();"
+       );
+
+
        check_equals(mo, "staticmc2.getDepth()", "-16381");
        check_equals(mo, "staticmc3.getDepth()", "-16382");
        check_equals(mo, "staticmc4.getDepth()", "-16379"); 
@@ -360,7 +385,6 @@
 
        SWFMovie_nextFrame(mo);  // FRAME 5 starts here
 
-       add_actions(mo, "note('Making 3.mask(2) and 4.mask(5)');");
 
        add_actions(mo,
                "sm32 = staticmc3.setMask(staticmc2);" // yellow masked by red 
@@ -369,6 +393,14 @@
                "dm45 = dynamicmc4.setMask(dynamicmc5);" // dark green masked 
by light blue 
                );
 
+       add_actions(mo,
+               "note('Swapped mask/maskee:');"
+               "note(' staticmc3.setMask(staticmc2) [yellow masked by red]');"
+               "note(' staticmc4.setMask(staticmc5) [green masked by cyan]');"
+               "note(' dynamicmc3.setMask(dynamicmc4) [violet masked by 
blue');"
+               "note(' dynamicmc4.setMask(dynamicmc5) [dark green masked by 
light blue');"
+       );
+
        check_equals(mo, "typeof(sm32)", "'boolean'");
        check_equals(mo, "sm32", "true");
        check_equals(mo, "typeof(sm45)", "'boolean'");

Index: testsuite/misc-ming.all/masks_testrunner.cpp
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/masks_testrunner.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- testsuite/misc-ming.all/masks_testrunner.cpp        21 Jan 2008 07:52:10 
-0000      1.13
+++ testsuite/misc-ming.all/masks_testrunner.cpp        21 Jan 2008 10:20:43 
-0000      1.14
@@ -61,7 +61,7 @@
        // FRAME 2 -- masks at different depth ranges
        tester.advance();
        
-       check_equals(root->get_play_state(), sprite_instance::PLAY);
+       check_equals(root->get_play_state(), sprite_instance::STOP);
        check_equals(root->get_current_frame(), 1); // 0-based
        check_equals(root->getDisplayList().size(), 9);
        root->getDisplayList().dump();
@@ -126,7 +126,10 @@
        check_pixel(276,331, 2, light_blue, 2);
 
        // FRAME 3
+       tester.pressKey(gnash::key::ENTER);
+       tester.releaseKey(gnash::key::ENTER);
        tester.advance();
+       check_equals(root->get_current_frame(), 2); // 0-based
 
        // test effects of setMask here
 
@@ -170,8 +173,11 @@
        check( invalidated.contains(276, 331) );
        check_pixel(276,331, 2, white, 2);
 
-       // FRAME 3
+       // FRAME 4
+       tester.pressKey(gnash::key::ENTER);
+       tester.releaseKey(gnash::key::ENTER);
        tester.advance();
+       check_equals(root->get_current_frame(), 3); // 0-based
 
        // test effects of swapDepth (should be none)
 
@@ -215,8 +221,11 @@
        check( invalidated.contains(276, 331) );
        check_pixel(276,331, 2, white, 2);
 
-       // FRAME 4
+       // FRAME 5
+       tester.pressKey(gnash::key::ENTER);
+       tester.releaseKey(gnash::key::ENTER);
        tester.advance();
+       check_equals(root->get_current_frame(), 4); // 0-based
 
        // TODO: test setMask effects after swapping mask/maskee
 




reply via email to

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