mirror of https://github.com/deavmi/doap
Utils
- Added a unittest for `findNextFree!(T)(T[] values)`
This commit is contained in:
parent
1986202309
commit
9fb143dfc9
|
@ -148,4 +148,11 @@ public T findNextFree(T)(T[] used) if(__traits(isIntegral, T))
|
|||
|
||||
return found;
|
||||
}
|
||||
}
|
||||
|
||||
unittest
|
||||
{
|
||||
ubyte[] values = [1,2,3];
|
||||
ubyte free = findNextFree(values);
|
||||
assert(isPresent(values, free) == false);
|
||||
}
|
Loading…
Reference in New Issue