sl@0: /* sl@0: * Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * Test object for ASN1 generalized time objects sl@0: * sl@0: */ sl@0: sl@0: sl@0: #ifndef __TESTGENERALIZEDTIME_H__ sl@0: #define __TESTGENERALIZEDTIME_H__ sl@0: sl@0: #include "testbase.h" sl@0: _LIT(KEncoder, "Encoder"); sl@0: _LIT(KNoEncoder, "NoEncoder"); sl@0: sl@0: class CTestGeneralizedTime : public CTestBase sl@0: { sl@0: public: sl@0: static CTestGeneralizedTime* NewL(CASN1NormalTest &aASN1Action); sl@0: sl@0: // Overridden from CTestBase sl@0: void GetName(TDes& aBuf); sl@0: TBool PerformTestsL(CConsoleBase& aConsole); sl@0: sl@0: private: sl@0: CTestGeneralizedTime(CASN1NormalTest &aASN1Action); sl@0: TBool PerformTestWithEncoderL(CConsoleBase& aConsole, const TTime &aTest, const TInt &aTestNumber, sl@0: const TInt &aTotalTests); sl@0: TBool PerformTestWithoutEncoderL(CConsoleBase& aConsole, const TTime &aTest, const TInt &aTestNumber, sl@0: const TInt &aTotalTests, const TDesC& fraction = KNullDesC, const TDesC& offset = KNullDesC ); sl@0: void FillParameterArray(void); sl@0: sl@0: static void OutputTime(CConsoleBase& aConsole, const TTime& aTime); sl@0: sl@0: TBool ValidateOutcome(CConsoleBase& aConsole, const TTime& originalTime, const TTime& decodedTime, const TInt &aTestNumber, sl@0: const TInt &aTotalTests); sl@0: sl@0: }; sl@0: sl@0: #endif sl@0: