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