More orderly test flow
This commit is contained in:
9
tests/AllTestsMain.hx
Normal file
9
tests/AllTestsMain.hx
Normal file
@@ -0,0 +1,9 @@
|
||||
package tests;
|
||||
import utest.Test;
|
||||
|
||||
class AllTestsMain extends Test {
|
||||
public static function main() {
|
||||
InternalsTestMain.main();
|
||||
ExamplesTestMain.main();
|
||||
}
|
||||
}
|
||||
8
tests/DirectoryLoadingMacroTest.hx
Normal file
8
tests/DirectoryLoadingMacroTest.hx
Normal file
@@ -0,0 +1,8 @@
|
||||
package tests;
|
||||
|
||||
//@:build(hank.DirectoryLoadingMacro.build("examples"))
|
||||
class DirectoryLoadingMacroTest extends utest.Test {
|
||||
function testLoadDir() {
|
||||
|
||||
}
|
||||
}
|
||||
9
tests/ExamplesTestMain.hx
Normal file
9
tests/ExamplesTestMain.hx
Normal 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")]);
|
||||
}
|
||||
}
|
||||
13
tests/FileLoadingMacroTest.hx
Normal file
13
tests/FileLoadingMacroTest.hx
Normal 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());
|
||||
}
|
||||
}
|
||||
@@ -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()]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user