2 * @file Bug_3673_Regression_Test.cpp
4 * Reproduces the problems reported in bug 3673
5 * http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=3673
8 #include "test_config.h"
10 #include "ace/OS_NS_stdio.h"
12 static bool construct_alpha
= false;
13 static bool destruct_alpha
= false;
14 static bool construct_beta
= false;
15 static bool destruct_beta
= false;
20 Alpha() { ACE_DEBUG ((LM_DEBUG
, ACE_TEXT("construct alpha\n"))); construct_alpha
= true;}
21 ~Alpha() { ACE_DEBUG ((LM_DEBUG
, ACE_TEXT("destruct alpha\n"))); destruct_alpha
= true;}
26 Beta() { ACE_DEBUG ((LM_DEBUG
, ACE_TEXT("construct beta\n"))); construct_beta
= true;}
27 ~Beta() { ACE_DEBUG ((LM_DEBUG
, ACE_TEXT("destruct bepha\n"))); destruct_beta
= true;}
35 Test() { ACE_DEBUG ((LM_DEBUG
, ACE_TEXT("throw oops\n"))); throw "oops"; }
39 run_main (int, ACE_TCHAR
*[])
41 ACE_START_TEST (ACE_TEXT ("Bug_3673_Regression_Test"));
44 bool caught_excep
= false;
51 ACE_DEBUG ((LM_DEBUG
, ACE_TEXT ("Caught exception!\n")));
57 ACE_ERROR ((LM_ERROR
, ACE_TEXT ("Not caught exception\n")));
62 ACE_ERROR ((LM_ERROR
, ACE_TEXT ("Constructor alpha not called\n")));
67 ACE_ERROR ((LM_ERROR
, ACE_TEXT ("Constructor beta not called\n")));
72 ACE_ERROR ((LM_ERROR
, ACE_TEXT ("Destructor alpha not called\n")));
77 ACE_ERROR ((LM_ERROR
, ACE_TEXT ("Destructor beta not called\n")));