Title: Unit 12 - Running Tests from Different Versions
Download Unit Project Files
public class TestAssert extends TestCase {
public function TestAssert( name : String = null ) {
super( name );
}
...
}
public function testMatch() : void {
Assert.assertMatch(
/fr.*gt/,
"feeefrbgbgbggt" );
Assert.assertMatch(
/.*@adobe\.com/,
"xagnetti@adobe.com" );
Assert.assertMatch(
/.*@adobe.?com/,
"xagnetti@adobevcom" );
try {
Assert.assertMatch(
/.*@adobe\.com/,
"xagnetti@adobevcom" );
}
catch ( e : AssertionFailedError ) {
assertAssertionsHaveBeenMade( 4 );
return;
}
fail();
}
import fu1.TestAssert;
import math.testcases.CircleSuite;
public function currentRunTestSuite():Array {
var testsToRun:Array = new Array();
testsToRun.push( CircleSuite );
testsToRun.push( TestAssert );
return testsToRun;
}