www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - version(all) block in src/phobos/unittest.d unnecessary?

reply Andrej Mitrovic <none none.none> writes:
There's a version(all) block in src/phobos/unittest.d (not std.unittest) with
this comment:

// Bring in unit test for module by referencing function in it

and then a bunch of random function calls from each module.

I've tried commenting out the code in the version block and call make unittest,
and from what I can tell the unittests will still run. Is this block
unnecessary?
May 28 2011
parent reply Dmitry Olshansky <dmitry.olsh gmail.com> writes:
On 28.05.2011 19:01, Andrej Mitrovic wrote:
 There's a version(all) block in src/phobos/unittest.d (not std.unittest) with
this comment:

 // Bring in unit test for module by referencing function in it

 and then a bunch of random function calls from each module.

 I've tried commenting out the code in the version block and call make
unittest, and from what I can tell the unittests will still run. Is this block
unnecessary?
unittest.d seems like an artifact from older times. I think win32 makefile needs a rewrite to behave more like posix.max (posix one tests both release and debug builds and all modules one by one). -- Dmitry Olshansky
May 28 2011
parent reply Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
What the heck, I've just opened the linux makefile and it's beautiful
compared to the windows one. The windows one is 3x the size. Is this
because Linux uses GNU's make perhaps?
May 28 2011
parent reply Dmitry Olshansky <dmitry.olsh gmail.com> writes:
On 28.05.2011 19:54, Andrej Mitrovic wrote:
 What the heck, I've just opened the linux makefile and it's beautiful
 compared to the windows one. The windows one is 3x the size. Is this
 because Linux uses GNU's make perhaps?
Don't think so, though admittedly I haven't looked very deep. One reason is that win32 had a collection of workarounds for optlink. And that not counting the sheer verbosity of it. Me thinks that if anyone has the skill to bring to shape win32 makefile that would make an awesome pull request. -- Dmitry Olshansky
May 28 2011
parent Brad Roberts <braddr puremagic.com> writes:
On 5/28/2011 9:03 AM, Dmitry Olshansky wrote:
 On 28.05.2011 19:54, Andrej Mitrovic wrote:
 What the heck, I've just opened the linux makefile and it's beautiful
 compared to the windows one. The windows one is 3x the size. Is this
 because Linux uses GNU's make perhaps?
Don't think so, though admittedly I haven't looked very deep. One reason is that win32 had a collection of workarounds for optlink. And that not counting the sheer verbosity of it. Me thinks that if anyone has the skill to bring to shape win32 makefile that would make an awesome pull request.
It is due to the relative primitiveness of the make.exe that walter ships with the windows version of things. It's.. weak.
May 28 2011