First public contribution.
2 * Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * Test object for ASN1 generalized time objects
20 #ifndef __TESTGENERALIZEDTIME_H__
21 #define __TESTGENERALIZEDTIME_H__
24 _LIT(KEncoder, "Encoder");
25 _LIT(KNoEncoder, "NoEncoder");
27 class CTestGeneralizedTime : public CTestBase
30 static CTestGeneralizedTime* NewL(CASN1NormalTest &aASN1Action);
32 // Overridden from CTestBase
33 void GetName(TDes& aBuf);
34 TBool PerformTestsL(CConsoleBase& aConsole);
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);
44 static void OutputTime(CConsoleBase& aConsole, const TTime& aTime);
46 TBool ValidateOutcome(CConsoleBase& aConsole, const TTime& originalTime, const TTime& decodedTime, const TInt &aTestNumber,
47 const TInt &aTotalTests);