You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(45) |
Apr
(7) |
May
(2) |
Jun
(5) |
Jul
|
Aug
(8) |
Sep
(49) |
Oct
(13) |
Nov
(11) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(13) |
Feb
(4) |
Mar
(1) |
Apr
|
May
(2) |
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
(7) |
Dec
(1) |
2008 |
Jan
|
Feb
(7) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(15) |
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
2009 |
Jan
(3) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <luk...@us...> - 2006-03-08 17:39:05
|
Revision: 33 Author: lukebayes Date: 2006-03-08 09:38:59 -0800 (Wed, 08 Mar 2006) ViewCVS: http://svn.sourceforge.net/asunit/?rev=33&view=rev Log Message: ----------- Removed bad start Modified Paths: -------------- trunk/framework/as25/AsUnitTestRunner.as Modified: trunk/framework/as25/AsUnitTestRunner.as =================================================================== --- trunk/framework/as25/AsUnitTestRunner.as 2006-03-08 17:28:15 UTC (rev 32) +++ trunk/framework/as25/AsUnitTestRunner.as 2006-03-08 17:38:59 UTC (rev 33) @@ -2,13 +2,12 @@ import asunit.framework.TestCaseTest; class AsUnitTestRunner extends TestRunner { - + public function AsUnitTestRunner() { fscommand("fullscreen", "true"); start(AllTests); -// start(TestCaseTest, "testView"); } - + public static function main():Void { var runner = new AsUnitTestRunner(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luk...@us...> - 2006-03-08 17:28:23
|
Revision: 32 Author: lukebayes Date: 2006-03-08 09:28:15 -0800 (Wed, 08 Mar 2006) ViewCVS: http://svn.sourceforge.net/asunit/?rev=32&view=rev Log Message: ----------- Removed concrete TestSuites from repository as they were causing conflicts in concrete projects Removed Paths: ------------- trunk/framework/as3/AllTests.as trunk/framework/as3/asunit/AllTests.as trunk/framework/as3/asunit/errors/AllTests.as trunk/framework/as3/asunit/framework/AllTests.as trunk/framework/as3/asunit/runner/AllTests.as trunk/framework/as3/asunit/textui/AllTests.as Deleted: trunk/framework/as3/AllTests.as =================================================================== --- trunk/framework/as3/AllTests.as 2006-03-08 17:26:10 UTC (rev 31) +++ trunk/framework/as3/AllTests.as 2006-03-08 17:28:15 UTC (rev 32) @@ -1,10 +0,0 @@ -package { - import asunit.framework.TestSuite; - - public class AllTests extends TestSuite { - - public function AllTests() { - addTest(new asunit.AllTests()); - } - } -} \ No newline at end of file Deleted: trunk/framework/as3/asunit/AllTests.as =================================================================== --- trunk/framework/as3/asunit/AllTests.as 2006-03-08 17:26:10 UTC (rev 31) +++ trunk/framework/as3/asunit/AllTests.as 2006-03-08 17:28:15 UTC (rev 32) @@ -1,15 +0,0 @@ -package asunit { - import asunit.framework.TestSuite; - import asunit.runner.AllTests; - import asunit.textui.AllTests; - - public class AllTests extends TestSuite { - - public function AllTests() { - addTest(new asunit.errors.AllTests()); - addTest(new asunit.framework.AllTests()); - addTest(new asunit.runner.AllTests()); - addTest(new asunit.textui.AllTests()); - } - } -} \ No newline at end of file Deleted: trunk/framework/as3/asunit/errors/AllTests.as =================================================================== --- trunk/framework/as3/asunit/errors/AllTests.as 2006-03-08 17:26:10 UTC (rev 31) +++ trunk/framework/as3/asunit/errors/AllTests.as 2006-03-08 17:28:15 UTC (rev 32) @@ -1,9 +0,0 @@ -package asunit.errors { - import asunit.framework.TestSuite; - - public class AllTests extends TestSuite { - - public function AllTests() { - } - } -} \ No newline at end of file Deleted: trunk/framework/as3/asunit/framework/AllTests.as =================================================================== --- trunk/framework/as3/asunit/framework/AllTests.as 2006-03-08 17:26:10 UTC (rev 31) +++ trunk/framework/as3/asunit/framework/AllTests.as 2006-03-08 17:28:15 UTC (rev 32) @@ -1,13 +0,0 @@ -package asunit.framework { - - public class AllTests extends TestSuite { - - public function AllTests() { - addTest(new AssertTest()); - addTest(new TestCaseTest()); - addTest(new TestFailureTest()); - addTest(new VisualTestCaseTest()); - addTest(new AsynchronousTestCaseExample()); - } - } -} \ No newline at end of file Deleted: trunk/framework/as3/asunit/runner/AllTests.as =================================================================== --- trunk/framework/as3/asunit/runner/AllTests.as 2006-03-08 17:26:10 UTC (rev 31) +++ trunk/framework/as3/asunit/runner/AllTests.as 2006-03-08 17:28:15 UTC (rev 32) @@ -1,9 +0,0 @@ -package asunit.runner { - import asunit.framework.TestSuite; - - public class AllTests extends TestSuite { - - public function AllTests() { - } - } -} \ No newline at end of file Deleted: trunk/framework/as3/asunit/textui/AllTests.as =================================================================== --- trunk/framework/as3/asunit/textui/AllTests.as 2006-03-08 17:26:10 UTC (rev 31) +++ trunk/framework/as3/asunit/textui/AllTests.as 2006-03-08 17:28:15 UTC (rev 32) @@ -1,9 +0,0 @@ -package asunit.textui { - import asunit.framework.TestSuite; - - public class AllTests extends TestSuite { - - public function AllTests() { - } - } -} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luk...@us...> - 2006-03-08 17:26:18
|
Revision: 31 Author: lukebayes Date: 2006-03-08 09:26:10 -0800 (Wed, 08 Mar 2006) ViewCVS: http://svn.sourceforge.net/asunit/?rev=31&view=rev Log Message: ----------- Fixed xului so that it automatically selects the last project that was open when it starts. Modified Paths: -------------- trunk/xului/bin/AsUnit.xpi trunk/xului/src/chrome/AsUnit.jar trunk/xului/src/chrome/asunit/content/asunit/script/ProjectModel.js trunk/xului/src/chrome/en-US.jar Modified: trunk/xului/bin/AsUnit.xpi =================================================================== (Binary files differ) Modified: trunk/xului/src/chrome/AsUnit.jar =================================================================== (Binary files differ) Modified: trunk/xului/src/chrome/asunit/content/asunit/script/ProjectModel.js =================================================================== --- trunk/xului/src/chrome/asunit/content/asunit/script/ProjectModel.js 2006-03-08 17:17:52 UTC (rev 30) +++ trunk/xului/src/chrome/asunit/content/asunit/script/ProjectModel.js 2006-03-08 17:26:10 UTC (rev 31) @@ -126,20 +126,28 @@ this.projects = new Array(); var ln = projectList.length; for(var i = 0 ; i < ln; i++) { + if(projectList[i].indexOf("lastProjectId=") == 0) { + var value = projectList[i].split("="); + var id = value[1]; + this.setCurrentProjectById(id); + break; + } var project = new ClassModel(); project.fromString(projectList[i]); this.projects.push(project); } - this.setCurrentProject(this.projects[0]); + if(this.project == undefined) { + this.setCurrentProject(this.projects[0]); + } this.doOnSpecificChange("onProjectModelChanged", project); } ProjectModel.prototype.toString = function() { var str = ""; -// var str += this.project.projectId + "\n"; for(var k = 0; k < this.projects.length; k++) { str += this.projects[k].toString() + "\n"; } + str += "lastProjectId=" + this.project.projectId + "\n"; return str; } Modified: trunk/xului/src/chrome/en-US.jar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luk...@us...> - 2006-03-08 17:17:59
|
Revision: 30 Author: lukebayes Date: 2006-03-08 09:17:52 -0800 (Wed, 08 Mar 2006) ViewCVS: http://svn.sourceforge.net/asunit/?rev=30&view=rev Log Message: ----------- Fixed issue with "undefined" constructor on first build from a new project Modified Paths: -------------- trunk/xului/bin/AsUnit.xpi trunk/xului/src/chrome/AsUnit.jar trunk/xului/src/chrome/asunit/content/asunit/script/ClassModel.js trunk/xului/src/chrome/en-US.jar Modified: trunk/xului/bin/AsUnit.xpi =================================================================== (Binary files differ) Modified: trunk/xului/src/chrome/AsUnit.jar =================================================================== (Binary files differ) Modified: trunk/xului/src/chrome/asunit/content/asunit/script/ClassModel.js =================================================================== --- trunk/xului/src/chrome/asunit/content/asunit/script/ClassModel.js 2006-03-07 20:13:39 UTC (rev 29) +++ trunk/xului/src/chrome/asunit/content/asunit/script/ClassModel.js 2006-03-08 17:17:52 UTC (rev 30) @@ -61,7 +61,7 @@ ClassModel.prototype.template = ""; ClassModel.prototype.classPath = ""; ClassModel.prototype.className = ""; -ClassModel.prototype.constructorType = "public"; +ClassModel.prototype.constructorType = ClassModel.PUBLIC_CONSTRUCTOR; ClassModel.prototype.superClassName = ""; ClassModel.prototype.testCaseType = ClassModel.STANDARD_TYPE; ClassModel.prototype.interfaces = new Array(); Modified: trunk/xului/src/chrome/en-US.jar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luk...@us...> - 2006-03-07 20:13:47
|
Revision: 29 Author: lukebayes Date: 2006-03-07 12:13:39 -0800 (Tue, 07 Mar 2006) ViewCVS: http://svn.sourceforge.net/asunit/?rev=29&view=rev Log Message: ----------- Changed ResultPrinter to show names instead of company Modified Paths: -------------- trunk/framework/as25/asunit/textui/ResultPrinter.as Modified: trunk/framework/as25/asunit/textui/ResultPrinter.as =================================================================== --- trunk/framework/as25/asunit/textui/ResultPrinter.as 2006-03-07 17:19:32 UTC (rev 28) +++ trunk/framework/as25/asunit/textui/ResultPrinter.as 2006-03-07 20:13:39 UTC (rev 29) @@ -29,7 +29,7 @@ println("AsUnit 2.5 by Luke Bayes and Ali Mills"); // If you can't see clips that you think should be // attached... Perhaps it's behind this runner? - // _alpha = 50; + //_alpha = 50; } private function init():Void { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luk...@us...> - 2006-03-07 17:19:38
|
Revision: 28 Author: lukebayes Date: 2006-03-07 09:19:32 -0800 (Tue, 07 Mar 2006) ViewCVS: http://svn.sourceforge.net/asunit/?rev=28&view=rev Log Message: ----------- - Fixed infinite loop in async feature - Updated branding to names from company - Added 2.5 version number Modified Paths: -------------- trunk/framework/as25/asunit/runner/BaseTestRunner.as trunk/framework/as25/asunit/textui/ResultPrinter.as Modified: trunk/framework/as25/asunit/runner/BaseTestRunner.as =================================================================== --- trunk/framework/as25/asunit/runner/BaseTestRunner.as 2006-03-07 07:14:55 UTC (rev 27) +++ trunk/framework/as25/asunit/runner/BaseTestRunner.as 2006-03-07 17:19:32 UTC (rev 28) @@ -42,6 +42,7 @@ suite.setResult(result); suite.setContext(getClipContext()); suite.run(); + clearInterval(intervalId); intervalId = setInterval(this, "completionHandler", 1, suite, result, startTime); return result; } Modified: trunk/framework/as25/asunit/textui/ResultPrinter.as =================================================================== --- trunk/framework/as25/asunit/textui/ResultPrinter.as 2006-03-07 07:14:55 UTC (rev 27) +++ trunk/framework/as25/asunit/textui/ResultPrinter.as 2006-03-07 17:19:32 UTC (rev 28) @@ -26,7 +26,7 @@ public function ResultPrinter() { init(); configureAssets(); - println("AsUnit - Powered by Pattern Park"); + println("AsUnit 2.5 by Luke Bayes and Ali Mills"); // If you can't see clips that you think should be // attached... Perhaps it's behind this runner? // _alpha = 50; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ali...@us...> - 2006-03-07 07:14:59
|
Revision: 27 Author: alimills Date: 2006-03-06 23:14:55 -0800 (Mon, 06 Mar 2006) ViewCVS: http://svn.sourceforge.net/asunit/?rev=27&view=rev Log Message: ----------- Updating cygwin generated executable with one from Visual Studio. Modified Paths: -------------- trunk/xului/exploration/executable/AsUnit.exe Modified: trunk/xului/exploration/executable/AsUnit.exe =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ali...@us...> - 2006-03-07 07:10:35
|
Revision: 26 Author: alimills Date: 2006-03-06 23:10:32 -0800 (Mon, 06 Mar 2006) ViewCVS: http://svn.sourceforge.net/asunit/?rev=26&view=rev Log Message: ----------- Updating cygwin code with Visual Studio code. Modified Paths: -------------- trunk/xului/exploration/executable/AsUnit.cpp Modified: trunk/xului/exploration/executable/AsUnit.cpp =================================================================== --- trunk/xului/exploration/executable/AsUnit.cpp 2006-03-07 06:42:13 UTC (rev 25) +++ trunk/xului/exploration/executable/AsUnit.cpp 2006-03-07 07:10:32 UTC (rev 26) @@ -1,7 +1,11 @@ -#include <windows.h> +#include "stdafx.h" +#include <shellapi.h> -int main() +int APIENTRY WinMain(HINSTANCE hInstance, + HINSTANCE hPrevInstance, + LPSTR lpCmdLine, + int nCmdShow) { ShellExecute(NULL, "open", "xulrunner/xulrunner.exe", "xului/application.ini", NULL, 9); - return 0; -} + return 0; +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luk...@us...> - 2006-03-07 06:42:19
|
Revision: 25 Author: lukebayes Date: 2006-03-06 22:42:13 -0800 (Mon, 06 Mar 2006) ViewCVS: http://svn.sourceforge.net/asunit/?rev=25&view=rev Log Message: ----------- Added support for singular, asynchronous test cases. Still looking at ways to implement async methods. Modified Paths: -------------- trunk/framework/as25/asunit/framework/Test.as trunk/framework/as25/asunit/framework/TestCase.as trunk/framework/as25/asunit/framework/TestFailure.as trunk/framework/as25/asunit/framework/TestSuite.as trunk/framework/as25/asunit/runner/BaseTestRunner.as Added Paths: ----------- trunk/framework/as25/asunit/framework/TestCaseXml.as Modified: trunk/framework/as25/asunit/framework/Test.as =================================================================== --- trunk/framework/as25/asunit/framework/Test.as 2006-03-06 17:33:51 UTC (rev 24) +++ trunk/framework/as25/asunit/framework/Test.as 2006-03-07 06:42:13 UTC (rev 25) @@ -2,6 +2,7 @@ interface asunit.framework.Test { + public function testsComplete():Boolean; public function setResult(result:TestResult):Void; public function setContext(context:MovieClip):Void; public function run():Void; Modified: trunk/framework/as25/asunit/framework/TestCase.as =================================================================== --- trunk/framework/as25/asunit/framework/TestCase.as 2006-03-06 17:33:51 UTC (rev 24) +++ trunk/framework/as25/asunit/framework/TestCase.as 2006-03-07 06:42:13 UTC (rev 25) @@ -6,6 +6,7 @@ class asunit.framework.TestCase extends Assert implements Test { private var className:String = "[default]"; + private var testMethodsExecuted:Number = 0; private var result:TestResult; private var context:MovieClip; private var currentMethod:String; @@ -19,6 +20,31 @@ } } + /* + * Override this method when implementing an + * Asynchronous TestCase and call super.run() + * from the method body to continue + * executing the test methods. + */ + public function onXmlLoaded(node:XMLNode):Void { + super["run"](); + } + + /* + * If you override run and wait for onXmlLoaded + * Be sure you also override onXmlFailure + * so that all of your tests aren't held up + * by an IO error + */ + public function onXmlFailure(node:XML):Void { + //failError("onXmlFailure"); + //super.run(); + } + + public function testsComplete():Boolean { + return (getTestMethods().length == testMethodsExecuted); + } + public function countTestCases():Number { return getTestMethods().length; } @@ -111,6 +137,7 @@ if(!runSingle) { tearDown(); } + testMethodsExecuted++; } } Added: trunk/framework/as25/asunit/framework/TestCaseXml.as =================================================================== --- trunk/framework/as25/asunit/framework/TestCaseXml.as (rev 0) +++ trunk/framework/as25/asunit/framework/TestCaseXml.as 2006-03-07 06:42:13 UTC (rev 25) @@ -0,0 +1,31 @@ + +import asunit.framework.TestCase; + +class asunit.framework.TestCaseXml extends XML { + public static var linkageId:String = "asunit.framework.TestCaseXml"; + public static var classRef:Function = TestCaseXml; + + private var source:String; + private var callback:TestCase; + + public function TestCaseXml(src:String, cb:TestCase) { + source = src; + callback = cb; + ignoreWhite = true; + onLoad = loadHandler; + if(src != undefined) { + load(source); + } + } + + public function loadHandler(success:Boolean):Void { + if(success) { + callback.onXmlLoaded(this.firstChild); + } else { + trace("Error: TestCaseXml Failed to load data at: " + source); + callback.onXmlFailure(this); + } + } + + public static var serializable:Boolean = Object.registerClass(linkageId, classRef); +} Modified: trunk/framework/as25/asunit/framework/TestFailure.as =================================================================== --- trunk/framework/as25/asunit/framework/TestFailure.as 2006-03-06 17:33:51 UTC (rev 24) +++ trunk/framework/as25/asunit/framework/TestFailure.as 2006-03-07 06:42:13 UTC (rev 25) @@ -35,12 +35,6 @@ */ public function toString():String { return ""; -// return fFailedTest.toString(); -// var buffer:StringBuilder = new StringBuilder(); -// buffer.append(fFailedTest.toString()); -// buffer.append(":\n"); -// buffer.append(fThrownException.toString()); -// return buffer.toString(); } public function exceptionMessage():String { Modified: trunk/framework/as25/asunit/framework/TestSuite.as =================================================================== --- trunk/framework/as25/asunit/framework/TestSuite.as 2006-03-06 17:33:51 UTC (rev 24) +++ trunk/framework/as25/asunit/framework/TestSuite.as 2006-03-07 06:42:13 UTC (rev 25) @@ -13,6 +13,18 @@ private function getTestMethods():Array { return new Array(); } + + public function testsComplete():Boolean { + var completed:Boolean; + var len:Number = fTests.length; + for(var i:Number = 0; i < len; i++) { + if(!fTests[i].testsComplete()) { + return false; + } + } + return true; + } + /** * Adds a test to the suite. */ Modified: trunk/framework/as25/asunit/runner/BaseTestRunner.as =================================================================== --- trunk/framework/as25/asunit/runner/BaseTestRunner.as 2006-03-06 17:33:51 UTC (rev 24) +++ trunk/framework/as25/asunit/runner/BaseTestRunner.as 2006-03-07 06:42:13 UTC (rev 25) @@ -7,6 +7,7 @@ private static var instance:BaseTestRunner; private static var clipContext:MovieClip; private var printer:IResultPrinter; + private var intervalId:Number; public function BaseTestRunner(printerReference:Function) { if(printerReference == undefined) { @@ -41,7 +42,7 @@ suite.setResult(result); suite.setContext(getClipContext()); suite.run(); - onTestsCompleted(result, startTime); + intervalId = setInterval(this, "completionHandler", 1, suite, result, startTime); return result; } catch(e:Error) { @@ -49,8 +50,11 @@ } } - private function onTestsCompleted(result:TestResult, startTime:Number):Void { - getPrinter().printResult(result, (getTimer() - startTime)); + private function completionHandler(suite:Test, result:TestResult, startTime:Number):Void { + if(suite.testsComplete()) { + clearInterval(intervalId); + getPrinter().printResult(result, (getTimer() - startTime)); + } } public static function trace(msg:String):Void { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luk...@us...> - 2006-03-06 17:34:10
|
Revision: 24 Author: lukebayes Date: 2006-03-06 09:33:51 -0800 (Mon, 06 Mar 2006) ViewCVS: http://svn.sourceforge.net/asunit/?rev=24&view=rev Log Message: ----------- Modified labels for the template list Modified Paths: -------------- trunk/xului/bin/AsUnit.xpi trunk/xului/src/chrome/AsUnit.jar trunk/xului/src/chrome/asunit/content/asunit/AsUnit.xul trunk/xului/src/chrome/en-US.jar Modified: trunk/xului/bin/AsUnit.xpi =================================================================== (Binary files differ) Modified: trunk/xului/src/chrome/AsUnit.jar =================================================================== (Binary files differ) Modified: trunk/xului/src/chrome/asunit/content/asunit/AsUnit.xul =================================================================== --- trunk/xului/src/chrome/asunit/content/asunit/AsUnit.xul 2006-03-06 17:28:51 UTC (rev 23) +++ trunk/xului/src/chrome/asunit/content/asunit/AsUnit.xul 2006-03-06 17:33:51 UTC (rev 24) @@ -119,8 +119,8 @@ <label class="rowLabel" value="Templates:" /> <menulist id="targetEnvironment" flex="1" oncommand="model.setTemplate(this.selectedItem.value);"> <menupopup> - <menuitem label="ActionScript 2.0 (Flash Player 6 or 7)" value="as2" /> - <menuitem label="ActionScript 2.0 (Flash Player 8)" value="as25" /> + <menuitem label="ActionScript 2.0 (Flash Player 6, 7 or 8)" value="as2" /> + <menuitem label="ActionScript 2.0 (Flash Player 7 or 8 only)" value="as25" /> <menuitem label="ActionScript 3.0 (Flash Player 8.5)" value="as3" /> </menupopup> </menulist> Modified: trunk/xului/src/chrome/en-US.jar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luk...@us...> - 2006-03-06 17:28:59
|
Revision: 23 Author: lukebayes Date: 2006-03-06 09:28:51 -0800 (Mon, 06 Mar 2006) ViewCVS: http://svn.sourceforge.net/asunit/?rev=23&view=rev Log Message: ----------- Adding tests to framework Modified Paths: -------------- trunk/framework/as25/AsUnitTestRunner.as trunk/framework/as25/asunit/framework/Assert.as Added Paths: ----------- trunk/framework/as25/asunit/framework/AssertMock.as trunk/framework/as25/asunit/framework/AssertTest.as trunk/framework/as25/asunit/framework/TestCaseMock.as trunk/framework/as25/asunit/framework/TestCaseTest.as Modified: trunk/framework/as25/AsUnitTestRunner.as =================================================================== --- trunk/framework/as25/AsUnitTestRunner.as 2006-03-06 06:44:45 UTC (rev 22) +++ trunk/framework/as25/AsUnitTestRunner.as 2006-03-06 17:28:51 UTC (rev 23) @@ -1,11 +1,12 @@ import asunit.textui.TestRunner; -import asunit.example.MyViewTest; +import asunit.framework.TestCaseTest; class AsUnitTestRunner extends TestRunner { public function AsUnitTestRunner() { + fscommand("fullscreen", "true"); start(AllTests); -// start(MyViewTest, "testInstantiated"); +// start(TestCaseTest, "testView"); } public static function main():Void { Modified: trunk/framework/as25/asunit/framework/Assert.as =================================================================== --- trunk/framework/as25/asunit/framework/Assert.as 2006-03-06 06:44:45 UTC (rev 22) +++ trunk/framework/as25/asunit/framework/Assert.as 2006-03-06 17:28:51 UTC (rev 23) @@ -1,4 +1,5 @@ import asunit.errors.AssertionFailedError; +import asunit.errors.IllegalOperationError; /** * Provides assert methods and other utility methods which are inherited by @@ -288,6 +289,10 @@ assertion = Boolean(msg); msg = ""; } + + if(arguments.length > 2) { + failError("Argument Count Exceeded " + String(msg), "assertTrue"); + } addTestResult(String(msg), "assertTrue", assertion); } @@ -352,4 +357,8 @@ public static function fail(msg:String):Void { throw new AssertionFailedError(msg); } + + public static function failError(msg:String):Void { + throw new IllegalOperationError(msg); + } } \ No newline at end of file Added: trunk/framework/as25/asunit/framework/AssertMock.as =================================================================== --- trunk/framework/as25/asunit/framework/AssertMock.as (rev 0) +++ trunk/framework/as25/asunit/framework/AssertMock.as 2006-03-06 17:28:51 UTC (rev 23) @@ -0,0 +1,15 @@ +import asunit.framework.Assert; + +class asunit.framework.AssertMock extends Assert { + + public function AssertMock() { + } + + public function assertTrue():Void { + Assert.assertTrue.apply(Assert, arguments); + } + + public function assertEquals():Void { + Assert.assertEquals.apply(arguments); + } +} \ No newline at end of file Added: trunk/framework/as25/asunit/framework/AssertTest.as =================================================================== --- trunk/framework/as25/asunit/framework/AssertTest.as (rev 0) +++ trunk/framework/as25/asunit/framework/AssertTest.as 2006-03-06 17:28:51 UTC (rev 23) @@ -0,0 +1,60 @@ + +import asunit.framework.Assert; +import asunit.framework.TestCase; +import asunit.errors.AssertionFailedError; +import asunit.framework.AssertMock; +import asunit.errors.IllegalOperationError; + +class asunit.framework.AssertTest extends TestCase { + private var className:String = "asunit.framework.AssertTest"; + private var instance:AssertMock; + + public function AssertTest(testMethod:String) { + super(testMethod); + } + + public function setUp():Void { + instance = new AssertMock(); + } + + public function tearDown():Void { + delete instance; + } + + public function testAssertTrueFailureA():Void { + try { + instance.assertTrue(false); + fail("assertTrue(false) should throw"); + } + catch(e) { + if(!(e instanceof AssertionFailedError)) { + fail("assertTrue should have thrown an AssertionFailedError"); + } + } + } + +// instance.assertTrue("faux message", false); + + public function testAssertTrueTooManyArgs():Void { + try { + instance.assertTrue("faux message", false, false); + fail("assertTrue should have failed with too many args"); + } + catch(e) { + trace("hit failure"); + if(!(e instanceof IllegalOperationError)) { + fail(e.toString()); + } + } + } + + public function testAssertTrueSuccess():Void { + try { + instance.assertTrue(true); + instance.assertTrue("faux message", true); + } + catch(e) { + fail("assertTrue should not have thrown"); + } + } +} Added: trunk/framework/as25/asunit/framework/TestCaseMock.as =================================================================== --- trunk/framework/as25/asunit/framework/TestCaseMock.as (rev 0) +++ trunk/framework/as25/asunit/framework/TestCaseMock.as 2006-03-06 17:28:51 UTC (rev 23) @@ -0,0 +1,23 @@ + +class asunit.framework.TestCaseMock extends MovieClip { + public static var linkageId:String = "__Packages.asunit.framework.TestCaseMock"; + public static var classRef:Function = TestCaseMock; + + public function TestCaseMock() { + draw(); + } + + public function draw():Void { + var w:Number = 100; + var h:Number = 100; + clear(); + beginFill(0xFFCC00); + lineTo(w, 0); + lineTo(w, h); + lineTo(0, h); + lineTo(0, 0); + endFill(); + } + + public static var serializable:Boolean = Object.registerClass(linkageId, classRef); +} Added: trunk/framework/as25/asunit/framework/TestCaseTest.as =================================================================== --- trunk/framework/as25/asunit/framework/TestCaseTest.as (rev 0) +++ trunk/framework/as25/asunit/framework/TestCaseTest.as 2006-03-06 17:28:51 UTC (rev 23) @@ -0,0 +1,29 @@ + +import asunit.framework.TestCaseMock; +import asunit.framework.TestCase; + +class asunit.framework.TestCaseTest extends TestCase { + private var className:String = "asunit.framework.TestCaseTest"; + private var instance:TestCaseMock; + + public function TestCaseTest(testMethod:String) { + super(testMethod); + } + + public function setUp():Void { + var initObj:Object = new Object(); + instance = TestCaseMock(attachMovie(TestCaseMock.linkageId, initObj)); + } + + public function tearDown():Void { + instance.removeMovieClip(); + delete instance; + } + + public function testInstantiated():Void { + assertTrue("TestCaseMock instantiated", instance instanceof TestCaseMock); + } + + public function testView():Void { + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luk...@us...> - 2006-03-06 06:44:48
|
Revision: 22 Author: lukebayes Date: 2006-03-05 22:44:45 -0800 (Sun, 05 Mar 2006) ViewCVS: http://svn.sourceforge.net/asunit/?rev=22&view=rev Log Message: ----------- fixed link Modified Paths: -------------- trunk/comm/www/html/index.html Modified: trunk/comm/www/html/index.html =================================================================== --- trunk/comm/www/html/index.html 2006-03-06 06:43:05 UTC (rev 21) +++ trunk/comm/www/html/index.html 2006-03-06 06:44:45 UTC (rev 22) @@ -127,7 +127,7 @@ <td class="badge-footer"></td> </tr> <tr> - <td class="badge-footer">*OSX users can <a href="files/releeases/XULUI-Mac.zip">grab this build</a><br /><i>(No mac installer yet -<br /> <a href="http://lists.sourceforge.net/lists/listinfo/asunit-users">wanna help change that</a>?)</i></td> + <td class="badge-footer">*OSX users can <a href="files/releases/XULUI-Mac.zip">grab this build</a><br /><i>(No mac installer yet -<br /> <a href="http://lists.sourceforge.net/lists/listinfo/asunit-users">wanna help change that</a>?)</i></td> <td class="badge-footer"></td> <td class="badge-footer"></td> </tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luk...@us...> - 2006-03-06 06:43:09
|
Revision: 21 Author: lukebayes Date: 2006-03-05 22:43:05 -0800 (Sun, 05 Mar 2006) ViewCVS: http://svn.sourceforge.net/asunit/?rev=21&view=rev Log Message: ----------- Added link to the mac build for xul ui Modified Paths: -------------- trunk/comm/www/html/index.html Modified: trunk/comm/www/html/index.html =================================================================== --- trunk/comm/www/html/index.html 2006-03-06 06:24:30 UTC (rev 20) +++ trunk/comm/www/html/index.html 2006-03-06 06:43:05 UTC (rev 21) @@ -125,6 +125,12 @@ <td class="badge-footer"><i>*This installer includes the framework</i></td> <td class="badge-footer"><i>*This installer includes the framework</i></td> <td class="badge-footer"></td> + </tr> + <tr> + <td class="badge-footer">*OSX users can <a href="files/releeases/XULUI-Mac.zip">grab this build</a><br /><i>(No mac installer yet -<br /> <a href="http://lists.sourceforge.net/lists/listinfo/asunit-users">wanna help change that</a>?)</i></td> + <td class="badge-footer"></td> + <td class="badge-footer"></td> + </tr> </table> </center> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luk...@us...> - 2006-03-06 06:24:33
|
Revision: 20 Author: lukebayes Date: 2006-03-05 22:24:30 -0800 (Sun, 05 Mar 2006) ViewCVS: http://svn.sourceforge.net/asunit/?rev=20&view=rev Log Message: ----------- Working on the mac readme Modified Paths: -------------- trunk/xului/src/MAC-README.txt Modified: trunk/xului/src/MAC-README.txt =================================================================== --- trunk/xului/src/MAC-README.txt 2006-03-06 06:22:26 UTC (rev 19) +++ trunk/xului/src/MAC-README.txt 2006-03-06 06:24:30 UTC (rev 20) @@ -25,7 +25,13 @@ on Mac - if you know, please send me a brief description so that I can update this doc! +If you know how to create an executable binary for OSX, +please contact us asap as we need your help! + + Thanks, Luke Bayes +www.asunit.org +l...@pa... This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luk...@us...> - 2006-03-06 06:22:31
|
Revision: 19 Author: lukebayes Date: 2006-03-05 22:22:26 -0800 (Sun, 05 Mar 2006) ViewCVS: http://svn.sourceforge.net/asunit/?rev=19&view=rev Log Message: ----------- Created a mac readme to get xulrunner running on macs Added Paths: ----------- trunk/xului/src/MAC-README.txt Added: trunk/xului/src/MAC-README.txt =================================================================== --- trunk/xului/src/MAC-README.txt (rev 0) +++ trunk/xului/src/MAC-README.txt 2006-03-06 06:22:26 UTC (rev 19) @@ -0,0 +1,31 @@ + +1) Download the mac release of xulrunner from: +http://developer.mozilla.org/en/docs/XULRunner + +2) Unpack dmg archive from here into a new +folder named "xulrunner", so that this directory +looks like: + +.svn/ +chrome/ +defaults/ +xulrunner/xulrunner(binary) +application.ini +build.sh +install.rdf +TODO.txt +MAC-README.txt + +3) Using a terminal in this directory, execute: +. xulrunner/xulrunner application.ini + +This should launch the AsUnit XULUI. You should +be able to create some kind of simlink or shortcut +to this action, but I'm not sure how that's done +on Mac - if you know, please send me a brief +description so that I can update this doc! + +Thanks, + + +Luke Bayes This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luk...@us...> - 2006-03-06 06:01:56
|
Revision: 18 Author: lukebayes Date: 2006-03-05 22:01:52 -0800 (Sun, 05 Mar 2006) ViewCVS: http://svn.sourceforge.net/asunit/?rev=18&view=rev Log Message: ----------- Incremented version number for swfui Modified Paths: -------------- trunk/framework/as2/AsUnitUi.swf trunk/framework/as2/com/asunit/ui/Main.as Modified: trunk/framework/as2/AsUnitUi.swf =================================================================== (Binary files differ) Modified: trunk/framework/as2/com/asunit/ui/Main.as =================================================================== --- trunk/framework/as2/com/asunit/ui/Main.as 2006-03-06 05:48:16 UTC (rev 17) +++ trunk/framework/as2/com/asunit/ui/Main.as 2006-03-06 06:01:52 UTC (rev 18) @@ -7,7 +7,7 @@ class Main extends MovieClip { public static var linkageId:String = "com.asunit.ui.Main"; - var version:String = "2.7.4"; + var version:String = "2.8.0"; var flashIsTextEditorResult:Boolean; var remoteVersionObj:RemoteVersion; var localConn:LocalConnServer; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luk...@us...> - 2006-03-06 05:48:19
|
Revision: 17 Author: lukebayes Date: 2006-03-05 21:48:16 -0800 (Sun, 05 Mar 2006) ViewCVS: http://svn.sourceforge.net/asunit/?rev=17&view=rev Log Message: ----------- Implemented changes as per Darren Cook: I think the renderTests(arr:Array) function should be changed to renderTests(Void), and then change: lc["addTests"](arr); tests = new Array(); to read: lc["addTests"](tests); tests = new Array(); The reason is simply that this.tests gets reset so passing in anything other than this.tests is dangerous. While there I think renderTests() and getLocalConn() can be changed from public to private: no other classes seem to call them. addSuccess() and addFailure() don't seem to be called from anywhere at all. What are they for, and do they need to be part of the public interface? Modified Paths: -------------- trunk/framework/as2/com/asunit/framework/TestRunner.as Modified: trunk/framework/as2/com/asunit/framework/TestRunner.as =================================================================== --- trunk/framework/as2/com/asunit/framework/TestRunner.as 2006-03-05 03:02:44 UTC (rev 16) +++ trunk/framework/as2/com/asunit/framework/TestRunner.as 2006-03-06 05:48:16 UTC (rev 17) @@ -8,7 +8,7 @@ private var interval:Number = 10; private var tests:Array; - public static function getLocalConn():LocalConnClient { + private static function getLocalConn():LocalConnClient { if(localConn == null) { localConn = LocalConnGateway.createClient("_AsUnitTestRunner"); localConn["clearTestDisplay"](); @@ -16,16 +16,6 @@ return localConn; } - public static function addSuccess(ref:TestResult):Void { - var lc:LocalConnClient = getLocalConn(); - lc["addSuccess"](ref); - } - - public static function addFailure(ref:TestFailure):Void { - var lc:LocalConnClient = getLocalConn(); - lc["addFailure"](ref); - } - public function TestRunner() { tests = new Array(); } @@ -35,17 +25,17 @@ clearInterval(intervalId); if(num > 100) { - renderTests(tests); + renderTests(); } else { - intervalId = setInterval(this, "renderTests", interval, tests); + intervalId = setInterval(this, "renderTests", interval); } return num; } - public function renderTests(arr:Array):Void { + public function renderTests():Void { clearInterval(intervalId); var lc:LocalConnClient = getLocalConn(); - lc["addTests"](arr); + lc["addTests"](tests); tests = new Array(); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luk...@us...> - 2006-03-05 03:02:46
|
Revision: 16 Author: lukebayes Date: 2006-03-04 19:02:44 -0800 (Sat, 04 Mar 2006) ViewCVS: http://svn.sourceforge.net/asunit/?rev=16&view=rev Log Message: ----------- Checking in the SWF file Modified Paths: -------------- trunk/framework/as25/AsUnitTestRunner.swf Modified: trunk/framework/as25/AsUnitTestRunner.swf =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luk...@us...> - 2006-03-05 03:01:08
|
Revision: 15 Author: lukebayes Date: 2006-03-04 19:00:59 -0800 (Sat, 04 Mar 2006) ViewCVS: http://svn.sourceforge.net/asunit/?rev=15&view=rev Log Message: ----------- - Made XUL UI "Generate Test Suites" method stop add "Test.as" File to list, now only adds "*Test.as" to the list (the expression is actually /.Test\.as/ in case you're wondering...) - Cleaned up the As 2.5 framework support some more - still need Async stuff - but Mock objects and custom constructors now work. Modified Paths: -------------- trunk/xului/bin/AsUnit.xpi trunk/xului/src/chrome/AsUnit.jar trunk/xului/src/chrome/asunit/content/asunit/AsUnit.xul trunk/xului/src/chrome/asunit/content/asunit/script/CreateClass.js trunk/xului/src/chrome/asunit/content/asunit/script/tokens/As25TestCaseDefinition.js trunk/xului/src/chrome/en-US.jar Added Paths: ----------- trunk/xului/src/chrome/asunit/content/asunit/script/tokens/As25TestCaseConfig.js trunk/xului/src/chrome/asunit/content/asunit/script/tokens/As25TestCaseConstructor.js Modified: trunk/xului/bin/AsUnit.xpi =================================================================== (Binary files differ) Modified: trunk/xului/src/chrome/AsUnit.jar =================================================================== (Binary files differ) Modified: trunk/xului/src/chrome/asunit/content/asunit/AsUnit.xul =================================================================== --- trunk/xului/src/chrome/asunit/content/asunit/AsUnit.xul 2006-03-05 02:39:25 UTC (rev 14) +++ trunk/xului/src/chrome/asunit/content/asunit/AsUnit.xul 2006-03-05 03:00:59 UTC (rev 15) @@ -51,6 +51,7 @@ <!-- AS 2.5 CLASS DEFINITION TOKENS JS --> + <script src="chrome://asunit/content/script/tokens/As25TestCaseConfig.js" /> <script src="chrome://asunit/content/script/tokens/As25TestCaseDefinition.js" /> <script src="chrome://asunit/content/script/tokens/As25TestSuiteDefinition.js" /> Modified: trunk/xului/src/chrome/asunit/content/asunit/script/CreateClass.js =================================================================== --- trunk/xului/src/chrome/asunit/content/asunit/script/CreateClass.js 2006-03-05 02:39:25 UTC (rev 14) +++ trunk/xului/src/chrome/asunit/content/asunit/script/CreateClass.js 2006-03-05 03:00:59 UTC (rev 15) @@ -6,7 +6,7 @@ CreateClass.LINUX_PERMISSIONS = 0750; CreateClass.AVAILABLE_TEMPLATES = ["as2", "as25", "as3"]; CreateClass.TESTSUITE_NAME = "AllTests.as"; -CreateClass.TESTCASE_EXPRESSION = "Test\.as$"; +CreateClass.TESTCASE_EXPRESSION = ".Test\.as$"; CreateClass.SINGLETON = "singleton"; CreateClass.ACTIONSCRIPT_SUFFIX = ".as"; CreateClass.DEFAULT_ISSUE = "warning"; Added: trunk/xului/src/chrome/asunit/content/asunit/script/tokens/As25TestCaseConfig.js =================================================================== --- trunk/xului/src/chrome/asunit/content/asunit/script/tokens/As25TestCaseConfig.js (rev 0) +++ trunk/xului/src/chrome/asunit/content/asunit/script/tokens/As25TestCaseConfig.js 2006-03-05 03:00:59 UTC (rev 15) @@ -0,0 +1,64 @@ + +var As25TestCaseConfig = function() { +} + +As25TestCaseConfig.prototype = new TestCaseConfig(); + +As25TestCaseConfig.prototype.toString = function() { + var str = ""; + str += "\tprivate var className:String = \"" + this.getLinkage() + "\";\n"; + str += "\tprivate var instance:" + this.realClassName + ";\n"; + if(this.isAsynchronous) { + str += "\tprivate var xmlData:TestCaseXml;\n"; + } + + str += "\n"; + str += "\tpublic function " + this.className + "(testMethod:String) {\n"; + str += "\t\tsuper(testMethod);\n"; + str += "\t}\n"; + + if(this.isAsynchronous) { + str += "\tpublic function run():Void {\n"; + str += "\t\txmlData = new TestCaseXml(\"pathToYourXmlFile.xml\", this);\n"; + str += "\t}\n\n"; + str += "\tpublic function onXmlLoaded(node:XMLNode):Void {\n"; + str += "\t\tsuper.run();\n"; + str += "\t}\n"; + } + + str += "\n" + str += "\tpublic function setUp():Void {\n"; + + if(this.isAsynchronous) { + str += "\t\tvar data:XMLNode = xmlData.cloneNode(true);\n"; + } + + + if(this.isFactory) { + str += "\t\tinstance = " + this.realClassName + ".create();\n"; + } else if(this.isVisual) { + str += "\t\tvar initObj:Object = new Object();\n"; + str += "\t\tinstance = " + this.realClassName + "(attachMovie(" + this.realClassName + ".linkageId, initObj));\n"; + } else { + str += "\t\tinstance = new " + this.realClassName + "();\n"; + } + + str += "\t}\n\n"; + str += "\tpublic function tearDown():Void {\n"; + + if(this.isFactory) { + str += "\t\t" + this.realClassName + ".destroy();\n"; + } else if(this.isVisual) { + str += "\t\tinstance.removeMovieClip();\n"; + } + str += "\t\tdelete instance;\n"; + + str += "\t}\n\n"; + str += "\tpublic function testInstantiated():Void {\n"; + str += "\t\tassertTrue(\"" + this.realClassName + " instantiated\", instance instanceof " + this.realClassName + ");\n"; + str += "\t}\n\n"; + str += "\tpublic function test():Void {\n"; + str += "\t\tassertTrue(\"failing test\", false);\n"; + str += "\t}"; + return str; +} Added: trunk/xului/src/chrome/asunit/content/asunit/script/tokens/As25TestCaseConstructor.js =================================================================== --- trunk/xului/src/chrome/asunit/content/asunit/script/tokens/As25TestCaseConstructor.js (rev 0) +++ trunk/xului/src/chrome/asunit/content/asunit/script/tokens/As25TestCaseConstructor.js 2006-03-05 03:00:59 UTC (rev 15) @@ -0,0 +1,19 @@ + +var As25TestCaseConstructor = function() { +} + +As25TestCaseConstructor.prototype = new Object(); +As25TestCaseConstructor.prototype.className; + +As25TestCaseConstructor.prototype.setClassName = function(className) { + this.className = className; +} + + +As25TestCaseConstructor.prototype.toString = function() { + var str = "\n"; + str += "\tpublic function " + this.className + "(testMethod:String) {\n"; + str += "\t\tsuper(testMethod);\n"; + str += "\t}\n"; + return str; +} Modified: trunk/xului/src/chrome/asunit/content/asunit/script/tokens/As25TestCaseDefinition.js =================================================================== --- trunk/xului/src/chrome/asunit/content/asunit/script/tokens/As25TestCaseDefinition.js 2006-03-05 02:39:25 UTC (rev 14) +++ trunk/xului/src/chrome/asunit/content/asunit/script/tokens/As25TestCaseDefinition.js 2006-03-05 03:00:59 UTC (rev 15) @@ -12,7 +12,8 @@ this.setFullName(model.getTestCaseName()); - this.config = new TestCaseConfig(); + this.config = new As25TestCaseConfig(); + var name = model.getClassName(); if(model.getTestCaseType() == ClassModel.MOCK_TYPE) { name = model.getMockName() Modified: trunk/xului/src/chrome/en-US.jar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luk...@us...> - 2006-03-05 02:39:34
|
Revision: 14 Author: lukebayes Date: 2006-03-04 18:39:25 -0800 (Sat, 04 Mar 2006) ViewCVS: http://svn.sourceforge.net/asunit/?rev=14&view=rev Log Message: ----------- Implemented the AS 2.5 framework support in XULRunner. This is a new feature and doesn't yet support Asynchronous TestCases in the same, simple way that the 2.0 framework does. If you attempt to run this framework against legacy AS 2.0 TestCases, the only thing you *should* have to change is to remove the import statement to "com." Modified Paths: -------------- trunk/xului/bin/AsUnit.xpi trunk/xului/src/chrome/AsUnit.jar trunk/xului/src/chrome/asunit/content/asunit/AsUnit.xul trunk/xului/src/chrome/asunit/content/asunit/script/tokens/TokenFactory.js trunk/xului/src/chrome/en-US.jar Added Paths: ----------- trunk/xului/src/chrome/asunit/content/asunit/script/tokens/As25TestCaseDefinition.js trunk/xului/src/chrome/asunit/content/asunit/script/tokens/As25TestSuiteDefinition.js Modified: trunk/xului/bin/AsUnit.xpi =================================================================== (Binary files differ) Modified: trunk/xului/src/chrome/AsUnit.jar =================================================================== (Binary files differ) Modified: trunk/xului/src/chrome/asunit/content/asunit/AsUnit.xul =================================================================== --- trunk/xului/src/chrome/asunit/content/asunit/AsUnit.xul 2006-03-05 02:20:44 UTC (rev 13) +++ trunk/xului/src/chrome/asunit/content/asunit/AsUnit.xul 2006-03-05 02:39:25 UTC (rev 14) @@ -49,6 +49,11 @@ <script src="chrome://asunit/content/script/tokens/TestCaseDefinition.js" /> <script src="chrome://asunit/content/script/tokens/TestSuiteDefinition.js" /> + + <!-- AS 2.5 CLASS DEFINITION TOKENS JS --> + <script src="chrome://asunit/content/script/tokens/As25TestCaseDefinition.js" /> + <script src="chrome://asunit/content/script/tokens/As25TestSuiteDefinition.js" /> + <!-- AS 3 CLASS DEFINITION TOKENS JS --> <script src="chrome://asunit/content/script/tokens/As3ClassBody.js" /> <script src="chrome://asunit/content/script/tokens/As3ClassConstructor.js" /> Added: trunk/xului/src/chrome/asunit/content/asunit/script/tokens/As25TestCaseDefinition.js =================================================================== --- trunk/xului/src/chrome/asunit/content/asunit/script/tokens/As25TestCaseDefinition.js (rev 0) +++ trunk/xului/src/chrome/asunit/content/asunit/script/tokens/As25TestCaseDefinition.js 2006-03-05 02:39:25 UTC (rev 14) @@ -0,0 +1,47 @@ + +var As25TestCaseDefinition = function(initObj) { + this.init(initObj); +} + +As25TestCaseDefinition.prototype = new ClassDefinition(); +As25TestCaseDefinition.SUPER_CLASS = "asunit.framework.TestCase"; +As25TestCaseDefinition.XML_CLASS = "asunit.framework.TestCaseXml"; + +As25TestCaseDefinition.prototype.init = function(model) { + this.initializeMembers(); + + this.setFullName(model.getTestCaseName()); + + this.config = new TestCaseConfig(); + var name = model.getClassName(); + if(model.getTestCaseType() == ClassModel.MOCK_TYPE) { + name = model.getMockName() + } + + if(model.getTestCaseType() == ClassModel.ASYNC_TYPE) { + this.header.addImport(TestCaseDefinition.XML_CLASS); + this.config.setIsAsynchronous(true); + } + this.header.addImport(name); + this.config.setRealClassName(name); + this.config.setClassName(model.getTestCaseName()); + this.config.setIsFactory((model.getConstructorType() == ClassModel.SINGLETON_CONSTRUCTOR)); + this.config.setIsVisual((model.getAddPackagesPrefix() && model.getIsSerializable())); + + this.setSuperClass(As25TestCaseDefinition.SUPER_CLASS); +} + + +As25TestCaseDefinition.prototype.toString = function() { + try { + var str = ""; + str += this.header.toString(); + str += this.declaration.toString(); + + str += this.config.toString(); + str += this.body.toString(); + return str; + } catch(e) { + alert(e.toString()); + } +} \ No newline at end of file Added: trunk/xului/src/chrome/asunit/content/asunit/script/tokens/As25TestSuiteDefinition.js =================================================================== --- trunk/xului/src/chrome/asunit/content/asunit/script/tokens/As25TestSuiteDefinition.js (rev 0) +++ trunk/xului/src/chrome/asunit/content/asunit/script/tokens/As25TestSuiteDefinition.js 2006-03-05 02:39:25 UTC (rev 14) @@ -0,0 +1,39 @@ + +var As25TestSuiteDefinition = function() { + this.items = new Array(); +} + +As25TestSuiteDefinition.prototype = new Object(); +As25TestSuiteDefinition.prototype.items; +As25TestSuiteDefinition.prototype.name; +As25TestSuiteDefinition.prototype.location; + +As25TestSuiteDefinition.prototype.setName = function(name) { + if(name.substr(0,1) == ".") { + name = name.substr(1); + } + this.name = name; +} + +As25TestSuiteDefinition.prototype.setLocation = function(dir) { + this.location = dir; +} + +As25TestSuiteDefinition.prototype.addItem = function(item) { + this.items.push(item); +} + +As25TestSuiteDefinition.prototype.toString = function() { + var str = "\n"; + str += "class " + this.name + " extends asunit.framework.TestSuite {\n"; + str += "\tprivate var className:String = \"" + this.name + "\";\n\n"; + str += "\tpublic function AllTests() {\n"; + str += "\t\tsuper();\n"; + for(var i = 0; i < this.items.length; i++) { + str += "\t\taddTest(new " + this.items[i] + "());\n"; + } + str += "\t}\n"; + str += "}\n"; + + return str; +} Modified: trunk/xului/src/chrome/asunit/content/asunit/script/tokens/TokenFactory.js =================================================================== --- trunk/xului/src/chrome/asunit/content/asunit/script/tokens/TokenFactory.js 2006-03-05 02:20:44 UTC (rev 13) +++ trunk/xului/src/chrome/asunit/content/asunit/script/tokens/TokenFactory.js 2006-03-05 02:39:25 UTC (rev 14) @@ -7,7 +7,7 @@ if(name == "as2") { return new As2Factory(); } else if(name == "as25") { - return new As2Factory(); + return new As25Factory(); } else if(name == "as3") { return new As3Factory(); } @@ -15,6 +15,29 @@ //-------------------------------------- +var As25Factory = function() { +} + +As25Factory.prototype.type = "ActionScript 2.0"; + +As25Factory.prototype.getClassDefinition = function(model) { + return new ClassDefinition(model); +} + +As25Factory.prototype.getTestCaseDefinition = function(model) { + return new As25TestCaseDefinition(model); +} + +As25Factory.prototype.getMockDefinition = function(model) { + return new MockDefinition(model); +} + +As25Factory.prototype.getTestSuiteDefinition = function() { + return new As25TestSuiteDefinition(); +} + +//-------------------------------------- + var As2Factory = function() { } Modified: trunk/xului/src/chrome/en-US.jar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luk...@us...> - 2006-03-05 02:20:46
|
Revision: 13 Author: lukebayes Date: 2006-03-04 18:20:44 -0800 (Sat, 04 Mar 2006) ViewCVS: http://svn.sourceforge.net/asunit/?rev=13&view=rev Log Message: ----------- Fixed bug where Choosing ActionScript 2.5 caused a TokenFactory error. Modified Paths: -------------- trunk/xului/src/chrome/asunit/content/asunit/script/tokens/TokenFactory.js Modified: trunk/xului/src/chrome/asunit/content/asunit/script/tokens/TokenFactory.js =================================================================== --- trunk/xului/src/chrome/asunit/content/asunit/script/tokens/TokenFactory.js 2006-03-05 02:17:50 UTC (rev 12) +++ trunk/xului/src/chrome/asunit/content/asunit/script/tokens/TokenFactory.js 2006-03-05 02:20:44 UTC (rev 13) @@ -6,6 +6,8 @@ TokenFactory.create = function(name) { if(name == "as2") { return new As2Factory(); + } else if(name == "as25") { + return new As2Factory(); } else if(name == "as3") { return new As3Factory(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luk...@us...> - 2006-03-05 02:17:55
|
Revision: 12 Author: lukebayes Date: 2006-03-04 18:17:50 -0800 (Sat, 04 Mar 2006) ViewCVS: http://svn.sourceforge.net/asunit/?rev=12&view=rev Log Message: ----------- Was working on making all method calls asynchronous, but this was non-trivial. Will now look at re-implementing the original support for async TestCases Modified Paths: -------------- trunk/framework/as25/asunit/framework/TestCase.as Modified: trunk/framework/as25/asunit/framework/TestCase.as =================================================================== --- trunk/framework/as25/asunit/framework/TestCase.as 2006-03-05 02:00:49 UTC (rev 11) +++ trunk/framework/as25/asunit/framework/TestCase.as 2006-03-05 02:17:50 UTC (rev 12) @@ -49,6 +49,10 @@ this.result = result; } + private function getResult():TestResult { + return result; + } + public function setContext(context:MovieClip):Void { this.context = context; } @@ -66,7 +70,8 @@ var methods:Array = getTestMethods(); var name:String; try { - for(var i:Number = 0; i < methods.length; i++) { + var len:Number = methods.length; + for(var i:Number = 0; i < len; i++) { name = methods[i]; try { runMethod(name); @@ -124,10 +129,6 @@ methods.reverse(); return methods; } - - private function getResult():TestResult { - return result; - } /** * Returns the name of the currently running test method. This This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luk...@us...> - 2006-03-05 02:00:54
|
Revision: 11 Author: lukebayes Date: 2006-03-04 18:00:49 -0800 (Sat, 04 Mar 2006) ViewCVS: http://svn.sourceforge.net/asunit/?rev=11&view=rev Log Message: ----------- It didn't do it Modified Paths: -------------- trunk/framework/as25/asunit/textui/ResultPrinter.as Modified: trunk/framework/as25/asunit/textui/ResultPrinter.as =================================================================== --- trunk/framework/as25/asunit/textui/ResultPrinter.as 2006-03-05 02:00:27 UTC (rev 10) +++ trunk/framework/as25/asunit/textui/ResultPrinter.as 2006-03-05 02:00:49 UTC (rev 11) @@ -26,7 +26,7 @@ public function ResultPrinter() { init(); configureAssets(); - println("AsUnit [$id] - Powered by Pattern Park"); + println("AsUnit - Powered by Pattern Park"); // If you can't see clips that you think should be // attached... Perhaps it's behind this runner? // _alpha = 50; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luk...@us...> - 2006-03-05 02:00:30
|
Revision: 10 Author: lukebayes Date: 2006-03-04 18:00:27 -0800 (Sat, 04 Mar 2006) ViewCVS: http://svn.sourceforge.net/asunit/?rev=10&view=rev Log Message: ----------- Trying to find out if subversion will insert meta data directly into a file Modified Paths: -------------- trunk/framework/as25/asunit/textui/ResultPrinter.as Modified: trunk/framework/as25/asunit/textui/ResultPrinter.as =================================================================== --- trunk/framework/as25/asunit/textui/ResultPrinter.as 2006-03-05 01:51:25 UTC (rev 9) +++ trunk/framework/as25/asunit/textui/ResultPrinter.as 2006-03-05 02:00:27 UTC (rev 10) @@ -26,9 +26,10 @@ public function ResultPrinter() { init(); configureAssets(); - println("AsUnit - Powered by Pattern Park"); - // show clips in case people attach them behind me... - _alpha = 93; + println("AsUnit [$id] - Powered by Pattern Park"); + // If you can't see clips that you think should be + // attached... Perhaps it's behind this runner? + // _alpha = 50; } private function init():Void { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luk...@us...> - 2006-03-05 01:51:31
|
Revision: 9 Author: lukebayes Date: 2006-03-04 17:51:25 -0800 (Sat, 04 Mar 2006) ViewCVS: http://svn.sourceforge.net/asunit/?rev=9&view=rev Log Message: ----------- - Added support for Visual TestCases. - Added support for single-method TestRunners (from the start command) Modified Paths: -------------- trunk/framework/as25/AsUnitTestRunner.as trunk/framework/as25/AsUnitTestRunner.swf trunk/framework/as25/asunit/framework/Assert.as trunk/framework/as25/asunit/framework/TestCase.as trunk/framework/as25/asunit/runner/BaseTestRunner.as trunk/framework/as25/asunit/textui/ResultPrinter.as Modified: trunk/framework/as25/AsUnitTestRunner.as =================================================================== --- trunk/framework/as25/AsUnitTestRunner.as 2006-03-05 01:34:36 UTC (rev 8) +++ trunk/framework/as25/AsUnitTestRunner.as 2006-03-05 01:51:25 UTC (rev 9) @@ -1,9 +1,11 @@ import asunit.textui.TestRunner; +import asunit.example.MyViewTest; class AsUnitTestRunner extends TestRunner { public function AsUnitTestRunner() { start(AllTests); +// start(MyViewTest, "testInstantiated"); } public static function main():Void { Modified: trunk/framework/as25/AsUnitTestRunner.swf =================================================================== (Binary files differ) Modified: trunk/framework/as25/asunit/framework/Assert.as =================================================================== --- trunk/framework/as25/asunit/framework/Assert.as 2006-03-05 01:34:36 UTC (rev 8) +++ trunk/framework/as25/asunit/framework/Assert.as 2006-03-05 01:51:25 UTC (rev 9) @@ -10,7 +10,7 @@ */ class asunit.framework.Assert { private static var defaultClassName:String = "[ClassName Unknown]"; - private static var lastDepth:Number = 1; + private static var lastDepth:Number = 10; private function Assert() { } @@ -21,7 +21,7 @@ * @return * Number of next available depth. */ - private static function nextDepth():Number { + public static function nextDepth():Number { return Assert.lastDepth++; } Modified: trunk/framework/as25/asunit/framework/TestCase.as =================================================================== --- trunk/framework/as25/asunit/framework/TestCase.as 2006-03-05 01:34:36 UTC (rev 8) +++ trunk/framework/as25/asunit/framework/TestCase.as 2006-03-05 01:51:25 UTC (rev 9) @@ -23,12 +23,25 @@ return getTestMethods().length; } + /* + * setUp() is called before each method that begins with "test*" + * This method should used to instantiate common fixtures + */ private function setUp():Void { } + /* + * tearDown() is called after each method that begins with "test*" + * This method should be used to destroy any objects created from + * the setUp() method call + */ private function tearDown():Void { } + /* cleanUp() is called one time after all test methods have completed + * in a single TestCase. This is typically overridden and used to + * clean up after an Asynchronous TestCase has completed. + */ private function cleanUp():Void { } @@ -40,6 +53,10 @@ this.context = context; } + public function getContext():MovieClip { + return context; + } + public function run():Void { var result:TestResult = getResult(); result.run(this); @@ -130,5 +147,105 @@ public function getName():String { return className; - } + } + + private function createEmptyMovieClip(name:String, depth:Number):MovieClip { + return getContext().createEmptyMovieClip(name, depth); + } + + private function createTextField(name:String, depth:Number, x:Number, y:Number, width:Number, height:Number):TextField { + getContext().createTextField(name, depth, x, y, width, height); + return TextField(getContext()[name]); + } + + private function getNextHighestDepth():Number { + return getContext().getNextHighestDepth(); + } + + /* + * This helper method will support the following method signatures: + * + * attachMovie(linkageId:String):MovieClip; + * attachMovie(linkageId:String, initObject:Object):MovieClip; + * attachMovie(linkageId:String, name:String, depth:Number):MovieClip; + * attachMovie(linkageId:String, name:String, depth:Number, initObject:Object):MovieClip; + * + * @return + * MovieClip + */ + private function attachMovie():MovieClip { + var linkageId:String = arguments[0]; + var name:String; + var depth:Number; + var initObj:Object = new Object(); + + switch(arguments.length) { + case 1 : + case 2 : + name = getValidName(getContext(), name); + depth = getValidDepth(getContext()); + initObj = arguments[1]; + break; + case 3 : + case 4 : + name = arguments[1]; + depth = arguments[2]; + initObj = arguments[3]; + break; + } + return getContext().attachMovie(linkageId, name, depth, initObj); + } + + public function getUpperEmptyDepth(parent:MovieClip, depth:Number):Number { + if(depth == undefined || !isValidDepth(parent, depth)) { + var high:Number = (depth == undefined) ? 1 : depth; + for(var i:String in parent) { + if(parent[i] instanceof MovieClip && parent[i].getDepth() != undefined) { + high = Math.max(parent[i].getDepth()+1, high); + } + } + return high; + } + return depth; + } + + private function getValidName(parent:MovieClip, nm:Object):String { + var incr:Number = 1; + + var name:String = (nm == undefined || nm instanceof Object) ? "item" : nm.toString(); + var ref:MovieClip = parent[name]; + + var name2:String = name; + while(ref != undefined && incr < 100) { + name2 = name + "-" + (incr++); + ref = parent[name2]; + } + return name2; + } + + private function isValidDepth(parent:MovieClip, depth:Number):Boolean { + var item:MovieClip = getItemByDepth(parent, depth); + return (item == null) ? true : false; + } + + private function getItemByDepth(parent:MovieClip, depth:Number):MovieClip { + for(var i:String in parent) { + if(parent[i].getDepth() == depth) { + return parent[i]; + } + } + return null; + } + + private function getValidDepth(mc:MovieClip):Number { + var mcDepth:Number; + var dp:Number = nextDepth(); + for(var i:String in mc) { + mcDepth = mc[i].getDepth(); + if(mc[i] instanceof MovieClip && mcDepth < 10000) { + dp = Math.max(mcDepth, dp); + } + } + return ++dp; + } } \ No newline at end of file Modified: trunk/framework/as25/asunit/runner/BaseTestRunner.as =================================================================== --- trunk/framework/as25/asunit/runner/BaseTestRunner.as 2006-03-05 01:34:36 UTC (rev 8) +++ trunk/framework/as25/asunit/runner/BaseTestRunner.as 2006-03-05 01:51:25 UTC (rev 9) @@ -1,9 +1,11 @@ import asunit.runner.IResultPrinter; import asunit.framework.Test; import asunit.framework.TestResult; +import asunit.framework.Assert; class asunit.runner.BaseTestRunner { private static var instance:BaseTestRunner; + private static var clipContext:MovieClip; private var printer:IResultPrinter; public function BaseTestRunner(printerReference:Function) { @@ -13,6 +15,7 @@ Stage.scaleMode = "noscale"; Stage.align = "TL"; instance = this; + setClipContext(_root); setPrinter(createResultPrinter(printerReference)); } @@ -62,19 +65,23 @@ return IResultPrinter(printer); } + public function setClipContext(context:MovieClip):Void { + BaseTestRunner.clipContext = context; + } /* - * This function should return a refrence to the + * This function should return a reference to the * MovieClip that all test cases will attach items * to. This MovieClip should probably *not* be _root. */ public function getClipContext():MovieClip { - return _root; + return BaseTestRunner.clipContext; } private static function createResultPrinter(reference:Function):IResultPrinter { var printer:IResultPrinter; if(printer == undefined) { - printer = IResultPrinter(_root.attachMovie(reference.linkageId, "asUnitResultPrinter_" + 9000, 10000)); + var context:MovieClip = BaseTestRunner.clipContext; + printer = IResultPrinter(context.attachMovie(reference.linkageId, "asUnitResultPrinter_" + 9000, Assert.nextDepth())); } return printer; } Modified: trunk/framework/as25/asunit/textui/ResultPrinter.as =================================================================== --- trunk/framework/as25/asunit/textui/ResultPrinter.as 2006-03-05 01:34:36 UTC (rev 8) +++ trunk/framework/as25/asunit/textui/ResultPrinter.as 2006-03-05 01:51:25 UTC (rev 9) @@ -26,7 +26,9 @@ public function ResultPrinter() { init(); configureAssets(); - println("AsUnit - Powered by Pattern Park"); + println("AsUnit - Powered by Pattern Park"); + // show clips in case people attach them behind me... + _alpha = 93; } private function init():Void { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |