sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
*
|
sl@0
|
16 |
*/
|
sl@0
|
17 |
#ifndef __T_GB18030_H__
|
sl@0
|
18 |
#define __T_GB18030_H__
|
sl@0
|
19 |
|
sl@0
|
20 |
//#include <w32std.h>
|
sl@0
|
21 |
#include <test/testexecutestepbase.h>
|
sl@0
|
22 |
|
sl@0
|
23 |
class CCnvCharacterSetConverter;
|
sl@0
|
24 |
|
sl@0
|
25 |
class CT_GB18030 : public CTestStep
|
sl@0
|
26 |
{
|
sl@0
|
27 |
public:
|
sl@0
|
28 |
CT_GB18030();
|
sl@0
|
29 |
protected:
|
sl@0
|
30 |
TVerdict doTestStepL();
|
sl@0
|
31 |
private:
|
sl@0
|
32 |
void DoE32MainL();
|
sl@0
|
33 |
void TestTruncatedConversionFromUnicodeToGb18030(CCnvCharacterSetConverter& aCharacterSetConverter, const TDesC16& aOriginalUnicode);
|
sl@0
|
34 |
void TestSplittingConvertingFromUnicodeToGb18030(CCnvCharacterSetConverter& aCharacterSetConverter,
|
sl@0
|
35 |
TInt aMaximumLengthLowerLimit, TInt aMaximumLengthUpperLimit,
|
sl@0
|
36 |
TInt aExpectedNumberOfUnicodeCharactersNotConvertedAtSplit, TInt aExpectedLengthOfFirstPartOfGb18030,
|
sl@0
|
37 |
const TDesC8& aExpectedGb18030, const TDesC16& aOriginalUnicode);
|
sl@0
|
38 |
void TestTruncatedConversionToUnicodeFromGb18030(CCnvCharacterSetConverter& aCharacterSetConverter, const TDesC16& aExpectedUnicode, const TDesC8& aOriginalGb18030);
|
sl@0
|
39 |
void TestSplittingConvertingToUnicodeFromGb18030(CCnvCharacterSetConverter& aCharacterSetConverter,
|
sl@0
|
40 |
TInt aMaximumLengthLowerLimit, TInt aMaximumLengthUpperLimit,
|
sl@0
|
41 |
TInt aExpectedNumberOfGb18030BytesNotConvertedAtSplit, TInt aExpectedLengthOfFirstPartOfUnicode,
|
sl@0
|
42 |
const TDesC16& aExpectedUnicode, const TDesC8& aOriginalGb18030);
|
sl@0
|
43 |
void CharacterSetValueAndMIBTests(CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFileServerSession);
|
sl@0
|
44 |
void TestConversionToUnicodeFromGb18030(CCnvCharacterSetConverter& aCharacterSetConverter, const TDesC16& aExpectedUnicode, const TDesC8& aOriginalGb18030, TInt aExpectedResult = 0);
|
sl@0
|
45 |
void TestConversionFromUnicodeToGb18030(CCnvCharacterSetConverter& aCharacterSetConverter, const TDesC16& aOriginalUnicode, TInt aExpectedResult = 0);
|
sl@0
|
46 |
void OneByteConversion( CCnvCharacterSetConverter& aCharacterSetConverter );
|
sl@0
|
47 |
void TwoByteConversion( CCnvCharacterSetConverter& aCharacterSetConverter );
|
sl@0
|
48 |
void FourByteConversion( CCnvCharacterSetConverter& aCharacterSetConverter );
|
sl@0
|
49 |
void OneByteConversionNegative( CCnvCharacterSetConverter& aCharacterSetConverter );
|
sl@0
|
50 |
void TwoByteConversionNegative( CCnvCharacterSetConverter& aCharacterSetConverter );
|
sl@0
|
51 |
void FourByteConversionNegative( CCnvCharacterSetConverter& aCharacterSetConverter );
|
sl@0
|
52 |
void ProblemProneCharcters( CCnvCharacterSetConverter& aCharacterSetConverter );
|
sl@0
|
53 |
|
sl@0
|
54 |
|
sl@0
|
55 |
|
sl@0
|
56 |
};
|
sl@0
|
57 |
|
sl@0
|
58 |
_LIT(KTestStep_T_GB18030, "T_GB18030");
|
sl@0
|
59 |
|
sl@0
|
60 |
#endif //__T_GB18030_H__
|