os/ossrv/genericservices/httputils/Test/t_wspcodec/cwspdecodetest.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/genericservices/httputils/Test/t_wspcodec/cwspdecodetest.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,85 @@
     1.4 +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// Class CWSPDecodeTest 
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +#ifndef		__CWSPDECODETEST_H__
    1.22 +#define		__CWSPDECODETEST_H__
    1.23 +
    1.24 +#include <e32base.h>
    1.25 +
    1.26 +#include "IpuTestUtils.h"
    1.27 +#include "ctestbase.h"
    1.28 +#include <wspdecoder.h>
    1.29 +
    1.30 +class CWSPDecodeTest: public CTestBase
    1.31 +	{
    1.32 +public:
    1.33 +	static CWSPDecodeTest* NewLC(CIpuTestHarness* aTestHarness);
    1.34 +	~CWSPDecodeTest();
    1.35 +	void DoTestsL();
    1.36 +
    1.37 +private:
    1.38 +	CWSPDecodeTest(CIpuTestHarness* aTestHarness);
    1.39 +
    1.40 +	void VarTypesTestL();
    1.41 +	void TestVarTypesL();
    1.42 +	TBool VarType(TPtrC8 aBuf, TWspPrimitiveDecoder::TWspHeaderType aShouldBeType);
    1.43 +
    1.44 +	void LengthValsTestL();
    1.45 +	void TestLengthValsL();
    1.46 +	TBool LenVal(TPtrC8 aBuf, TInt aShouldBeVal);
    1.47 +
    1.48 +	void StringTestL();
    1.49 +	void TestStringL();
    1.50 +	TBool String(TPtrC8 aBuf, TPtrC8 aShouldBe, TInt aErr = KErrNone);
    1.51 +
    1.52 +	void TokensTestL();
    1.53 +	void TestTokensL();
    1.54 +	TBool Token(TPtrC8 aBuf, TUint8 aShouldBe, TInt aErr= KErrNone);
    1.55 +
    1.56 +	void IntegersTestL();
    1.57 +	void TestIntegersL();
    1.58 +	TBool Integer(TPtrC8 aBuf, TUint32 aShouldBe, TInt aErr = KErrNone);
    1.59 +
    1.60 +	void LongIntTestL();
    1.61 +	void TestLongIntL();
    1.62 +	TBool LongInt(TPtrC8 aBuf, TUint32 aShouldBe, TInt aErr = KErrNone);
    1.63 +
    1.64 +	void UintVarsTestL();
    1.65 +	void TestUintVarsL();
    1.66 +	TBool UintVar(TPtrC8 aBuf, TUint32 aShouldBe, TInt aErr = KErrNone);
    1.67 +
    1.68 +	void VersionTestL();
    1.69 +	void TestVersionL();
    1.70 +	TBool VersionL(RStringPool aPool, TPtrC8 aBuf, TPtrC8 aShouldBe, TInt aErr = KErrNone);
    1.71 +	
    1.72 +	void DateTestL();
    1.73 +	void TestDateL();
    1.74 +	TBool Date(TPtrC8 aBuf, TTime aShouldBe, TInt aErr = KErrNone);
    1.75 +
    1.76 +	void SegmenterTestL();
    1.77 +	void TestSegmenterL();
    1.78 +	TInt SegmenterCommonL(RStringPool aPool, TPtrC8 aHdr);
    1.79 +	TBool SegmenterL(RStringPool aPool, TPtrC8 aHdr);
    1.80 +	TBool SegmenterExpectCorruptL(RStringPool aPool, TPtrC8 aHdr);
    1.81 +
    1.82 +private:
    1.83 +	CIpuTestHarness* iTestHarness;
    1.84 +	};
    1.85 +
    1.86 +
    1.87 +
    1.88 +#endif //	__CWSPDECODETEST_H__