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
------------

There is a standalone Dejagnu.as class which provides all the Dejagnu.swf
facilities. In addition, there is a check.as file which should be included
in your main .as file, which lets you write
  check_equals(a,b);
instead of
  Dejagnu.check_equals(a,b);
In addition, it will automatically pass in the filename & line number, so
that on failure this will get printed out.

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.

If your test needs to compile additional SWFs, but they should not be run on
their own, add the .as files for the additional swfs to AUXMOVIES.

Once you've done so, 'make <yourtestname>.swf' should produce the swf for you
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:

	check( expression );
	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.
