| Revision 276,
898 bytes
checked in by zach, 4 years ago
(diff) |
|
Adding test suite
|
| Line | |
|---|
| 1 | package { |
|---|
| 2 | import org.flexunit.runner.FlexUnitCore; |
|---|
| 3 | import flash.desktop.NativeApplication; |
|---|
| 4 | import flash.display.Sprite; |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | /** |
|---|
| 8 | * The test launcher sets up the FlexUnit enviroment for testing, adds the test suites, and |
|---|
| 9 | * creates the ResultPrinter. |
|---|
| 10 | * |
|---|
| 11 | * @author zach@longtailvideo.com |
|---|
| 12 | * @date 2009-08-18 |
|---|
| 13 | */ |
|---|
| 14 | public class PlayerTestLauncher extends Sprite { |
|---|
| 15 | private var core:FlexUnitCore; |
|---|
| 16 | |
|---|
| 17 | public function PlayerTestLauncher() { |
|---|
| 18 | core = new FlexUnitCore(); |
|---|
| 19 | core.addListener(new PlayerTestRunListener(this, new PlayerTestResultPrinter())); |
|---|
| 20 | core.run(PlayerTestSuite); |
|---|
| 21 | } |
|---|
| 22 | |
|---|
| 23 | /** |
|---|
| 24 | * Terminates the Air Debug Launcher, with an appropriate status code, when testing is done. |
|---|
| 25 | * @param status The appropriate exit code. |
|---|
| 26 | */ |
|---|
| 27 | public function complete(status:Number):void { |
|---|
| 28 | NativeApplication.nativeApplication.exit(status); |
|---|
| 29 | } |
|---|
| 30 | } |
|---|
| 31 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.