Unittest in a windows app
    Dan Nestor via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Sat Dec 20 04:53:56 PST 2014
    
    
  
I managed to isolate the problem to the following. Program 1 
below works (displays unit test failure when run), while program 
2 does not.
***** Program 1 *****
import std.stdio;
unittest
{
     assert(false);
}
void main()
{
     writeln("Hello D-World!");
}
***** Program 2 *****
module winmain;
import core.sys.windows.windows;
unittest {
     assert(false);
}
extern (Windows)
int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR
lpCmdLine, int nCmdShow)
{
     return 0;
}
    
    
More information about the Digitalmars-d-learn
mailing list