Better assertion infos and formatted code
This commit is contained in:
parent
0670aed506
commit
14839b3765
6 changed files with 163 additions and 109 deletions
|
|
@ -7,13 +7,13 @@ import ecs.simple_vector;
|
|||
unittest
|
||||
{
|
||||
SimpleVector vector;
|
||||
vector.add(cast(ubyte[])"a");
|
||||
vector.add(cast(ubyte[])"bsdf");
|
||||
assert(vector[0..5] == cast(ubyte[])"absdf");
|
||||
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[] == cast(ubyte[]) "absdf");
|
||||
assert(vector[$ - 1] == 'f');
|
||||
|
||||
|
||||
vector.clear();
|
||||
assert(vector.length == 0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue