This directory contains the testing framework for MTASC output.
The framework is composed by a set of Makefile rules easying the addition
of new tests.

Requirements
------------

In order to use the Dejagnu.swf facilities, which have been developed to
get the same results with both the proprietary player and Gnash (one
of the problems being embedding fonts) Ming's makeswf utility is used
to embed the Dejagnu.swf file into the MTASC output.
All of this is transparent to the user, except that the final SWF version
might be different then the expected one (until we fix this).

You'll need Ming version 0.4.0.beta3 or higher in order for this to work.

How to add a new test
---------------------

To add a new test just write it using MTASC conventions, then add the main 
filename to the ASTEST variable in the Makefile.am file. Also, remember
to add any accessory file (additional classes) to the EXTRA_DIST variable,
so they are properly distributed.

Once you've done so, 'make <yourtestname>.swf' should produce the swf for you,
with the Dejagnu.swf file already embedded. You can play this movie with any
player (including the proprietary one) to confirm it passes all checks contained
in it.

Running 'make check' should run all tests, including your new one.

How to write checks
---------------------

Take a look at the existing .as files to see how you can use the Dejagnu.swf facilities.
Basically, you'd be calling the functions:

	_root.check( expression );
	_root.check_equals( expression, expected ); // uses equality operator ==

Or the corresponding versions expecting failures (xcheck, xcheck_equals).
For more info see the gnash manual in the Testing/Dejagnu.swf section.
You can build the gnash manual by runnign 'make gnash.html' under the doc/C dir.
