os/ossrv/genericservices/httputils/Test/t_uriparser/CDelimitedPathTest.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (c) 2001-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
//
sl@0
    15
sl@0
    16
#ifndef __CDELIMITEDPATHTEST_H__
sl@0
    17
#define __CDELIMITEDPATHTEST_H__
sl@0
    18
sl@0
    19
#include <e32base.h>
sl@0
    20
sl@0
    21
#include "ctestbase.h"
sl@0
    22
sl@0
    23
class CDelimitedPathTest : public CTestBase
sl@0
    24
	{
sl@0
    25
public:
sl@0
    26
sl@0
    27
	// Static factory c'tor.
sl@0
    28
	//
sl@0
    29
	// Rtn: pointer to newly created object - ownership transfered to caller.
sl@0
    30
	//
sl@0
    31
	static CDelimitedPathTest* NewLC(CIpuTestHarness* aTestHarness);
sl@0
    32
sl@0
    33
	// Static factory c'tor.
sl@0
    34
	//
sl@0
    35
	// Rtn: pointer to newly created object - ownership transfered to caller.
sl@0
    36
	//
sl@0
    37
	static CDelimitedPathTest* NewL(CIpuTestHarness* aTestHarness);
sl@0
    38
sl@0
    39
	// D'tor
sl@0
    40
	//
sl@0
    41
	~CDelimitedPathTest();
sl@0
    42
sl@0
    43
	// Does the tests
sl@0
    44
	//
sl@0
    45
	void DoTestsL();
sl@0
    46
sl@0
    47
private:
sl@0
    48
sl@0
    49
	// C'tor
sl@0
    50
	//
sl@0
    51
	CDelimitedPathTest(CIpuTestHarness* aTestHarness);
sl@0
    52
sl@0
    53
	// 2nd phase construction
sl@0
    54
	//
sl@0
    55
	void ConstructL();
sl@0
    56
sl@0
    57
//
sl@0
    58
//
sl@0
    59
//	DelimitedPath Tests
sl@0
    60
//
sl@0
    61
//
sl@0
    62
sl@0
    63
	// Tests extraction of path segments from left to right.
sl@0
    64
	//
sl@0
    65
	// In:
sl@0
    66
	// aPath	- descriptor with path
sl@0
    67
	// ...		- list of one or more segments
sl@0
    68
	//
sl@0
    69
	void TestDelimitedPathExtractionL(TRefByValue<const TDesC> aPath, ...) const;
sl@0
    70
sl@0
    71
	// Tests extraction of path segments from right to left.
sl@0
    72
	//
sl@0
    73
	// In:
sl@0
    74
	// aPath	- descriptor with path
sl@0
    75
	// ...		- list of one or more segments
sl@0
    76
	//
sl@0
    77
	void TestDelimitedPathReverseExtractionL(TRefByValue<const TDesC> aPath, ...) const;
sl@0
    78
sl@0
    79
	// Tests for presence of front and back delimiters
sl@0
    80
	//
sl@0
    81
	// In:
sl@0
    82
	// aPath		- the path
sl@0
    83
	// aFrontDelim	- indicated whethere there is a front delimiter or not
sl@0
    84
	// aBackDelim	- indicated whethere there is a back delimiter or not
sl@0
    85
	//
sl@0
    86
	void TestDelimitedPathDelimiterPresenceL(const TDesC& aPath, TBool aFrontDelim, TBool aBackDelim) const;
sl@0
    87
sl@0
    88
	// Tests remainder functionality for forward parsing
sl@0
    89
	//
sl@0
    90
	// In:
sl@0
    91
	// aPath	- the path
sl@0
    92
	// ...		- list of the expected remainders
sl@0
    93
	//
sl@0
    94
	void TestDelimitedPathRemainderL(TRefByValue<const TDesC> aPath, ...) const;
sl@0
    95
sl@0
    96
	// Tests remainder functionality for reverse parsing
sl@0
    97
	//
sl@0
    98
	// In:
sl@0
    99
	// aPath	- the path
sl@0
   100
	// ...		- list of the expected remainders
sl@0
   101
	//
sl@0
   102
	void TestDelimitedPathRemainderReverseL(TRefByValue<const TDesC> aPath, ...) const;
sl@0
   103
sl@0
   104
	// Tests Des() function
sl@0
   105
	//
sl@0
   106
	// In:
sl@0
   107
	// aPath	- the path
sl@0
   108
	//
sl@0
   109
	void TestDelimitedPathDesL(const TDesC& aPath) const;
sl@0
   110
sl@0
   111
	// Tests PushFront(), NewL() and NewLC()
sl@0
   112
	//
sl@0
   113
	// In:
sl@0
   114
	// aPath	- the path
sl@0
   115
	// ...		- list of the path segments and expected full path for each push
sl@0
   116
	//
sl@0
   117
	void TestDelimitedPathPushFrontL(TRefByValue<const TDesC> aPath, ...) const;
sl@0
   118
sl@0
   119
	// Tests PushBack(), NewL() and NewLC()
sl@0
   120
	//
sl@0
   121
	// In:
sl@0
   122
	// aPath	- the path
sl@0
   123
	// ...		- list of the path segments and expected full path for each push
sl@0
   124
	//
sl@0
   125
	void TestDelimitedPathPushBackL(TRefByValue<const TDesC> aPath, ...) const;
sl@0
   126
sl@0
   127
	// Tests PopFront(), NewL() and NewLC()
sl@0
   128
	//
sl@0
   129
	// In:
sl@0
   130
	// aPath	- the path
sl@0
   131
	// ...		- list of the expected full path for each pop
sl@0
   132
	//
sl@0
   133
	void TestDelimitedPathPopFrontL(TRefByValue<const TDesC> aPath, ...) const;
sl@0
   134
sl@0
   135
	// Tests PopBack(), NewL() and NewLC()
sl@0
   136
	//
sl@0
   137
	// In:
sl@0
   138
	// aPath	- the path
sl@0
   139
	// ...		- list of the expected full path for each pop
sl@0
   140
	//
sl@0
   141
	void TestDelimitedPathPopBackL(TRefByValue<const TDesC> aPath, ...) const;
sl@0
   142
sl@0
   143
	// Tests adding and triming of fromt and back delimiters
sl@0
   144
	//
sl@0
   145
	// In:
sl@0
   146
	// aPath	- the path
sl@0
   147
	//
sl@0
   148
	void TestDelimitedPathAddAndTrimFrontAndBackDelimiterL(const TDesC& aPath) const;
sl@0
   149
sl@0
   150
	// Tests InsertCurrent(), Parse()
sl@0
   151
	//
sl@0
   152
	// In:
sl@0
   153
	// aStartPos	- position from the start of parsing of where to insert
sl@0
   154
	// aPath		- the path
sl@0
   155
	// ...			- list of the path segments and expected full path for each insert
sl@0
   156
	//
sl@0
   157
	void TestDelimitedPathInsertAndParseL(TInt aStartPos, TRefByValue<const TDesC> aPath, ...) const;
sl@0
   158
sl@0
   159
	// Tests RemoveCurrent(), Parse()
sl@0
   160
	//
sl@0
   161
	// In:
sl@0
   162
	// aStartPos	- position from the start of parsing of where to insert
sl@0
   163
	// aPath		- the path
sl@0
   164
	// ...			- list of the expected full path for each remove
sl@0
   165
	//
sl@0
   166
	void TestDelimitedPathRemoveAndParseL(TInt aStartPos, TRefByValue<const TDesC> aPath, ...) const;
sl@0
   167
sl@0
   168
	// Tests InsertCurrent(), ParseReverse()
sl@0
   169
	//
sl@0
   170
	// In:
sl@0
   171
	// aStartPos	- position from the start of parsing of where to insert
sl@0
   172
	// aPath		- the path
sl@0
   173
	// ...			- list of the path segments and expected full path for each insert
sl@0
   174
	//
sl@0
   175
	void TestDelimitedPathInsertAndParseReverseL(TInt aStartPos, TRefByValue<const TDesC> aPath, ...) const;
sl@0
   176
sl@0
   177
	// Tests RemoveCurrent(), ParseReverse()
sl@0
   178
	//
sl@0
   179
	// In:
sl@0
   180
	// aStartPos	- position from the start of parsing of where to insert
sl@0
   181
	// aPath		- the path
sl@0
   182
	// ...			- list of the expected full path for each remove
sl@0
   183
	//
sl@0
   184
	void TestDelimitedPathRemoveAndParseReverseL(TInt aStartPos, TRefByValue<const TDesC> aPath, ...) const;
sl@0
   185
sl@0
   186
	// Tests InsertAndEscapeCurrent(), Parse()
sl@0
   187
	//
sl@0
   188
	// In:
sl@0
   189
	// aStartPos	- position from the start of parsing of where to insert
sl@0
   190
	// aPath		- the path
sl@0
   191
	// ...			- list of the path segments and expected full path for each insert
sl@0
   192
	//
sl@0
   193
	void TestDelimitedPathInsertEscapeAndParseL(TInt aStartPos, TRefByValue<const TDesC> aPath, ...) const;
sl@0
   194
sl@0
   195
	// Tests InsertAndEscapeCurrent(), ParseReverse()
sl@0
   196
	//
sl@0
   197
	// In:
sl@0
   198
	// aStartPos	- position from the start of parsing of where to insert
sl@0
   199
	// aPath		- the path
sl@0
   200
	// ...			- list of the path segments and expected full path for each insert
sl@0
   201
	//
sl@0
   202
	void TestDelimitedPathInsertEscapeAndParseReverseL(TInt aStartPos, TRefByValue<const TDesC> aPath, ...) const;
sl@0
   203
sl@0
   204
	// Tests PushAndEscapeFront(), NewL() and NewLC()
sl@0
   205
	//
sl@0
   206
	// In:
sl@0
   207
	// aPath	- the path
sl@0
   208
	// ...		- list of the path segments and expected full path for each push
sl@0
   209
	//
sl@0
   210
	void TestDelimitedPathPushAndEscapeFrontL(TRefByValue<const TDesC> aPath, ...) const;
sl@0
   211
sl@0
   212
	// Tests PushAndEscapeBack(), NewL() and NewLC()
sl@0
   213
	//
sl@0
   214
	// In:
sl@0
   215
	// aPath	- the path
sl@0
   216
	// ...		- list of the path segments and expected full path for each push
sl@0
   217
	//
sl@0
   218
	void TestDelimitedPathPushAndEscapeBackL(TRefByValue<const TDesC> aPath, ...) const;
sl@0
   219
sl@0
   220
private:	// Attributes
sl@0
   221
sl@0
   222
	// Test harness
sl@0
   223
	//
sl@0
   224
	CIpuTestHarness*	iTestHarness;
sl@0
   225
sl@0
   226
	};
sl@0
   227
sl@0
   228
#endif	// __CDELIMITEDPATHTEST_H__