Can't run unit tests on Win7 64-bit?

2016-01-28 Thread pineapple via Digitalmars-d-learn

I have a super simple D file that looks like this:

unittest{
import std.stdio;
writeln("hello");
}

On OSX Mavericks I run "rdmd --main -unittest test.d" and I get a 
nice "hello" and everything is well.


On Win7 64-bit I run "> rdmd --main -unittest test.d" and rdmd 
seems to hang. It never outputs "hello", and it doesn't terminate.


Is this a mistake on my part? Or just an annoying bug?


Re: Win7 64-bit

2011-03-07 Thread Jonathan M Davis
On Monday, March 07, 2011 06:23:09 Stewart Gordon wrote:
 On 07/03/2011 02:10, Jonathan M Davis wrote:
 snip
 
  If you're using -cov, you probably want -unittest,
 
 snip
 
 I disagree:
 
 - Most of the time I use -cov, it's to check the normal flow of program
 logic, rather than the unittests.  It's true that it *can* be used to
 check that the unittests cover all cases, but that's far from its only
 use.

 - Even if checking unittests were its only *practical* use, it would be
 arbitrary to program in a restriction explicitly.

I believe that the _common_ use case for -cov is to check the coverage of your 
unit tests, in which case you'd also need to use -unittest (that's what is 
_normally_ meant when talking about code coverage). However, there's nothing 
stopping you from using it when running your program normally.

 Moreover, does DMD have a Win64 (either runs on or compiles for) version? 
 Or is it just the normal Win32 version, running on your 64-bit system?  It
 would be useful if we could find out the circumstances in which this bug
 bites.

As far dmd itself goes, only a 32-bit binary exists, and Walter has no plans to 
create 64-bit version. In terms of compiling with dmd, Linux got 64-bit 
compilation (when you use -m64) with the latest release, but there are a number 
of things which will need to be sorted out before dmd will be able to compile 
64-bit programs on Windows (including having a 64-bit linker).

- Jonathan M Davis


Re: Win7 64-bit

2011-03-06 Thread Stewart Gordon

On 01/03/2011 23:19, Dan McLeran wrote:

never mind, i got it. i had to pass the switches:

-D -unittest -cov

life is hard. it's even harder when you're dumb.


Would you care to enlighten the rest of us on what code you were using that requires those 
extra switches?


Stewart.


Re: Win7 64-bit

2011-03-06 Thread Jonathan M Davis
On Sunday 06 March 2011 17:48:12 Stewart Gordon wrote:
 On 01/03/2011 23:19, Dan McLeran wrote:
  never mind, i got it. i had to pass the switches:
  
  -D -unittest -cov
  
  life is hard. it's even harder when you're dumb.
 
 Would you care to enlighten the rest of us on what code you were using that
 requires those extra switches?

Yeah. That's weird. If you want to run the unit tests, you use -unittest. If 
you 
want code coverage, you use -unittest and -cov. If you want documentation, you 
use -D, but it has no relation to -unittest and -cov, and it isn't necessarily 
a 
good idea to build your code with -D normally because of the effects that 
version(D_Ddoc) could have on your code, and there are a number places in 
druntime and Phobos which won't result in valid code if you build with -D  
(until it's fixed in the next release so that druntime and Phobos' 
documentation 
is versioned with version(StdDoc) instead). So, _needing_ all three of those 
flags seems just plain wrong.

If you're using -cov, you probably want -unittest, but -D has no relation to 
the 
others and shouldn't be necessary for _anything_ other than generating 
documentation.

- Jonathan M Davis


Win7 64-bit

2011-03-01 Thread Dan McLeran
I am running the dmd2 compiler on my Win7 64 bit machine and everything
appears to work except the -cov switch. i cannot seem to generate a .lst file.
any ideas?

thanks

dan mcleran


Re: Win7 64-bit

2011-03-01 Thread Dan McLeran
never mind, i got it. i had to pass the switches:

-D -unittest -cov

life is hard. it's even harder when you're dumb.