Improve testing support
This commit is contained in:
1
tests/runtime/.gitignore
vendored
1
tests/runtime/.gitignore
vendored
@@ -1,5 +1,6 @@
|
||||
build
|
||||
report
|
||||
src
|
||||
test/ExampleTest.hx
|
||||
test/TestMain.hx
|
||||
test/TestSuite.hx
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
|
||||
<meta title="Validation" package="org.openfl.validation" version="1.0.0" company="OpenFL" />
|
||||
<meta title="Validation" package="org.openfl.lime.validation" version="1.0.0" company="OpenFL" />
|
||||
<app file="TestMain" main="TestMain" path="build" />
|
||||
|
||||
<source path="test" />
|
||||
|
||||
<haxelib name="openfl" />
|
||||
<haxelib name="lime" />
|
||||
<haxelib name="munit" />
|
||||
<haxelib name="mlib" />
|
||||
<haxelib name="hamcrest" />
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
package;
|
||||
|
||||
import massive.munit.util.Timer;
|
||||
import massive.munit.Assert;
|
||||
import massive.munit.async.AsyncFactory;
|
||||
|
||||
/**
|
||||
* Auto generated ExampleTest for MassiveUnit.
|
||||
* This is an example test class can be used as a template for writing normal and async tests
|
||||
* Refer to munit command line tool for more information (haxelib run munit)
|
||||
*/
|
||||
class ExampleTest
|
||||
{
|
||||
private var timer:Timer;
|
||||
|
||||
public function new()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@BeforeClass
|
||||
public function beforeClass():Void
|
||||
{
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public function afterClass():Void
|
||||
{
|
||||
}
|
||||
|
||||
@Before
|
||||
public function setup():Void
|
||||
{
|
||||
}
|
||||
|
||||
@After
|
||||
public function tearDown():Void
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public function testExample():Void
|
||||
{
|
||||
Assert.isTrue(true);
|
||||
}
|
||||
|
||||
@AsyncTest
|
||||
public function testAsyncExample(factory:AsyncFactory):Void
|
||||
{
|
||||
var handler:Dynamic = factory.createHandler(this, onTestAsyncExampleComplete, 300);
|
||||
timer = Timer.delay(handler, 200);
|
||||
}
|
||||
|
||||
private function onTestAsyncExampleComplete():Void
|
||||
{
|
||||
Assert.isFalse(false);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* test that only runs when compiled with the -D testDebug flag
|
||||
*/
|
||||
@TestDebug
|
||||
public function testExampleThatOnlyRunsWithDebugFlag():Void
|
||||
{
|
||||
Assert.isTrue(true);
|
||||
}
|
||||
|
||||
}
|
||||
24
tests/runtime/test/lime/WindowTest.hx
Normal file
24
tests/runtime/test/lime/WindowTest.hx
Normal file
@@ -0,0 +1,24 @@
|
||||
package lime;
|
||||
|
||||
|
||||
import massive.munit.Assert;
|
||||
|
||||
|
||||
class WindowTest {
|
||||
|
||||
|
||||
public function new () {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Test public function todo ():Void {
|
||||
|
||||
Assert.isTrue(true);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user