-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added simple passing test case and new build targets:
./build.sh test ./build.sh testrun
- Loading branch information
1 parent
8404428
commit ae33018
Showing
3 changed files
with
57 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,33 @@ | ||
mtasc -swf ../web/latest.swf\ | ||
#!/bin/sh | ||
|
||
case "$1" in | ||
test*) | ||
CP="-cp ../lib/asunit/as25/ -cp ../test/" | ||
OUT="../test/RunTests.swf" | ||
MAIN="AllTests.as" | ||
;; | ||
*) | ||
CP="" | ||
OUT="../web/latest.swf" | ||
MAIN="Main.as" | ||
;; | ||
esac | ||
|
||
mtasc -swf $OUT\ | ||
-version 8\ | ||
-cp ~/bin/std8/\ | ||
$CP\ | ||
-cp .\ | ||
-header 640:480:20\ | ||
-trace yubi.util.Firebug.out\ | ||
yubi/util/Firebug.as\ | ||
-strict -infer -wimp\ | ||
-main\ | ||
Main.as | ||
-main $MAIN | ||
|
||
if [ $? != 0 ]; then | ||
echo "Build failed." | ||
exit -1 | ||
fi | ||
|
||
if [ "$1" = "testrun" ] && [ -n "$(which open)" ]; then | ||
open ../test/RunTests.swf | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* Entry point for test suite | ||
*/ | ||
|
||
import asunit.framework.TestSuite; | ||
import asunit.textui.TestRunner; | ||
|
||
class AllTests extends TestSuite { | ||
private var className:String = "AllTests"; | ||
|
||
public function AllTests() { | ||
super(); | ||
addTest(new PassingTest()); | ||
} | ||
|
||
public static function main():Void { | ||
var runner:TestRunner = new TestRunner(); | ||
runner.start(AllTests); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import asunit.framework.TestCase; | ||
|
||
class PassingTest extends TestCase { | ||
private var className:String = "PassingTest"; | ||
|
||
public function test():Void { | ||
assertTrue("passing test", true); | ||
} | ||
} |