Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 16e9d1b

Browse files
committed
core.math: Re-enable disabled tests
1 parent ce26f60 commit 16e9d1b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/core/math.d

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,18 @@ T toPrec(T:real)(real f) { pragma(inline, false); return f; }
219219
r = toPrec!real(d + d);
220220
r = toPrec!real(r + r);
221221

222-
/+ Uncomment these once compiler support has been added.
223222
enum real PIR = 0xc.90fdaa22168c235p-2;
224223
enum double PID = 0x1.921fb54442d18p+1;
225224
enum float PIF = 0x1.921fb6p+1;
225+
static assert(toPrec!float(PIR) == PIF);
226+
static assert(toPrec!double(PIR) == PID);
227+
static assert(toPrec!real(PIR) == PIR);
228+
static assert(toPrec!float(PID) == PIF);
229+
static assert(toPrec!double(PID) == PID);
230+
static assert(toPrec!real(PID) == PID);
231+
static assert(toPrec!float(PIF) == PIF);
232+
static assert(toPrec!double(PIF) == PIF);
233+
static assert(toPrec!real(PIF) == PIF);
226234

227235
assert(toPrec!float(PIR) == PIF);
228236
assert(toPrec!double(PIR) == PID);
@@ -233,5 +241,4 @@ T toPrec(T:real)(real f) { pragma(inline, false); return f; }
233241
assert(toPrec!float(PIF) == PIF);
234242
assert(toPrec!double(PIF) == PIF);
235243
assert(toPrec!real(PIF) == PIF);
236-
+/
237244
}

0 commit comments

Comments
 (0)