Separate non-documentation tests from the code

This commit is contained in:
2019-03-18 13:03:52 +01:00
parent 5ab99cf887
commit 484cb13317
43 changed files with 1020 additions and 989 deletions

View File

@ -15,7 +15,7 @@
module tanya.range.adapter;
import tanya.algorithm.mutation;
import tanya.memory.lifecycle;
import tanya.memory.lifetime;
import tanya.meta.trait;
import tanya.range;

View File

@ -55,11 +55,7 @@ module tanya.range.array;
* Precondition: $(D_INLINECODE array.length > 0).
*/
@property ref inout(T) front(T)(return scope inout(T)[] array)
in
{
assert(array.length > 0);
}
do
in (array.length > 0)
{
return array[0];
}
@ -95,11 +91,7 @@ do
* Precondition: $(D_INLINECODE array.length > 0).
*/
@property ref inout(T) back(T)(return scope inout(T)[] array)
in
{
assert(array.length > 0);
}
do
in (array.length > 0)
{
return array[$ - 1];
}
@ -134,22 +126,14 @@ do
* Precondition: $(D_INLINECODE array.length > 0).
*/
void popFront(T)(scope ref inout(T)[] array)
in
{
assert(array.length > 0);
}
do
in (array.length > 0)
{
array = array[1 .. $];
}
/// ditto
void popBack(T)(scope ref inout(T)[] array)
in
{
assert(array.length > 0);
}
do
in (array.length > 0)
{
array = array[0 .. $ - 1];
}

View File

@ -15,7 +15,7 @@
module tanya.range.primitive;
import tanya.algorithm.comparison;
import tanya.memory.lifecycle;
import tanya.memory.lifetime;
import tanya.meta.trait;
import tanya.meta.transform;
import tanya.range.array;