www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - unittests and Windows App

reply "ref2401" <refactor24 gmail.com> writes:
I'm using D 2064.2 and VisualD 0.3.37
VisualD "Redirect stdout to output window" checkbox is checked.

In simple ConsoleApp unittests work properly. I can debug them 
and assertion fail results are printed to the Output window.

But it seems that unittests don't work at all with any 
WindowsApp. It's impossible to debug and no assertion fail 
messages are printed to the Output windows.
Dec 19 2013
next sibling parent "evilrat" <evilrat666 gmail.com> writes:
On Thursday, 19 December 2013 at 13:55:41 UTC, ref2401 wrote:
 I'm using D 2064.2 and VisualD 0.3.37
 VisualD "Redirect stdout to output window" checkbox is checked.

 In simple ConsoleApp unittests work properly. I can debug them 
 and assertion fail results are printed to the Output window.

 But it seems that unittests don't work at all with any 
 WindowsApp. It's impossible to debug and no assertion fail 
 messages are printed to the Output windows.
OutputDebugStringA/OutputDebugStringW[1] WinAPI function should work within visual studio. [1] http://msdn.microsoft.com/en-us/library/aa363362(VS.85).aspx
Dec 19 2013
prev sibling parent Rainer Schuetze <r.sagitario gmx.de> writes:
On 19.12.2013 14:55, ref2401 wrote:
 I'm using D 2064.2 and VisualD 0.3.37
 VisualD "Redirect stdout to output window" checkbox is checked.

 In simple ConsoleApp unittests work properly. I can debug them and
 assertion fail results are printed to the Output window.

 But it seems that unittests don't work at all with any WindowsApp. It's
 impossible to debug and no assertion fail messages are printed to the
 Output windows.
I think there was a recent change that Runtime.initialize would no longer run the unit tests, so you have to call runModuleUnitTests() yourself from within WinMain.
Dec 20 2013