MiscMingAll

From Gnash Project Wiki

Jump to: navigation, search

MiscMingAll is a a framework for developing and running flash testcases for Gnash. It consists in a library of ming utilities and some macro definitions to make it convenient for printing useful info on failure or unexpected successes.

The ming utilities include a Dejagnu-like interface module that can be easily embedded in the generated SWF, the interface is the same found in the standalone Dejagnu.swf file, except you'd tipically use the provided macros to call those interfaces (but you can still call them directly, loosing the advantage of filename/linenumber printing).

The test *runner* support is nothing ming-specific, you can create test runners in the same way you would for tests in whichever other gnash testing framework (using MovieTester or GenericTestRunnerGenerator).

A step by step introduction for someone willing to start writing TestCase using MiscMingAll:

  • Checkout gnash CVS HEAD

cvs -z3 -d:pserver:anonymous@cvs.sv.gnu.org:/sources/gnash co gnash

  • Go into MiscMingAll testcases directory

cd testsuite/misc-ming.all

  • Copy an existing test (loop_*_test.c are good candidate)

cp loop_test.c my_test.c

  • Modify the file to fit your needs

patch my_test.c

  • Compile it

gcc my_test.c ming_utils.c -lming -o my_test

  • Generate the swf

./my_test

  • Play it with gnash

gnash -v my_test.swf