os/ossrv/genericservices/httputils/Test/t_uriparser/TextUtilsTests.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.
     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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __TEXTUTILSTESTS_H__
    17 #define __TEXTUTILSTESTS_H__
    18 
    19 // System includes
    20 //
    21 #include <e32base.h>
    22 
    23 //
    24 //
    25 // TEXTUtils test data
    26 //
    27 //
    28 
    29 _LIT(KRemove0_base,		"    Hello there   ");
    30 _LIT(KRemove0_left,		"Hello there   ");
    31 const TInt KRemove0_left_consumed = 4;
    32 _LIT(KRemove0_right,		"    Hello there");
    33 const TInt KRemove0_right_consumed = 3;
    34 _LIT(KRemove0_both,		"Hello there");
    35 const TInt KRemove0_both_consumed = 7;
    36 
    37 const TInt KNumericValue0		= 1234567890;
    38 _LIT(KDecRep0,					 "1234567890");
    39 _LIT(KHexRep0,					 "499602d2");
    40 const TBool KIsValid0			= ETrue;
    41 
    42 const TInt KNumericValue1		= -543210;
    43 _LIT(KDecRep1,					 "-543210");
    44 _LIT(KHexRep1,					 "-849eA");
    45 const TBool KIsValid1			= ETrue;
    46 
    47 const TInt KNumericValue2		= 0;
    48 _LIT(KDecRep2,					 "");
    49 _LIT(KHexRep2,					 "");
    50 const TBool KIsValid2			= EFalse;
    51 	
    52 const TInt KNumericValue3		= 0;
    53 _LIT(KDecRep3,					 "t500");
    54 _LIT(KHexRep3,					 "t1f4");
    55 const TBool KIsValid3			= EFalse;
    56 
    57 _LIT(KQuotedBuffer0,	"this is the \"quoted string\" and this is not");
    58 _LIT(KQuotedString0,	"quoted string");
    59 _LIT(KQuotedRemainder0,	" and this is not");
    60 const TInt KExpectedError0	= KErrNone;
    61 
    62 _LIT(KQuotedBuffer1,	"this is the \"quoted string\" and this is also \"string!\" but this is not");
    63 _LIT(KQuotedString1,	"quoted string\" and this is also \"string!");
    64 _LIT(KQuotedRemainder1,	" but this is not");
    65 const TInt KExpectedError1	= KErrNone;
    66 
    67 _LIT(KQuotedBuffer2,	"this has no quoted string");
    68 _LIT(KQuotedString2,	"");
    69 _LIT(KQuotedRemainder2,	"this has no quoted string");
    70 const TInt KExpectedError2	= -5014;
    71 
    72 _LIT(KQuotedBuffer3,	"this has no a malformed \"quoted string");
    73 _LIT(KQuotedString3,	"");
    74 _LIT(KQuotedRemainder3,	"this has no a malformed \"quoted string");
    75 const TInt KExpectedError3	= -5014;
    76 
    77 _LIT(KListBuffer0,		"token0, token1 / token 2 is very long    ");
    78 _LIT(KListToken0_0,		"token0");
    79 _LIT(KListToken0_1,		"token1");
    80 _LIT(KListToken0_2,		"token 2 is very long");
    81 _LIT(KListRemainder0,	"");
    82 _LIT(KListSeparator0,	",/");
    83 
    84 _LIT(KListBuffer1,		"token0, token1 / token 2 # very long    ");
    85 _LIT(KListToken1_0,		"token0");
    86 _LIT(KListToken1_1,		"token1");
    87 _LIT(KListToken1_2,		"token 2");
    88 _LIT(KListRemainder1,	" very long    ");
    89 _LIT(KListSeparator1,	",/#");
    90 
    91 _LIT(KListBuffer2,		"token0, token1 , token 2 is very long    ");
    92 _LIT(KListToken2_0,		"token0");
    93 _LIT(KListToken2_1,		"token1");
    94 _LIT(KListToken2_2,		"token 2 is very long");
    95 _LIT(KListRemainder2,	"");
    96 const TUint KListSeparator2	= ',';
    97 
    98 _LIT(KListBuffer3,		"token0/  token1 / token 2 / very long    ");
    99 _LIT(KListToken3_0,		"token0");
   100 _LIT(KListToken3_1,		"token1");
   101 _LIT(KListToken3_2,		"token 2");
   102 _LIT(KListRemainder3,	" very long    ");
   103 const TUint KListSeparator3	= '/';
   104 
   105 #endif // __TEXTUTILSTESTS_H__