First public contribution.
1 // Copyright (c) 2002-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Class CWSPDecodeTest
18 #ifndef __CWSPDECODETEST_H__
19 #define __CWSPDECODETEST_H__
23 #include "IpuTestUtils.h"
24 #include "ctestbase.h"
25 #include <wspdecoder.h>
27 class CWSPDecodeTest: public CTestBase
30 static CWSPDecodeTest* NewLC(CIpuTestHarness* aTestHarness);
35 CWSPDecodeTest(CIpuTestHarness* aTestHarness);
39 TBool VarType(TPtrC8 aBuf, TWspPrimitiveDecoder::TWspHeaderType aShouldBeType);
41 void LengthValsTestL();
42 void TestLengthValsL();
43 TBool LenVal(TPtrC8 aBuf, TInt aShouldBeVal);
47 TBool String(TPtrC8 aBuf, TPtrC8 aShouldBe, TInt aErr = KErrNone);
51 TBool Token(TPtrC8 aBuf, TUint8 aShouldBe, TInt aErr= KErrNone);
55 TBool Integer(TPtrC8 aBuf, TUint32 aShouldBe, TInt aErr = KErrNone);
59 TBool LongInt(TPtrC8 aBuf, TUint32 aShouldBe, TInt aErr = KErrNone);
63 TBool UintVar(TPtrC8 aBuf, TUint32 aShouldBe, TInt aErr = KErrNone);
67 TBool VersionL(RStringPool aPool, TPtrC8 aBuf, TPtrC8 aShouldBe, TInt aErr = KErrNone);
71 TBool Date(TPtrC8 aBuf, TTime aShouldBe, TInt aErr = KErrNone);
73 void SegmenterTestL();
74 void TestSegmenterL();
75 TInt SegmenterCommonL(RStringPool aPool, TPtrC8 aHdr);
76 TBool SegmenterL(RStringPool aPool, TPtrC8 aHdr);
77 TBool SegmenterExpectCorruptL(RStringPool aPool, TPtrC8 aHdr);
80 CIpuTestHarness* iTestHarness;
85 #endif // __CWSPDECODETEST_H__