sl@0: // Copyright (c) 2002-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 "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: // Class CWSPDecodeTest sl@0: // sl@0: // sl@0: sl@0: #ifndef __CWSPDECODETEST_H__ sl@0: #define __CWSPDECODETEST_H__ sl@0: sl@0: #include sl@0: sl@0: #include "IpuTestUtils.h" sl@0: #include "ctestbase.h" sl@0: #include sl@0: sl@0: class CWSPDecodeTest: public CTestBase sl@0: { sl@0: public: sl@0: static CWSPDecodeTest* NewLC(CIpuTestHarness* aTestHarness); sl@0: ~CWSPDecodeTest(); sl@0: void DoTestsL(); sl@0: sl@0: private: sl@0: CWSPDecodeTest(CIpuTestHarness* aTestHarness); sl@0: sl@0: void VarTypesTestL(); sl@0: void TestVarTypesL(); sl@0: TBool VarType(TPtrC8 aBuf, TWspPrimitiveDecoder::TWspHeaderType aShouldBeType); sl@0: sl@0: void LengthValsTestL(); sl@0: void TestLengthValsL(); sl@0: TBool LenVal(TPtrC8 aBuf, TInt aShouldBeVal); sl@0: sl@0: void StringTestL(); sl@0: void TestStringL(); sl@0: TBool String(TPtrC8 aBuf, TPtrC8 aShouldBe, TInt aErr = KErrNone); sl@0: sl@0: void TokensTestL(); sl@0: void TestTokensL(); sl@0: TBool Token(TPtrC8 aBuf, TUint8 aShouldBe, TInt aErr= KErrNone); sl@0: sl@0: void IntegersTestL(); sl@0: void TestIntegersL(); sl@0: TBool Integer(TPtrC8 aBuf, TUint32 aShouldBe, TInt aErr = KErrNone); sl@0: sl@0: void LongIntTestL(); sl@0: void TestLongIntL(); sl@0: TBool LongInt(TPtrC8 aBuf, TUint32 aShouldBe, TInt aErr = KErrNone); sl@0: sl@0: void UintVarsTestL(); sl@0: void TestUintVarsL(); sl@0: TBool UintVar(TPtrC8 aBuf, TUint32 aShouldBe, TInt aErr = KErrNone); sl@0: sl@0: void VersionTestL(); sl@0: void TestVersionL(); sl@0: TBool VersionL(RStringPool aPool, TPtrC8 aBuf, TPtrC8 aShouldBe, TInt aErr = KErrNone); sl@0: sl@0: void DateTestL(); sl@0: void TestDateL(); sl@0: TBool Date(TPtrC8 aBuf, TTime aShouldBe, TInt aErr = KErrNone); sl@0: sl@0: void SegmenterTestL(); sl@0: void TestSegmenterL(); sl@0: TInt SegmenterCommonL(RStringPool aPool, TPtrC8 aHdr); sl@0: TBool SegmenterL(RStringPool aPool, TPtrC8 aHdr); sl@0: TBool SegmenterExpectCorruptL(RStringPool aPool, TPtrC8 aHdr); sl@0: sl@0: private: sl@0: CIpuTestHarness* iTestHarness; sl@0: }; sl@0: sl@0: sl@0: sl@0: #endif // __CWSPDECODETEST_H__