[Issue 5626] std.random unittest disabled

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Mar 27 15:27:12 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5626


Brad Roberts <braddr at puremagic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|repeatedly at gmail.com        |nobody at puremagic.com


--- Comment #2 from Brad Roberts <braddr at puremagic.com> 2011-03-27 15:23:47 PDT ---
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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list