mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-04-25 21:00:03 +03:00
Add tests for #33
This commit is contained in:
parent
ac26e44a90
commit
51855cf192
2 changed files with 27 additions and 0 deletions
12
tests/issue0033.d
Normal file
12
tests/issue0033.d
Normal file
|
@ -0,0 +1,12 @@
|
|||
static IntRange fromType(Type type, bool isUnsigned)
|
||||
{
|
||||
if (type.toBasetype().ty == Tdchar)
|
||||
upper.value = 0x10FFFFUL;
|
||||
else if (!isUnsigned) {
|
||||
lower.value = ~(mask >> 1); lower.value = ~(mask >> 1);
|
||||
lower.negative = true; upper.value = (mask >> 1);
|
||||
}
|
||||
uinteger_t minHalfChunk = imin.value & ~ halfChunkMask;
|
||||
uinteger_t maxHalfChunk = imax.value & ~halfChunkMask;
|
||||
return IntRange(lower, upper);
|
||||
}
|
15
tests/issue0033.d.ref
Normal file
15
tests/issue0033.d.ref
Normal file
|
@ -0,0 +1,15 @@
|
|||
static IntRange fromType(Type type, bool isUnsigned)
|
||||
{
|
||||
if (type.toBasetype().ty == Tdchar)
|
||||
upper.value = 0x10FFFFUL;
|
||||
else if (!isUnsigned)
|
||||
{
|
||||
lower.value = ~(mask >> 1);
|
||||
lower.value = ~(mask >> 1);
|
||||
lower.negative = true;
|
||||
upper.value = (mask >> 1);
|
||||
}
|
||||
uinteger_t minHalfChunk = imin.value & ~halfChunkMask;
|
||||
uinteger_t maxHalfChunk = imax.value & ~halfChunkMask;
|
||||
return IntRange(lower, upper);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue