On Wednesday, 17 February 2016 at 09:05:34 UTC, Atila Neves wrote:
I'm on a tablet on holiday so sorry in advance for the short
You're on a holiday, I appreciate anything you write :)
Your versioned import is the reason why I made it so a plain
string UDA is just as good as @Name. That way you only need to
import unit_threaded once in a version block, and only if you
want to use the shouldXXX assertions.
Nice. What about @ShoudFail though?
The test runner you mentioned can be generated by using my
dtest tool, also on dub.
I saw it, does it integrate well with `dub test` and -cov?
The next thing on my TODO list is to make it even easier to
opt-in to using unit-threaded without having to change existing
I feel you are almost there.
For completeness, here is my testrunner generator that dub's
void main(string args)
import std.algorithm : endsWith, startsWith, filter, map, joiner;
import std.array : replace;
import std.range : array;
bool onlyDFiles(DirEntry e)
return !e.isDir() && e.name.endsWith(".d");
auto files = dirEntries("source/es5",
auto f = File("source/testrunner.d","w");
return runTests!(`~files~`)(Runtime.args) == 0;
Runtime.moduleUnitTester = &runner;