Separate non-documentation tests from the code
This commit is contained in:
@ -21,7 +21,7 @@
|
||||
module tanya.algorithm.iteration;
|
||||
|
||||
import tanya.algorithm.comparison;
|
||||
import tanya.memory.lifecycle;
|
||||
import tanya.memory.lifetime;
|
||||
import tanya.meta.trait;
|
||||
import tanya.meta.transform;
|
||||
import tanya.range;
|
||||
|
@ -14,21 +14,21 @@
|
||||
*/
|
||||
module tanya.algorithm.mutation;
|
||||
|
||||
static import tanya.memory.lifetime;
|
||||
static import tanya.memory.op;
|
||||
static import tanya.memory.lifecycle;
|
||||
import tanya.meta.trait;
|
||||
import tanya.meta.transform;
|
||||
import tanya.range;
|
||||
version (unittest) import tanya.test.stub;
|
||||
|
||||
deprecated("Use tanya.memory.lifecycle.swap instead")
|
||||
alias swap = tanya.memory.lifecycle.swap;
|
||||
deprecated("Use tanya.memory.lifetime.swap instead")
|
||||
alias swap = tanya.memory.lifetime.swap;
|
||||
|
||||
deprecated("Use tanya.memory.lifecycle.moveEmplace instead")
|
||||
alias moveEmplace = tanya.memory.lifecycle.moveEmplace;
|
||||
deprecated("Use tanya.memory.lifetime.moveEmplace instead")
|
||||
alias moveEmplace = tanya.memory.lifetime.moveEmplace;
|
||||
|
||||
deprecated("Use tanya.memory.lifecycle.move instead")
|
||||
alias move = tanya.memory.lifecycle.move;
|
||||
deprecated("Use tanya.memory.lifetime.move instead")
|
||||
alias move = tanya.memory.lifetime.move;
|
||||
|
||||
/**
|
||||
* Copies the $(D_PARAM source) range into the $(D_PARAM target) range.
|
||||
@ -231,7 +231,7 @@ if (isInputRange!Range && hasLvalueElements!Range
|
||||
for (; !range.empty; range.popFront())
|
||||
{
|
||||
ElementType!Range* p = &range.front;
|
||||
tanya.memory.lifecycle.emplace!(ElementType!Range)(cast(void[]) (p[0 .. 1]), value);
|
||||
tanya.memory.lifetime.emplace!(ElementType!Range)(cast(void[]) (p[0 .. 1]), value);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -314,7 +314,7 @@ if (isInputRange!Range && hasLvalueElements!Range)
|
||||
void destroyAll(Range)(Range range)
|
||||
if (isInputRange!Range && hasLvalueElements!Range)
|
||||
{
|
||||
tanya.memory.lifecycle.destroyAllImpl!(Range, ElementType!Range)(range);
|
||||
tanya.memory.lifetime.destroyAllImpl!(Range, ElementType!Range)(range);
|
||||
}
|
||||
|
||||
///
|
||||
@ -363,7 +363,7 @@ if (isForwardRange!Range && hasSwappableElements!Range)
|
||||
|
||||
while (!front.empty && !next.empty && !sameHead(front, next))
|
||||
{
|
||||
tanya.memory.lifecycle.swap(front.front, next.front);
|
||||
tanya.memory.lifetime.swap(front.front, next.front);
|
||||
front.popFront();
|
||||
next.popFront();
|
||||
|
||||
|
@ -16,7 +16,7 @@ module tanya.container.entry;
|
||||
|
||||
import tanya.container.array;
|
||||
import tanya.memory.allocator;
|
||||
import tanya.memory.lifecycle;
|
||||
import tanya.memory.lifetime;
|
||||
import tanya.meta.trait;
|
||||
import tanya.meta.transform;
|
||||
import tanya.typecons;
|
||||
|
@ -16,8 +16,8 @@ module tanya.conv;
|
||||
|
||||
import tanya.container.string;
|
||||
import tanya.memory;
|
||||
deprecated("Use tanya.memory.lifecycle.emplace instead")
|
||||
public import tanya.memory.lifecycle : emplace;
|
||||
deprecated("Use tanya.memory.lifetime.emplace instead")
|
||||
public import tanya.memory.lifetime : emplace;
|
||||
import tanya.meta.trait;
|
||||
import tanya.meta.transform;
|
||||
import tanya.range;
|
||||
|
@ -10,7 +10,7 @@
|
||||
* Source: $(LINK2 https://github.com/caraus-ecms/tanya/blob/master/source/tanya/exception.d,
|
||||
* tanya/exception.d)
|
||||
*/
|
||||
deprecated("Use tanya.memory.lifecycle instead")
|
||||
deprecated("Use tanya.memory.lifetimeinstead")
|
||||
module tanya.exception;
|
||||
|
||||
public import tanya.memory.lifecycle : onOutOfMemoryError, OutOfMemoryError;
|
||||
public import tanya.memory.lifetime : onOutOfMemoryError, OutOfMemoryError;
|
||||
|
@ -12,7 +12,7 @@
|
||||
* Source: $(LINK2 https://github.com/caraus-ecms/tanya/blob/master/source/tanya/functional.d,
|
||||
* tanya/functional.d)
|
||||
*/
|
||||
deprecated("Use tanya.memory.lifecycle instead")
|
||||
deprecated("Use tanya.memory.lifetime instead")
|
||||
module tanya.functional;
|
||||
|
||||
public import tanya.memory.lifecycle : forward;
|
||||
public import tanya.memory.lifetime : forward;
|
||||
|
@ -5,7 +5,7 @@
|
||||
/**
|
||||
* Arbitrary precision arithmetic.
|
||||
*
|
||||
* Copyright: Eugene Wissner 2016-2018.
|
||||
* Copyright: Eugene Wissner 2016-2019.
|
||||
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,
|
||||
* Mozilla Public License, v. 2.0).
|
||||
* Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner)
|
||||
|
@ -5,7 +5,7 @@
|
||||
/**
|
||||
* Number theory.
|
||||
*
|
||||
* Copyright: Eugene Wissner 2017-2018.
|
||||
* Copyright: Eugene Wissner 2017-2019.
|
||||
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,
|
||||
* Mozilla Public License, v. 2.0).
|
||||
* Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner)
|
||||
|
@ -12,7 +12,7 @@
|
||||
* be found in its submodules. $(D_PSYMBOL tanya.math) doesn't import any
|
||||
* submodules publically, they should be imported explicitly.
|
||||
*
|
||||
* Copyright: Eugene Wissner 2016-2018.
|
||||
* Copyright: Eugene Wissner 2016-2019.
|
||||
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,
|
||||
* Mozilla Public License, v. 2.0).
|
||||
* Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner)
|
||||
@ -21,7 +21,6 @@
|
||||
*/
|
||||
module tanya.math;
|
||||
|
||||
import tanya.algorithm.mutation;
|
||||
import tanya.math.mp;
|
||||
import tanya.math.nbtheory;
|
||||
import tanya.meta.trait;
|
||||
|
@ -5,7 +5,7 @@
|
||||
/**
|
||||
* Random number generator.
|
||||
*
|
||||
* Copyright: Eugene Wissner 2016-2018.
|
||||
* Copyright: Eugene Wissner 2016-2019.
|
||||
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,
|
||||
* Mozilla Public License, v. 2.0).
|
||||
* Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner)
|
||||
@ -14,7 +14,6 @@
|
||||
*/
|
||||
module tanya.math.random;
|
||||
|
||||
import std.digest.sha;
|
||||
import tanya.memory;
|
||||
import tanya.typecons;
|
||||
|
||||
|
@ -21,7 +21,7 @@ import tanya.container.string;
|
||||
import tanya.conv;
|
||||
import tanya.encoding.ascii;
|
||||
import tanya.format;
|
||||
import tanya.memory.lifecycle;
|
||||
import tanya.memory.lifetime;
|
||||
import tanya.meta.trait;
|
||||
import tanya.meta.transform;
|
||||
import tanya.net.iface;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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];
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -18,7 +18,7 @@
|
||||
module tanya.typecons;
|
||||
|
||||
import tanya.format;
|
||||
import tanya.memory.lifecycle;
|
||||
import tanya.memory.lifetime;
|
||||
import tanya.meta.metafunction;
|
||||
import tanya.meta.trait;
|
||||
version (unittest) import tanya.test.stub;
|
||||
|
Reference in New Issue
Block a user