-unittest runner works for non betterC build -working unittest coverage generation -unittest runner support for named tests. Simple regex is supported (* as any substring) and two list of expressions are used, one for include regex and one for exclude regex
19 lines
No EOL
414 B
D
19 lines
No EOL
414 B
D
module tests.vector;
|
|
|
|
import ecs.simple_vector;
|
|
//import ecs.vector;
|
|
|
|
@("simple-vector")
|
|
unittest
|
|
{
|
|
SimpleVector vector;
|
|
vector.add(cast(ubyte[])"a");
|
|
vector.add(cast(ubyte[])"bsdf");
|
|
assert(vector[0..5] == cast(ubyte[])"absdf");
|
|
assert(vector[4] == 'f');
|
|
assert(vector[] == cast(ubyte[])"absdf");
|
|
assert(vector[$ - 1] == 'f');
|
|
|
|
vector.clear();
|
|
assert(vector.length == 0);
|
|
} |