More orderly test flow

This commit is contained in:
2019-05-13 05:32:37 -06:00
parent a049385a94
commit 435e86be42
11 changed files with 55 additions and 11 deletions

9
tests/AllTestsMain.hx Normal file
View File

@@ -0,0 +1,9 @@
package tests;
import utest.Test;
class AllTestsMain extends Test {
public static function main() {
InternalsTestMain.main();
ExamplesTestMain.main();
}
}

View File

@@ -0,0 +1,8 @@
package tests;
//@:build(hank.DirectoryLoadingMacro.build("examples"))
class DirectoryLoadingMacroTest extends utest.Test {
function testLoadDir() {
}
}

View File

@@ -0,0 +1,9 @@
package tests;
import utest.Test;
import hank.StoryTestCase;
class ExamplesTestMain extends Test {
public static function main() {
utest.UTest.run([new StoryTestCase("examples")]);
}
}

View File

@@ -0,0 +1,13 @@
package tests;
import utest.Test;
import utest.Assert;
using hank.Extensions;
@:build(hank.FileLoadingMacro.build(["README.md", "LICENSE"]))
class FileLoadingMacroTest extends utest.Test {
function testLoadFiles() {
var buffer = fileBuffer("README.md");
Assert.equals("# hank", buffer.takeLine().unwrap());
}
}

View File

@@ -2,8 +2,8 @@ package tests;
import utest.Test;
import hank.StoryTestCase;
class TestMain extends Test {
class InternalsTestMain extends Test {
public static function main() {
utest.UTest.run([new HInterfaceTest(), new HankBufferTest(), new ParserTest(), new StoryTestCase("examples"), new StoryTreeTest()]);
utest.UTest.run([new HInterfaceTest(), new HankBufferTest(), new ParserTest(), new StoryTreeTest(), new FileLoadingMacroTest(), new DirectoryLoadingMacroTest()]);
}
}