mirror of
https://github.com/dlang/phobos.git
synced 2025-04-27 13:40:20 +03:00
Wrap static assert assert in unittests
This commit is contained in:
parent
05c79e1af1
commit
7b60bf7c53
1 changed files with 16 additions and 6 deletions
|
@ -1508,7 +1508,10 @@ private:
|
||||||
T* arr;
|
T* arr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static assert(isRandomAccessRange!(SliceOverIndexed!(int[])));
|
@safe pure unittest
|
||||||
|
{
|
||||||
|
static assert(isRandomAccessRange!(SliceOverIndexed!(int[])));
|
||||||
|
}
|
||||||
|
|
||||||
SliceOverIndexed!(const(T)) sliceOverIndexed(T)(size_t a, size_t b, const(T)* x)
|
SliceOverIndexed!(const(T)) sliceOverIndexed(T)(size_t a, size_t b, const(T)* x)
|
||||||
if (is(Unqual!T == T))
|
if (is(Unqual!T == T))
|
||||||
|
@ -5603,9 +5606,12 @@ struct sliceBits(size_t from, size_t to)
|
||||||
alias lo8 = assumeSize!(low_8, 8);
|
alias lo8 = assumeSize!(low_8, 8);
|
||||||
alias mlo8 = assumeSize!(midlow_8, 8);
|
alias mlo8 = assumeSize!(midlow_8, 8);
|
||||||
|
|
||||||
static assert(bitSizeOf!lo8 == 8);
|
@safe pure unittest
|
||||||
static assert(bitSizeOf!(sliceBits!(4, 7)) == 3);
|
{
|
||||||
static assert(bitSizeOf!(BitPacked!(uint, 2)) == 2);
|
static assert(bitSizeOf!lo8 == 8);
|
||||||
|
static assert(bitSizeOf!(sliceBits!(4, 7)) == 3);
|
||||||
|
static assert(bitSizeOf!(BitPacked!(uint, 2)) == 2);
|
||||||
|
}
|
||||||
|
|
||||||
template Sequence(size_t start, size_t end)
|
template Sequence(size_t start, size_t end)
|
||||||
{
|
{
|
||||||
|
@ -5919,8 +5925,12 @@ pure:
|
||||||
@property DecompressedIntervals save() { return this; }
|
@property DecompressedIntervals save() { return this; }
|
||||||
}
|
}
|
||||||
|
|
||||||
static assert(isInputRange!DecompressedIntervals);
|
@safe pure unittest
|
||||||
static assert(isForwardRange!DecompressedIntervals);
|
{
|
||||||
|
static assert(isInputRange!DecompressedIntervals);
|
||||||
|
static assert(isForwardRange!DecompressedIntervals);
|
||||||
|
}
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
version (std_uni_bootstrap){}
|
version (std_uni_bootstrap){}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue