|
1 /* |
|
2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Responsible for logging tests results to one or more files. |
|
15 * |
|
16 * CCopyright © 2007 Nokia. All rights reserved. |
|
17 * This material, including documentation and any related computer |
|
18 * programs, is protected by copyright controlled by Nokia. All |
|
19 * rights are reserved. Copying, including reproducing, storing, |
|
20 * adapting or translating, any or all of this material requires the |
|
21 * prior written consent of Nokia. This material also contains |
|
22 * confidential information which may not be disclosed to others |
|
23 * without the prior written consent of Nokia. |
|
24 * |
|
25 * |
|
26 */ |
|
27 |
|
28 |
|
29 #ifndef CAMLOGGER_H |
|
30 #define CAMLOGGER_H |
|
31 |
|
32 // INCLUDES |
|
33 #include <e32base.h> |
|
34 |
|
35 // CONSTANTS |
|
36 #ifdef CAMERAAPP_LOGGING |
|
37 enum TTestFileType { ETestFileFailed, ETestFilePassed, ETestFileLog }; |
|
38 #endif |
|
39 |
|
40 // FORWARD DECLARATIONS |
|
41 |
|
42 // CLASS DECLARATION |
|
43 |
|
44 #ifndef CAMERAAPP_LOGGING |
|
45 |
|
46 // Add dummy file Identifiers here, for non test mode. One for each unit test. |
|
47 #define CONTAINERUNITTESTLOGID |
|
48 #define TIMERUNITTESTLOGID |
|
49 #define UTILITY_UNIT_TESTS_LOG_ID |
|
50 #define NAVICOUNTERUNITTESTLOGID |
|
51 #define NAVIPROGRESSUNITTESTLOGID |
|
52 #define FRAMEWORKUNITTESTLOGID |
|
53 #define CONTROLLERUNITTESTLOGID |
|
54 #define VIEWSUNITTESTLOGID |
|
55 #define CAPTURESETUPUNITTESTLOGID |
|
56 #define SIDEPANEUNITTESTLOGID |
|
57 #define CAPTURESETUPMENUUNITTESTLOGID |
|
58 #define BURSTARRAYUNITTESTLOGID |
|
59 #define BURSTCAPTUREUNITTESTLOGID |
|
60 #define SETTINGSLISTSUNITTESTLOGID |
|
61 #define UNITTESTUSERSCENESETUPLOGID |
|
62 #define UNITTESTUTILITYLOGID |
|
63 #define GENERALUNITTESTLOGID |
|
64 |
|
65 #define CAM_LOG_DUMMYINITIALISELOGS( a, b ) |
|
66 #define CAM_LOG_INITIALISELOGS( a ) |
|
67 #define CAM_LOG_LOGHEADER( a, b ) |
|
68 #define CAM_LOG_LOGTESTRESULT( a, b, c ) |
|
69 #define CAM_LOG_LOGDETAIL( a, b, c, d ) |
|
70 |
|
71 |
|
72 /** |
|
73 * Class that does nothing. To be used in non-test mode. |
|
74 */ |
|
75 |
|
76 #else |
|
77 |
|
78 enum TTestResult |
|
79 { |
|
80 UTStarted, |
|
81 UTFinished, |
|
82 UTFailed, |
|
83 UTNumberOfTests, |
|
84 UTAllTestsFinished |
|
85 }; |
|
86 |
|
87 // Add file Identifiers here, for test code. One for each unit test. |
|
88 #define TIMERUNITTESTLOGID _L("CamTimer Unit Tests ") |
|
89 #define UTILITY_UNIT_TESTS_LOG_ID _L("CamUtility Unit Tests ") |
|
90 #define NAVICOUNTERUNITTESTLOGID _L("CamNaviCounter Unit Tests ") |
|
91 #define NAVIPROGRESSUNITTESTLOGID _L("CamNaviProgressBar Unit Tests ") |
|
92 #define FRAMEWORKUNITTESTLOGID _L("Framework Unit Tests ") |
|
93 |
|
94 #define CONTROLLERUNITTESTLOGID _L("Controller Unit Tests ") |
|
95 #define CONTAINERUNITTESTLOGID _L("Container Unit Tests ") |
|
96 |
|
97 #define SELFTIMERUNITTESTLOGID _L("Self Timer Unit Tests ") |
|
98 #define BURSTARRAYUNITTESTLOGID _L("Burst Array Unit Tests ") |
|
99 #define BURSTGRIDUNITTESTLOGID _L("Burst Grid Unit Tests ") |
|
100 #define ZOOMPANEUNITTESTLOGID _L("Zoom Pane Unit Tests ") |
|
101 #define SETTINGSLISTSUNITTESTLOGID _L("Settings Lists Units Tests ") |
|
102 |
|
103 #define VIEWSUNITTESTLOGID _L("Views Unit Tests ") |
|
104 #define SETTINGSMODELUNITTESTLOGID _L("Settings Model Unit Tests") |
|
105 #define CAPTURESETUPUNITTESTLOGID _L("Capture Setup Unit Tests") |
|
106 #define CAPTURESETUPMENUUNITTESTLOGID _L("Capture Setup Menu Unit Tests") |
|
107 #define SIDEPANEUNITTESTLOGID _L("Side Pane Unit Tests") |
|
108 #define BURSTCAPTUREUNITTESTLOGID _L("Burst Capture Unit Tests ") |
|
109 #define UNITTESTUSERSCENESETUPLOGID _L("Unit Test User Scene Setup Unit Tests ") |
|
110 #define UNITTESTUTILITYLOGID _L("Unit Test Utility Unit Tests ") |
|
111 |
|
112 |
|
113 #define GENERALUNITTESTLOGID _L("General Unit Tests ") |
|
114 |
|
115 |
|
116 #define CAM_LOG_DUMMYINITIALISELOGS( a, b ) CamLogger::InitialiseLogsL( a, b ) |
|
117 #define CAM_LOG_INITIALISELOGS( a ) CamLogger::InitialiseLogsL( a ) |
|
118 #define CAM_LOG_LOGHEADER( a, b ) CamLogger::LogHeader( a, b ) |
|
119 #define CAM_LOG_LOGTESTRESULT( a, b, c ) CamLogger::LogTestResult( a, b, c ) |
|
120 #define CAM_LOG_LOGDETAIL( a, b, c, d ) CamLogger::LogDetail( GENERALUNITTESTLOGID, a, b, c, d ) |
|
121 |
|
122 #endif // __CAM_TEST_MODE__ |
|
123 |
|
124 |
|
125 #endif // CAMLOGGER_H |
|
126 |
|
127 // End of File |