Update contrib.
1 // Copyright (c) 2001-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.
16 #ifndef __CDELIMITEDPATHTEST_H__
17 #define __CDELIMITEDPATHTEST_H__
21 #include "ctestbase.h"
23 class CDelimitedPathTest : public CTestBase
27 // Static factory c'tor.
29 // Rtn: pointer to newly created object - ownership transfered to caller.
31 static CDelimitedPathTest* NewLC(CIpuTestHarness* aTestHarness);
33 // Static factory c'tor.
35 // Rtn: pointer to newly created object - ownership transfered to caller.
37 static CDelimitedPathTest* NewL(CIpuTestHarness* aTestHarness);
41 ~CDelimitedPathTest();
51 CDelimitedPathTest(CIpuTestHarness* aTestHarness);
53 // 2nd phase construction
59 // DelimitedPath Tests
63 // Tests extraction of path segments from left to right.
66 // aPath - descriptor with path
67 // ... - list of one or more segments
69 void TestDelimitedPathExtractionL(TRefByValue<const TDesC> aPath, ...) const;
71 // Tests extraction of path segments from right to left.
74 // aPath - descriptor with path
75 // ... - list of one or more segments
77 void TestDelimitedPathReverseExtractionL(TRefByValue<const TDesC> aPath, ...) const;
79 // Tests for presence of front and back delimiters
83 // aFrontDelim - indicated whethere there is a front delimiter or not
84 // aBackDelim - indicated whethere there is a back delimiter or not
86 void TestDelimitedPathDelimiterPresenceL(const TDesC& aPath, TBool aFrontDelim, TBool aBackDelim) const;
88 // Tests remainder functionality for forward parsing
92 // ... - list of the expected remainders
94 void TestDelimitedPathRemainderL(TRefByValue<const TDesC> aPath, ...) const;
96 // Tests remainder functionality for reverse parsing
100 // ... - list of the expected remainders
102 void TestDelimitedPathRemainderReverseL(TRefByValue<const TDesC> aPath, ...) const;
104 // Tests Des() function
109 void TestDelimitedPathDesL(const TDesC& aPath) const;
111 // Tests PushFront(), NewL() and NewLC()
115 // ... - list of the path segments and expected full path for each push
117 void TestDelimitedPathPushFrontL(TRefByValue<const TDesC> aPath, ...) const;
119 // Tests PushBack(), NewL() and NewLC()
123 // ... - list of the path segments and expected full path for each push
125 void TestDelimitedPathPushBackL(TRefByValue<const TDesC> aPath, ...) const;
127 // Tests PopFront(), NewL() and NewLC()
131 // ... - list of the expected full path for each pop
133 void TestDelimitedPathPopFrontL(TRefByValue<const TDesC> aPath, ...) const;
135 // Tests PopBack(), NewL() and NewLC()
139 // ... - list of the expected full path for each pop
141 void TestDelimitedPathPopBackL(TRefByValue<const TDesC> aPath, ...) const;
143 // Tests adding and triming of fromt and back delimiters
148 void TestDelimitedPathAddAndTrimFrontAndBackDelimiterL(const TDesC& aPath) const;
150 // Tests InsertCurrent(), Parse()
153 // aStartPos - position from the start of parsing of where to insert
155 // ... - list of the path segments and expected full path for each insert
157 void TestDelimitedPathInsertAndParseL(TInt aStartPos, TRefByValue<const TDesC> aPath, ...) const;
159 // Tests RemoveCurrent(), Parse()
162 // aStartPos - position from the start of parsing of where to insert
164 // ... - list of the expected full path for each remove
166 void TestDelimitedPathRemoveAndParseL(TInt aStartPos, TRefByValue<const TDesC> aPath, ...) const;
168 // Tests InsertCurrent(), ParseReverse()
171 // aStartPos - position from the start of parsing of where to insert
173 // ... - list of the path segments and expected full path for each insert
175 void TestDelimitedPathInsertAndParseReverseL(TInt aStartPos, TRefByValue<const TDesC> aPath, ...) const;
177 // Tests RemoveCurrent(), ParseReverse()
180 // aStartPos - position from the start of parsing of where to insert
182 // ... - list of the expected full path for each remove
184 void TestDelimitedPathRemoveAndParseReverseL(TInt aStartPos, TRefByValue<const TDesC> aPath, ...) const;
186 // Tests InsertAndEscapeCurrent(), Parse()
189 // aStartPos - position from the start of parsing of where to insert
191 // ... - list of the path segments and expected full path for each insert
193 void TestDelimitedPathInsertEscapeAndParseL(TInt aStartPos, TRefByValue<const TDesC> aPath, ...) const;
195 // Tests InsertAndEscapeCurrent(), ParseReverse()
198 // aStartPos - position from the start of parsing of where to insert
200 // ... - list of the path segments and expected full path for each insert
202 void TestDelimitedPathInsertEscapeAndParseReverseL(TInt aStartPos, TRefByValue<const TDesC> aPath, ...) const;
204 // Tests PushAndEscapeFront(), NewL() and NewLC()
208 // ... - list of the path segments and expected full path for each push
210 void TestDelimitedPathPushAndEscapeFrontL(TRefByValue<const TDesC> aPath, ...) const;
212 // Tests PushAndEscapeBack(), NewL() and NewLC()
216 // ... - list of the path segments and expected full path for each push
218 void TestDelimitedPathPushAndEscapeBackL(TRefByValue<const TDesC> aPath, ...) const;
220 private: // Attributes
224 CIpuTestHarness* iTestHarness;
228 #endif // __CDELIMITEDPATHTEST_H__