put tests behind version flag
This commit is contained in:
parent
60b4e0cb27
commit
91e83eea1d
2
alloc.d
2
alloc.d
@ -426,7 +426,7 @@ ScratchAlloc(T)(u64 count, T set)
|
||||
return arr;
|
||||
}
|
||||
|
||||
unittest
|
||||
version(DLIB_TEST) unittest
|
||||
{
|
||||
{
|
||||
u64[5] arr = [1, 2, 3, 4, 5];
|
||||
|
||||
2
math.d
2
math.d
@ -956,7 +956,7 @@ Remap(f32 v, f32 in_min, f32 in_max, f32 out_min, f32 out_max)
|
||||
return Lerp(out_min, out_max, t);
|
||||
}
|
||||
|
||||
unittest
|
||||
version(DLIB_TEST) unittest
|
||||
{
|
||||
enum FLOAT_MAX = f32.max;
|
||||
enum FLOAT_MIN = -f32.max;
|
||||
|
||||
@ -1775,7 +1775,7 @@ SetEventType(WatchEvent* ev, u32 mask)
|
||||
}
|
||||
}
|
||||
|
||||
unittest
|
||||
version(DLIB_TEST) unittest
|
||||
{
|
||||
import std.stdio;
|
||||
import std.file : Remove = remove;
|
||||
@ -1928,7 +1928,7 @@ LoadFile(Arena* arena, string file_name)
|
||||
return data;
|
||||
}
|
||||
|
||||
unittest
|
||||
version(DLIB_TEST) unittest
|
||||
{
|
||||
{ // Keys
|
||||
u8 ch = InputToChar(Input.NumEight);
|
||||
|
||||
2
test.sh
2
test.sh
@ -4,7 +4,7 @@ name="Test_Runner"
|
||||
|
||||
/bin/bash ./build.sh build
|
||||
|
||||
ldc2 platform.d aliases.d math.d util.d alloc.d assets.d external/xxhash/xxhash.d build/libcglm.a -Xcc=-mno-sse -P-I/usr/include/freetype2 -L-lfreetype --main --unittest -g --of=$name
|
||||
ldc2 platform.d aliases.d math.d util.d alloc.d assets.d external/xxhash/xxhash.d build/libcglm.a -d-version=DLIB_TEST -Xcc=-mno-sse -P-I/usr/include/freetype2 -L-lfreetype --main --unittest -g --of=$name
|
||||
|
||||
rm $name.o
|
||||
./$name
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user