1 #include "Basic_Log_Test.h"
2 #include "ace/Log_Msg.h"
3 #include "ace/OS_main.h"
6 ACE_TMAIN (int argc
, ACE_TCHAR
*argv
[])
8 BasicLog_Test log_test
;
10 ACE_DEBUG((LM_DEBUG
, "\nBasic Log test \n\n"));
14 if (log_test
.init(argc
, argv
) == -1)
16 ACE_ERROR_RETURN((LM_ERROR
,
17 "xx - Failed initializing BasicLog_Test.\n"),
21 // We may want to replace this with a run on the BasicLog_Test.
22 // If we cannot create a log, there is no use continuing.
23 // Create a log with max size (octets) of 1000.
24 if (log_test
.test_CreateLog(1000) == -1)
26 ACE_ERROR_RETURN((LM_ERROR
,
27 "xx - Failed creating log and bailing out.\n"),
33 "** - The creating log test succeeded.\n\n"));
36 // go easy until this works
37 //@@ use ACE_U64_TO_U32 to convert ULongLong to ULong
38 //in call to test_retrieval
39 /* if (log_test.test_retrieval(10) == -1)
41 ACE_DEBUG((LM_ERROR,"The test of retrieval failed.\n"));
45 ACE_DEBUG((LM_ERROR,"The test of retrieval succeeded.\n"));
48 if (log_test
.test_log_destroy() == -1)
50 ACE_ERROR_RETURN((LM_ERROR
,
51 "xx - Failed destroying log.\n\n"),
57 "** - The destroying log test succeeded.\n\n"));
60 if (log_test
.test_CreateLog(1000) == -1)
62 ACE_ERROR_RETURN((LM_ERROR
,
63 "xx - Failed creating log and bailing out.\n\n"),
67 if (log_test
.test_capacity_alarm_threshold() == -1)
69 ACE_ERROR((LM_ERROR
,"xx - The capacity alarm threshold test failed.\n\n"));
73 ACE_DEBUG((LM_DEBUG
,"** - The capacity alarm threshold test succeeded.\n\n"));
76 if (log_test
.test_LogAction() == -1)
78 ACE_ERROR((LM_ERROR
,"xx - The log action test failed.\n\n"));
82 ACE_DEBUG((LM_DEBUG
,"** - The log action test succeeded.\n\n"));
85 if (log_test
.test_adminState() == -1)
87 ACE_ERROR((LM_ERROR
,"xx - The administration test failed.\n\n"));
91 ACE_DEBUG((LM_DEBUG
,"** - The administration test succeeded.\n\n"));
94 if (log_test
.test_logSize() == -1)
96 ACE_ERROR((LM_ERROR
,"xx - The log size test failed.\n\n"));
100 ACE_DEBUG((LM_DEBUG
,"** - The log size test succeeded.\n\n"));
103 /* if (log_test.test_logCompaction(30) == -1)
105 ACE_DEBUG((LM_ERROR,"xx - The test of log compaction failed.\n\n"));
109 ACE_DEBUG((LM_ERROR,"** - The test of log compaction succeeded.\n\n"));
113 if (log_test
.test_week_mask() == -1)
115 ACE_ERROR((LM_ERROR
,"xx - The week mask test failed.\n\n"));
119 ACE_DEBUG((LM_DEBUG
,"** - The week mask test succeeded.\n\n"));
122 catch (const ::CORBA::Exception
&e
)
124 e
._tao_print_exception("Caught CORBA exception");