|
1 /* |
|
2 * Copyright (c) 2001-2009 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 the License "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: |
|
15 * Test object for ASN1 generalized time objects |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __TESTGENERALIZEDTIME_H__ |
|
21 #define __TESTGENERALIZEDTIME_H__ |
|
22 |
|
23 #include "testbase.h" |
|
24 _LIT(KEncoder, "Encoder"); |
|
25 _LIT(KNoEncoder, "NoEncoder"); |
|
26 |
|
27 class CTestGeneralizedTime : public CTestBase |
|
28 { |
|
29 public: |
|
30 static CTestGeneralizedTime* NewL(CASN1NormalTest &aASN1Action); |
|
31 |
|
32 // Overridden from CTestBase |
|
33 void GetName(TDes& aBuf); |
|
34 TBool PerformTestsL(CConsoleBase& aConsole); |
|
35 |
|
36 private: |
|
37 CTestGeneralizedTime(CASN1NormalTest &aASN1Action); |
|
38 TBool PerformTestWithEncoderL(CConsoleBase& aConsole, const TTime &aTest, const TInt &aTestNumber, |
|
39 const TInt &aTotalTests); |
|
40 TBool PerformTestWithoutEncoderL(CConsoleBase& aConsole, const TTime &aTest, const TInt &aTestNumber, |
|
41 const TInt &aTotalTests, const TDesC& fraction = KNullDesC, const TDesC& offset = KNullDesC ); |
|
42 void FillParameterArray(void); |
|
43 |
|
44 static void OutputTime(CConsoleBase& aConsole, const TTime& aTime); |
|
45 |
|
46 TBool ValidateOutcome(CConsoleBase& aConsole, const TTime& originalTime, const TTime& decodedTime, const TInt &aTestNumber, |
|
47 const TInt &aTotalTests); |
|
48 |
|
49 }; |
|
50 |
|
51 #endif |