2 * @file Bug_2497_Regression_Test.cpp
4 * Reproduces the problems reported in bug 2497
5 * http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=2497
7 * @author sergant128@mail.ru
10 #include "test_config.h"
11 #include "ace/Module.h"
13 #include "ace/Stream.h"
15 class Test_Task
: public ACE_Task
<ACE_SYNCH
>
23 ~Test_Task( ) override
26 if (_destructorCalled
> 1)
28 ACE_TEXT ("Test_Task::~Test_Task() should be called once!!!\n")));
32 int _destructorCalled
;
36 class Test_Module
: public ACE_Module
<ACE_SYNCH
>
41 this->open( ACE_TEXT("Test module"),
49 Test_Task _writerTask
, _readerTask
;
54 run_main (int, ACE_TCHAR
*[])
56 ACE_START_TEST (ACE_TEXT ("Bug_2497_Regression_Test"));
58 ACE_Stream
<ACE_SYNCH
> stream
;
60 if (stream
.push(new Test_Module()) == -1)
63 ACE_TEXT ("Error: push failed\n")));