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 __CDELIMITEDQUERYTEST_H__ sl@0: #define __CDELIMITEDQUERYTEST_H__ sl@0: sl@0: #include sl@0: sl@0: #include "ctestbase.h" sl@0: sl@0: class CDelimitedQueryTest : 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 CDelimitedQueryTest* 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 CDelimitedQueryTest* NewL(CIpuTestHarness* aTestHarness); sl@0: sl@0: // D'tor sl@0: // sl@0: ~CDelimitedQueryTest(); 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: CDelimitedQueryTest(CIpuTestHarness* aTestHarness); sl@0: sl@0: // 2nd phase construction sl@0: // sl@0: void ConstructL(); sl@0: sl@0: // sl@0: // sl@0: // Delimited Query Tests sl@0: // sl@0: // sl@0: sl@0: // Tests extraction of query segments from left to right. sl@0: // sl@0: // In: sl@0: // aQuery - descriptor with query sl@0: // ... - list of one or more segments sl@0: // sl@0: void TestDelimitedQueryExtractionL(TRefByValue aQuery, ...) const; sl@0: sl@0: // Tests extraction of query segments from right to left. sl@0: // sl@0: // In: sl@0: // aQuery - descriptor with query sl@0: // ... - list of one or more segments sl@0: // sl@0: void TestDelimitedQueryReverseExtractionL(TRefByValue aQuery, ...) const; sl@0: sl@0: // Tests for presence of front and back delimiters sl@0: // sl@0: // In: sl@0: // aQuery - the query 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 TestDelimitedQueryDelimiterPresenceL(const TDesC& aQuery, TBool aFrontDelim, TBool aBackDelim) const; sl@0: sl@0: // Tests remainder functionality for forward parsing sl@0: // sl@0: // In: sl@0: // aQuery - the query sl@0: // ... - list of the expected remainders sl@0: // sl@0: void TestDelimitedQueryRemainderL(TRefByValue aQuery, ...) const; sl@0: sl@0: // Tests remainder functionality for reverse parsing sl@0: // sl@0: // In: sl@0: // aQuery - the query sl@0: // ... - list of the expected remainders sl@0: // sl@0: void TestDelimitedQueryRemainderReverseL(TRefByValue aQuery, ...) const; sl@0: sl@0: // Tests Des() function sl@0: // sl@0: // In: sl@0: // aQuery - the query sl@0: // sl@0: void TestDelimitedQueryDesL(const TDesC& aQuery) const; sl@0: sl@0: // Tests PushFront(), NewL() and NewLC() sl@0: // sl@0: // In: sl@0: // aQuery - the query sl@0: // ... - list of the query segments and expected full query for each push sl@0: // sl@0: void TestDelimitedQueryPushFrontL(TRefByValue aQuery, ...) const; sl@0: sl@0: // Tests PushBack(), NewL() and NewLC() sl@0: // sl@0: // In: sl@0: // aQuery - the query sl@0: // ... - list of the query segments and expected full query for each push sl@0: // sl@0: void TestDelimitedQueryPushBackL(TRefByValue aQuery, ...) const; sl@0: sl@0: // Tests PopFront(), NewL() and NewLC() sl@0: // sl@0: // In: sl@0: // aQuery - the query sl@0: // ... - list of the expected full query for each pop sl@0: // sl@0: void TestDelimitedQueryPopFrontL(TRefByValue aQuery, ...) const; sl@0: sl@0: // Tests PopBack(), NewL() and NewLC() sl@0: // sl@0: // In: sl@0: // aQuery - the query sl@0: // ... - list of the expected full query for each pop sl@0: // sl@0: void TestDelimitedQueryPopBackL(TRefByValue aQuery, ...) const; sl@0: sl@0: // Tests adding and triming of fromt and back delimiters sl@0: // sl@0: // In: sl@0: // aQuery - the query sl@0: // sl@0: void TestDelimitedQueryAddAndTrimFrontAndBackDelimiterL(const TDesC& aQuery) 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: // aQuery - the query sl@0: // ... - list of the query segments and expected full query for each insert sl@0: // sl@0: void TestDelimitedQueryInsertAndParseL(TInt aStartPos, TRefByValue aQuery, ...) 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: // aQuery - the query sl@0: // ... - list of the expected full query for each remove sl@0: // sl@0: void TestDelimitedQueryRemoveAndParseL(TInt aStartPos, TRefByValue aQuery, ...) 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: // aQuery - the query sl@0: // ... - list of the query segments and expected full query for each insert sl@0: // sl@0: void TestDelimitedQueryInsertAndParseReverseL(TInt aStartPos, TRefByValue aQuery, ...) 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: // aQuery - the query sl@0: // ... - list of the expected full query for each remove sl@0: // sl@0: void TestDelimitedQueryRemoveAndParseReverseL(TInt aStartPos, TRefByValue aQuery, ...) 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: // aQuery - the query sl@0: // ... - list of the query segments and expected full query for each insert sl@0: // sl@0: void TestDelimitedQueryInsertEscapeAndParseL(TInt aStartPos, TRefByValue aQuery, ...) 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: // aQuery - the query sl@0: // ... - list of the query segments and expected full query for each insert sl@0: // sl@0: void TestDelimitedQueryInsertEscapeAndParseReverseL(TInt aStartPos, TRefByValue aQuery, ...) const; sl@0: sl@0: // Tests PushAndEscapeFront(), NewL() and NewLC() sl@0: // sl@0: // In: sl@0: // aQuery - the query sl@0: // ... - list of the query segments and expected full query for each push sl@0: // sl@0: void TestDelimitedQueryPushAndEscapeFrontL(TRefByValue aQuery, ...) const; sl@0: sl@0: // Tests PushAndEscapeBack(), NewL() and NewLC() sl@0: // sl@0: // In: sl@0: // aQuery - the query sl@0: // ... - list of the query segments and expected full query for each push sl@0: // sl@0: void TestDelimitedQueryPushAndEscapeBackL(TRefByValue aQuery, ...) 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 // __CDELIMITEDQUERYTEST_H__