sl@0
|
1 |
// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// Class CWSPDecodeTest
|
sl@0
|
15 |
//
|
sl@0
|
16 |
//
|
sl@0
|
17 |
|
sl@0
|
18 |
#ifndef __CWSPDECODETEST_H__
|
sl@0
|
19 |
#define __CWSPDECODETEST_H__
|
sl@0
|
20 |
|
sl@0
|
21 |
#include <e32base.h>
|
sl@0
|
22 |
|
sl@0
|
23 |
#include "IpuTestUtils.h"
|
sl@0
|
24 |
#include "ctestbase.h"
|
sl@0
|
25 |
#include <wspdecoder.h>
|
sl@0
|
26 |
|
sl@0
|
27 |
class CWSPDecodeTest: public CTestBase
|
sl@0
|
28 |
{
|
sl@0
|
29 |
public:
|
sl@0
|
30 |
static CWSPDecodeTest* NewLC(CIpuTestHarness* aTestHarness);
|
sl@0
|
31 |
~CWSPDecodeTest();
|
sl@0
|
32 |
void DoTestsL();
|
sl@0
|
33 |
|
sl@0
|
34 |
private:
|
sl@0
|
35 |
CWSPDecodeTest(CIpuTestHarness* aTestHarness);
|
sl@0
|
36 |
|
sl@0
|
37 |
void VarTypesTestL();
|
sl@0
|
38 |
void TestVarTypesL();
|
sl@0
|
39 |
TBool VarType(TPtrC8 aBuf, TWspPrimitiveDecoder::TWspHeaderType aShouldBeType);
|
sl@0
|
40 |
|
sl@0
|
41 |
void LengthValsTestL();
|
sl@0
|
42 |
void TestLengthValsL();
|
sl@0
|
43 |
TBool LenVal(TPtrC8 aBuf, TInt aShouldBeVal);
|
sl@0
|
44 |
|
sl@0
|
45 |
void StringTestL();
|
sl@0
|
46 |
void TestStringL();
|
sl@0
|
47 |
TBool String(TPtrC8 aBuf, TPtrC8 aShouldBe, TInt aErr = KErrNone);
|
sl@0
|
48 |
|
sl@0
|
49 |
void TokensTestL();
|
sl@0
|
50 |
void TestTokensL();
|
sl@0
|
51 |
TBool Token(TPtrC8 aBuf, TUint8 aShouldBe, TInt aErr= KErrNone);
|
sl@0
|
52 |
|
sl@0
|
53 |
void IntegersTestL();
|
sl@0
|
54 |
void TestIntegersL();
|
sl@0
|
55 |
TBool Integer(TPtrC8 aBuf, TUint32 aShouldBe, TInt aErr = KErrNone);
|
sl@0
|
56 |
|
sl@0
|
57 |
void LongIntTestL();
|
sl@0
|
58 |
void TestLongIntL();
|
sl@0
|
59 |
TBool LongInt(TPtrC8 aBuf, TUint32 aShouldBe, TInt aErr = KErrNone);
|
sl@0
|
60 |
|
sl@0
|
61 |
void UintVarsTestL();
|
sl@0
|
62 |
void TestUintVarsL();
|
sl@0
|
63 |
TBool UintVar(TPtrC8 aBuf, TUint32 aShouldBe, TInt aErr = KErrNone);
|
sl@0
|
64 |
|
sl@0
|
65 |
void VersionTestL();
|
sl@0
|
66 |
void TestVersionL();
|
sl@0
|
67 |
TBool VersionL(RStringPool aPool, TPtrC8 aBuf, TPtrC8 aShouldBe, TInt aErr = KErrNone);
|
sl@0
|
68 |
|
sl@0
|
69 |
void DateTestL();
|
sl@0
|
70 |
void TestDateL();
|
sl@0
|
71 |
TBool Date(TPtrC8 aBuf, TTime aShouldBe, TInt aErr = KErrNone);
|
sl@0
|
72 |
|
sl@0
|
73 |
void SegmenterTestL();
|
sl@0
|
74 |
void TestSegmenterL();
|
sl@0
|
75 |
TInt SegmenterCommonL(RStringPool aPool, TPtrC8 aHdr);
|
sl@0
|
76 |
TBool SegmenterL(RStringPool aPool, TPtrC8 aHdr);
|
sl@0
|
77 |
TBool SegmenterExpectCorruptL(RStringPool aPool, TPtrC8 aHdr);
|
sl@0
|
78 |
|
sl@0
|
79 |
private:
|
sl@0
|
80 |
CIpuTestHarness* iTestHarness;
|
sl@0
|
81 |
};
|
sl@0
|
82 |
|
sl@0
|
83 |
|
sl@0
|
84 |
|
sl@0
|
85 |
#endif // __CWSPDECODETEST_H__
|