Unittest in a windows app

Rainer Schuetze via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Dec 20 09:16:28 PST 2014



On 19.12.2014 22:39, Dan Nestor wrote:
> Hello everybody, this is my first post on this forum.
>
> I have a question about unit testing a Windows application. I
> have slightly modified Visual D's default Windows application
> stub to the following:
>
[...]
>      try
>      {
>          Runtime.initialize();

Runtime.initialize() no longer calls the unittests since a few versions. 
You have to call runModuleUnitTests() explicitely, e.g.

       try
       {
           Runtime.initialize();
           if (runModuleUnittests())
		result = myWinMain(hInstance, hPrevInstance, lpCmdLine,
			           nCmdShow);
           Runtime.terminate();
       }...


More information about the Digitalmars-d-learn mailing list