Use =default for skeleton copy constructor
[ACE_TAO.git] / ACE / examples / Export / test.cpp
bloba170b307518d5ed59d0394570203a4d7277cfa27
1 #include "dll.h"
2 #include <ace/streams.h>
4 int
5 ACE_TMAIN (int, ACE_TCHAR *[])
7 int failure_count = 0;
8 test_class my_test_class;
10 // Tet out the export of a class. I don't see
11 // How this can fail at runtime (rather it would
12 // probably give link errors), but just in case...
14 cout << "Method Test: ";
15 if (my_test_class.method () != RETVAL)
17 cout << "Failed" << endl;
18 ++failure_count;
20 else
21 cout << "Succeeded" << endl;
23 // Test out the export of a function. Like above,
24 // I don't know how this can fail at runtime.
26 cout << "Function Test: ";
27 if (test_function () != RETVAL)
29 cout << "Failed" << endl;
30 ++failure_count;
32 else
33 cout << "Succeeded" << endl;
35 // Also test out the export of data.
37 cout << "Variable Test: ";
38 if (test_variable != RETVAL)
40 cout << "Failed" << endl;
41 ++failure_count;
43 else
44 cout << "Succeeded" << endl;
47 // Test out the ACE_Singleton export by checking to see
48 // that we have the same instance pointer as the DLL does.
49 // This can fail at runtime.
51 cout << "Singleton Test: ";
52 if (TEST_SINGLETON::instance () != get_dll_singleton ())
54 cout << "Failed" << endl;
55 ++failure_count;
57 else
58 cout << "Succeeded" << endl;
60 // Return the number of failures
61 return failure_count;