Thread overview | ||||||
---|---|---|---|---|---|---|
|
February 12, 2011 [phobos] Question about std.datetime | ||||
---|---|---|---|---|
| ||||
Now that I made one pass through std.datetime, I have an unrelated question - why version(testStdDateTime)? Unless there is a special reason, I suggest let's just define unittests the same way for the entire phobos. Andrei |
February 12, 2011 [phobos] Question about std.datetime | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On Saturday 12 February 2011 05:08:34 Andrei Alexandrescu wrote: > Now that I made one pass through std.datetime, I have an unrelated question - why version(testStdDateTime)? Unless there is a special reason, I suggest let's just define unittests the same way for the entire phobos. It's because of http://d.puremagic.com/issues/show_bug.cgi?id=5454 For whatever reason, dmd runs out of memory when compiling all of the unit tests on Windows. I think that it's related to the fact that the Windows build compiles all of the unit tests in Phobos at once whereas Linux does each module separately (though Windows is definitely using more memory regardless). What's particularly bizarre about it is that dmd runs out of memory before it even reaches 1GB, let alone the limit of memory on the box. Redoing the unit tests in std.datetime as you've requested may or may not fix the problem. As I don't know what's causing the problem, I can't say. Regardless, there's definitely a serious dmd bug there regarding memory usage. So, for the moment, I created version(testStdDateTime) to make it so that most of the unit tests in std.datetime aren't compiled in in Windows. If you compile std.datetime separately in Windows and use version=testStdDateTime if you run the unit tests in Linux with OS=win32wine and version=testStdDateTime, you can test that the unit tests pass just fine. I have no intention of having version(testStdDateTme) in there in the long run. It's just there to compensate for a dmd bug. - Jonathan M Davis |
February 12, 2011 [phobos] Question about std.datetime | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | On 2/12/11 9:42 AM, Jonathan M Davis wrote:
> On Saturday 12 February 2011 05:08:34 Andrei Alexandrescu wrote:
>> Now that I made one pass through std.datetime, I have an unrelated question - why version(testStdDateTime)? Unless there is a special reason, I suggest let's just define unittests the same way for the entire phobos.
>
> It's because of
>
> http://d.puremagic.com/issues/show_bug.cgi?id=5454
I understand. I experienced the same issue in std.format, but only in the release version. For the future I recommend using
version(testStdDateTime) unittest
{
...
}
to save one level of indentation.
Andrei
|
February 12, 2011 [phobos] Question about std.datetime | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On Saturday 12 February 2011 08:22:30 Andrei Alexandrescu wrote:
> On 2/12/11 9:42 AM, Jonathan M Davis wrote:
> > On Saturday 12 February 2011 05:08:34 Andrei Alexandrescu wrote:
> >> Now that I made one pass through std.datetime, I have an unrelated question - why version(testStdDateTime)? Unless there is a special reason, I suggest let's just define unittests the same way for the entire phobos.
> >
> > It's because of
> >
> > http://d.puremagic.com/issues/show_bug.cgi?id=5454
>
> I understand. I experienced the same issue in std.format, but only in the release version. For the future I recommend using
>
> version(testStdDateTime) unittest
> {
> ...
> }
>
> to save one level of indentation.
Well, I can add that to the list of things to change when I work on the unit tests.
- Jonathan M Davis
|
Copyright © 1999-2021 by the D Language Foundation