Bug 5626 – std.random unittest disabled

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2011-02-20T14:22:00Z
Last change time
2011-03-28T16:32:41Z
Assigned to
nobody
Creator
braddr

Comments

Comment #0 by braddr — 2011-02-20T14:22:13Z
Testing generated/linux/debug/64/unittest/std/random [email protected](796): unittest failure
Comment #1 by repeatedly — 2011-02-21T06:58:34Z
Oops! Currently, I don't have Linux 64bit environment. Please wait.
Comment #2 by braddr — 2011-03-27T15:23:47Z
Reduced bug, nothing to do with the random parts at all: module bug; extern(C) int printf(const char*, ...); int main() { // neither of these produce the expected result. ulong[] checking = [ 2_463_534_242UL ]; //long[] checking = [ 2_463_534_242L ]; printf("typeof(checking) = '%.*s'\n", typeid(checking).toString.length, typeid(checking).toString.ptr); foreach (i, e; checking) printf("i = %zd, e = %lld\n", i, e); return 0; } $ dmd -m64 bug-random.d && ./bug-random Produces: typeof(checking) = 'ulong[]' i = 0, e = -1831433054 using %llu (or %lu, just to make sure I wasn't crazy about the size specifier): typeof(checking) = 'ulong[]' i = 0, e = 18446744071878118562
Comment #3 by braddr — 2011-03-28T00:16:46Z
Comment #4 by repeatedly — 2011-03-28T16:32:41Z
Thanks to Walter and Brad for fixing!