Use override/default for RTPortableServer
[ACE_TAO.git] / ACE / tests / Compiler_Features_26_Test.cpp
blob46445558a239a722f50320e6c19e6e1e58fd53a5
1 /**
2 * This program checks if the compiler doesn't have a certain bug
3 * that we encountered when testing C++11 features
4 */
6 #include "test_config.h"
8 #include <memory>
10 int
11 run_main (int, ACE_TCHAR *[])
13 ACE_START_TEST (ACE_TEXT("Compiler_Features_26_Test"));
15 int retval = 0;
16 std::shared_ptr<int> a,b,c,d;
18 a = std::make_shared<int> (10);
19 b = std::make_shared<int> (10);
20 c = b;
22 if (!(a!=b) || (a==b))
24 ACE_ERROR ((LM_ERROR,
25 ACE_TEXT ("Problem using a!=b\n")));
26 ++retval;
28 if (!(b==c) || (b!=c))
30 ACE_ERROR ((LM_ERROR,
31 ACE_TEXT ("Problem using b==c\n")));
32 ++retval;
34 if ((c==d) || !(d!=c))
36 ACE_ERROR ((LM_ERROR,
37 ACE_TEXT ("Problem using b==c\n")));
38 ++retval;
40 if ((a==nullptr) || !(a!=nullptr))
42 ACE_ERROR ((LM_ERROR,
43 ACE_TEXT ("Problem using a==nullptr\n")));
44 ++retval;
46 if ((b==nullptr) || !(b!=nullptr))
48 ACE_ERROR ((LM_ERROR,
49 ACE_TEXT ("Problem using b==nullptr\n")));
50 ++retval;
52 if ((c==nullptr) || !(c!=nullptr))
54 ACE_ERROR ((LM_ERROR,
55 ACE_TEXT ("Problem using c==nullptr\n")));
56 ++retval;
58 if ((d!=nullptr) || !(d==nullptr))
60 ACE_ERROR ((LM_ERROR,
61 ACE_TEXT ("Problem using d!=nullptr\n")));
62 ++retval;
65 if (retval == 0)
67 ACE_DEBUG ((LM_INFO,
68 ACE_TEXT ("Compiler Feature 26 Test does compile and run.\n")));
71 ACE_END_TEST;
73 return retval;