|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // UTrace Unit Tests. |
|
15 // Created: 15/05/2009 |
|
16 // |
|
17 |
|
18 |
|
19 |
|
20 /** |
|
21 @file te_macrostest.h |
|
22 @internalTechnology |
|
23 @prototype |
|
24 */ |
|
25 |
|
26 #ifndef __TE_MACROSTEST_H__ |
|
27 #define __TE_MACROSTEST_H__ |
|
28 |
|
29 #include <TestExecuteStepBase.h> |
|
30 #include "te_suite_step_base.h" |
|
31 |
|
32 _LIT(KOstMacrosEnabledStep, "COstMacrosEnabledStep"); |
|
33 const TInt KTraceIds = 20; |
|
34 #define MyTestGroupId 130 |
|
35 #define MyTestTraceId 8519680 |
|
36 |
|
37 #define MyTestTraceId1 MyTestTraceId |
|
38 #define MyTestTraceId2 MyTestTraceId |
|
39 #define MyTestTraceId3 MyTestTraceId |
|
40 #define MyTestTraceId4 MyTestTraceId |
|
41 #define MyTestTraceId5 MyTestTraceId |
|
42 #define MyTestTraceId6 MyTestTraceId |
|
43 #define MyTestTraceId7 MyTestTraceId |
|
44 #define MyTestTraceId8 MyTestTraceId |
|
45 #define MyTestTraceId9 MyTestTraceId |
|
46 #define MyTestTraceId10 MyTestTraceId |
|
47 #define MyTestTraceId11 MyTestTraceId |
|
48 #define MyTestTraceId12 MyTestTraceId |
|
49 #define MyTestTraceId13 MyTestTraceId |
|
50 #define MyTestTraceId14 MyTestTraceId |
|
51 #define MyTestTraceId15 MyTestTraceId |
|
52 #define MyTestTraceId16 MyTestTraceId |
|
53 #define MyTestTraceId17 MyTestTraceId |
|
54 #define MyTestTraceId18 MyTestTraceId |
|
55 #define MyTestTraceId19 MyTestTraceId |
|
56 #define MyTestTraceId20 MyTestTraceId |
|
57 #define MyTestTraceId21 MyTestTraceId |
|
58 #define MyTestTraceId22 MyTestTraceId |
|
59 #define MyTestTraceId23 MyTestTraceId |
|
60 #define MyTestTraceId24 MyTestTraceId |
|
61 #define MyTestTraceId25 MyTestTraceId |
|
62 #define MyTestTraceId26 MyTestTraceId |
|
63 #define MyTestTraceId27 MyTestTraceId, aParamForOstTraceFunctionEntryExt |
|
64 _LIT(KDefaultTraceText, "Test Trace"); |
|
65 _LIT8(KDefaultTraceText8, "Test trace"); |
|
66 |
|
67 |
|
68 class COstMacrosEnabledStep : public CTe_UTraceSuiteStepBase |
|
69 { |
|
70 public: |
|
71 // Constructor and destructor |
|
72 COstMacrosEnabledStep(); |
|
73 ~COstMacrosEnabledStep(); |
|
74 |
|
75 //from CTe_ULoggerMCLSuiteStepBase |
|
76 virtual TVerdict doTestStepPreambleL(); |
|
77 virtual TVerdict doTestStepL(); |
|
78 virtual TVerdict doTestStepPostambleL(); |
|
79 |
|
80 //testing methods |
|
81 virtual TInt TraceContentTestL(TUint32 aTraceId, TBool aCheckParam1, TBool aCheckBigData, TInt aGenFuncNum=0); |
|
82 |
|
83 //data |
|
84 protected: |
|
85 RBTrace iBtrace; |
|
86 TUint32 iParams[5]; |
|
87 TBuf8<32> iTraceDataLong; |
|
88 |
|
89 private: |
|
90 template<typename T> T ReadTypeFromBuffer(const TUint8* aData, TInt& aOffset); |
|
91 TInt BasicMacroTestL(const TInt8 aParamForOstTraceFunctionEntryExt=0); |
|
92 TUint32 ExtractId(TUint32 aId, TInt8 aParamForOstTraceFunctionEntryExt); |
|
93 TInt8 ExtractFunctionParameter(TUint32 aId, TInt8 aParamForOstTraceFunctionEntryExt); |
|
94 }; |
|
95 |
|
96 #endif |
|
97 |
|
98 |