Use =default for skeleton copy constructor
[ACE_TAO.git] / ACE / tests / Bug_1576_Regression_Test.cpp
blob23239ea2f4f639c49c9fa81386c4290ab30ea152
1 /**
2 * @file Bug_1576_Regression_Test.cpp
4 * Reproduces the problems reported in bug 1576:
5 * http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=1576
7 * @author Carlos O'Ryan <coryan@atdesk.com>
8 */
10 #include "test_config.h"
11 #include "ace/DLL.h"
13 int
14 run_main (int, ACE_TCHAR *[])
16 ACE_START_TEST (ACE_TEXT ("Bug_1576_Regression_Test"));
18 ACE_DLL dll;
20 const ACE_TCHAR * dll_name = ACE_TEXT ("NOT_A_DLL") ACE_DLL_SUFFIX;
22 // Normally applications should check the return value, but if they
23 // ignore it...
24 int result = dll.open (dll_name);
26 if(result == -1)
28 // Use dll.error() is you want to get the error text, but we don't this in
29 // this test because else the error is shown on the scoreboard
30 ACE_DEBUG ((LM_DEBUG,
31 ACE_TEXT ("Load failed, as expected\n")));
33 else
35 ACE_ERROR((LM_ERROR,
36 ACE_TEXT ("Success loading %s ? It should have failed!\n"),
37 dll_name));
40 // ... and then use the DLL library, the program crashes (instead of
41 // just getting an error ...
42 void * symbol = dll.symbol (ACE_TEXT ("SHOULD_CRASH"));
44 if(symbol == 0)
46 // Use dll.error() is you want to get the error text, but we don't this in
47 // this test because else the error is shown on the scoreboard
48 ACE_DEBUG((LM_DEBUG,
49 ACE_TEXT ("Symbol lookup failed, as expected\n")));
51 else
53 ACE_ERROR ((LM_ERROR,
54 ACE_TEXT ("Found symbol ? It should have failed!\n")));
57 ACE_END_TEST;
59 return 0;