-added some tests
-improved test runner
This commit is contained in:
parent
19687b9f88
commit
c63f3a9727
6 changed files with 147 additions and 47 deletions
18
tests/vector.d
Normal file
18
tests/vector.d
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
module tests.vector;
|
||||
|
||||
import ecs.simple_vector;
|
||||
//import ecs.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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue