[osflash] as2ant unittest task - silence...

Chris Allen mrchrisallen at gmail.com
Mon Jul 10 13:14:04 EDT 2006


On 7/10/06, Michael Forrest <Michael.Forrest at framfab.com> wrote:
> I can't see any reference to TestRunner in the download I'm trying to
> use (as2ant_2.0.zip). Is that for asunit? I thought the example used
> as2lib, and that as2lib is a different engine to asunit...
>
Hahaha! Yeah how many ways can we reuse the characters AS and the
number 2? okay, so it is a bit confusing, and I made matters worse by
not explaining more and actually not remembering exactly how it's
setup.

The file that you are looking for is in the as2ant_2.0.zip here:
as2ant/flash/org/as2lib/test/unit/XmlSocketResultPrinter.as

That's the result printer that you will need to call from your
implementation of TestRunner. I have created one that looks like this:

/**
 * @author Chris Allen mrchrisallen at gmail.com
 */

import asunit.textui.TestRunner;
import com.tomsnyder.fasttmath2.tests.AllTests; //my implementation of TestSuite
import com.blitzagency.xray.util.XrayLoader;
import com.dynamicflash.utils.Delegate;
import org.as2lib.test.unit.XmlSocketResultPrinter;
import asunit.runner.BaseTestRunner;

class com.tomsnyder.fasttmath2.tests.AntTestRunner extends BaseTestRunner
{

	public function AntTestRunner()
	{
   		super(XmlSocketResultPrinter);
   		start(AllTests);
     }

    public static function main():Void
    {
       	var runner:AntTestRunner = new AntTestRunner();
    }

}

Hopefully that help a little more.

good luck.

-Chris



More information about the osflash mailing list