sl@0: // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef __CDELIMITEDPATHTEST_H__ sl@0: #define __CDELIMITEDPATHTEST_H__ sl@0: sl@0: #include sl@0: sl@0: #include "ctestbase.h" sl@0: sl@0: class CDelimitedPathTest : public CTestBase sl@0: { sl@0: public: sl@0: sl@0: // Static factory c'tor. sl@0: // sl@0: // Rtn: pointer to newly created object - ownership transfered to caller. sl@0: // sl@0: static CDelimitedPathTest* NewLC(CIpuTestHarness* aTestHarness); sl@0: sl@0: // Static factory c'tor. sl@0: // sl@0: // Rtn: pointer to newly created object - ownership transfered to caller. sl@0: // sl@0: static CDelimitedPathTest* NewL(CIpuTestHarness* aTestHarness); sl@0: sl@0: // D'tor sl@0: // sl@0: ~CDelimitedPathTest(); sl@0: sl@0: // Does the tests sl@0: // sl@0: void DoTestsL(); sl@0: sl@0: private: sl@0: sl@0: // C'tor sl@0: // sl@0: CDelimitedPathTest(CIpuTestHarness* aTestHarness); sl@0: sl@0: // 2nd phase construction sl@0: // sl@0: void ConstructL(); sl@0: sl@0: // sl@0: // sl@0: // DelimitedPath Tests sl@0: // sl@0: // sl@0: sl@0: // Tests extraction of path segments from left to right. sl@0: // sl@0: // In: sl@0: // aPath - descriptor with path sl@0: // ... - list of one or more segments sl@0: // sl@0: void TestDelimitedPathExtractionL(TRefByValue aPath, ...) const; sl@0: sl@0: // Tests extraction of path segments from right to left. sl@0: // sl@0: // In: sl@0: // aPath - descriptor with path sl@0: // ... - list of one or more segments sl@0: // sl@0: void TestDelimitedPathReverseExtractionL(TRefByValue aPath, ...) const; sl@0: sl@0: // Tests for presence of front and back delimiters sl@0: // sl@0: // In: sl@0: // aPath - the path sl@0: // aFrontDelim - indicated whethere there is a front delimiter or not sl@0: // aBackDelim - indicated whethere there is a back delimiter or not sl@0: // sl@0: void TestDelimitedPathDelimiterPresenceL(const TDesC& aPath, TBool aFrontDelim, TBool aBackDelim) const; sl@0: sl@0: // Tests remainder functionality for forward parsing sl@0: // sl@0: // In: sl@0: // aPath - the path sl@0: // ... - list of the expected remainders sl@0: // sl@0: void TestDelimitedPathRemainderL(TRefByValue aPath, ...) const; sl@0: sl@0: // Tests remainder functionality for reverse parsing sl@0: // sl@0: // In: sl@0: // aPath - the path sl@0: // ... - list of the expected remainders sl@0: // sl@0: void TestDelimitedPathRemainderReverseL(TRefByValue aPath, ...) const; sl@0: sl@0: // Tests Des() function sl@0: // sl@0: // In: sl@0: // aPath - the path sl@0: // sl@0: void TestDelimitedPathDesL(const TDesC& aPath) const; sl@0: sl@0: // Tests PushFront(), NewL() and NewLC() sl@0: // sl@0: // In: sl@0: // aPath - the path sl@0: // ... - list of the path segments and expected full path for each push sl@0: // sl@0: void TestDelimitedPathPushFrontL(TRefByValue aPath, ...) const; sl@0: sl@0: // Tests PushBack(), NewL() and NewLC() sl@0: // sl@0: // In: sl@0: // aPath - the path sl@0: // ... - list of the path segments and expected full path for each push sl@0: // sl@0: void TestDelimitedPathPushBackL(TRefByValue aPath, ...) const; sl@0: sl@0: // Tests PopFront(), NewL() and NewLC() sl@0: // sl@0: // In: sl@0: // aPath - the path sl@0: // ... - list of the expected full path for each pop sl@0: // sl@0: void TestDelimitedPathPopFrontL(TRefByValue aPath, ...) const; sl@0: sl@0: // Tests PopBack(), NewL() and NewLC() sl@0: // sl@0: // In: sl@0: // aPath - the path sl@0: // ... - list of the expected full path for each pop sl@0: // sl@0: void TestDelimitedPathPopBackL(TRefByValue aPath, ...) const; sl@0: sl@0: // Tests adding and triming of fromt and back delimiters sl@0: // sl@0: // In: sl@0: // aPath - the path sl@0: // sl@0: void TestDelimitedPathAddAndTrimFrontAndBackDelimiterL(const TDesC& aPath) const; sl@0: sl@0: // Tests InsertCurrent(), Parse() sl@0: // sl@0: // In: sl@0: // aStartPos - position from the start of parsing of where to insert sl@0: // aPath - the path sl@0: // ... - list of the path segments and expected full path for each insert sl@0: // sl@0: void TestDelimitedPathInsertAndParseL(TInt aStartPos, TRefByValue aPath, ...) const; sl@0: sl@0: // Tests RemoveCurrent(), Parse() sl@0: // sl@0: // In: sl@0: // aStartPos - position from the start of parsing of where to insert sl@0: // aPath - the path sl@0: // ... - list of the expected full path for each remove sl@0: // sl@0: void TestDelimitedPathRemoveAndParseL(TInt aStartPos, TRefByValue aPath, ...) const; sl@0: sl@0: // Tests InsertCurrent(), ParseReverse() sl@0: // sl@0: // In: sl@0: // aStartPos - position from the start of parsing of where to insert sl@0: // aPath - the path sl@0: // ... - list of the path segments and expected full path for each insert sl@0: // sl@0: void TestDelimitedPathInsertAndParseReverseL(TInt aStartPos, TRefByValue aPath, ...) const; sl@0: sl@0: // Tests RemoveCurrent(), ParseReverse() sl@0: // sl@0: // In: sl@0: // aStartPos - position from the start of parsing of where to insert sl@0: // aPath - the path sl@0: // ... - list of the expected full path for each remove sl@0: // sl@0: void TestDelimitedPathRemoveAndParseReverseL(TInt aStartPos, TRefByValue aPath, ...) const; sl@0: sl@0: // Tests InsertAndEscapeCurrent(), Parse() sl@0: // sl@0: // In: sl@0: // aStartPos - position from the start of parsing of where to insert sl@0: // aPath - the path sl@0: // ... - list of the path segments and expected full path for each insert sl@0: // sl@0: void TestDelimitedPathInsertEscapeAndParseL(TInt aStartPos, TRefByValue aPath, ...) const; sl@0: sl@0: // Tests InsertAndEscapeCurrent(), ParseReverse() sl@0: // sl@0: // In: sl@0: // aStartPos - position from the start of parsing of where to insert sl@0: // aPath - the path sl@0: // ... - list of the path segments and expected full path for each insert sl@0: // sl@0: void TestDelimitedPathInsertEscapeAndParseReverseL(TInt aStartPos, TRefByValue aPath, ...) const; sl@0: sl@0: // Tests PushAndEscapeFront(), NewL() and NewLC() sl@0: // sl@0: // In: sl@0: // aPath - the path sl@0: // ... - list of the path segments and expected full path for each push sl@0: // sl@0: void TestDelimitedPathPushAndEscapeFrontL(TRefByValue aPath, ...) const; sl@0: sl@0: // Tests PushAndEscapeBack(), NewL() and NewLC() sl@0: // sl@0: // In: sl@0: // aPath - the path sl@0: // ... - list of the path segments and expected full path for each push sl@0: // sl@0: void TestDelimitedPathPushAndEscapeBackL(TRefByValue aPath, ...) const; sl@0: sl@0: private: // Attributes sl@0: sl@0: // Test harness sl@0: // sl@0: CIpuTestHarness* iTestHarness; sl@0: sl@0: }; sl@0: sl@0: #endif // __CDELIMITEDPATHTEST_H__