charconvfw/charconv_fw/test/rtest/tsrc/inc/t_error.h
changeset 51 a7c938434754
equal deleted inserted replaced
44:601ab138ba0b 51:a7c938434754
       
     1 /*
       
     2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __T_ERROR_H__
       
    20 #define __T_ERROR_H__
       
    21 
       
    22 //#include <w32std.h>
       
    23 #include <test/testexecutestepbase.h>
       
    24 #include <e32std.h>
       
    25 #include <utf.h>
       
    26 
       
    27 typedef TInt (*FConvertFromUtfX)(TDes16& aUnicode, const TDesC8& aUtfX, TInt& aState);
       
    28 
       
    29 typedef TInt (*FConvertToUtfX)(TDes8& aUtfX, const TDesC16& aUnicode);
       
    30 
       
    31 class CT_ERROR : public CTestStep
       
    32     {
       
    33 public:
       
    34     CT_ERROR();
       
    35 protected:  
       
    36     TVerdict doTestStepL();
       
    37 private:
       
    38     void TestERROR();
       
    39     void ExhaustivelyLengthTest(const TDesC16& aUnicode, const TDesC8& aUtfX, FConvertFromUtfX aConvertFromUtfX);
       
    40     void ExhaustivelyLengthTest(const TDesC8& aUtfX, const TDesC16& aUnicode, FConvertToUtfX aConvertToUtfX);
       
    41     void ExhaustivelyLengthTest(const TDesC16& aUnicode, const TDesC8& aUtf7WithOptionalDirectCharactersEncodedInBase64, const TDesC8& aUtf7WithOptionalDirectCharactersEncodedDirectly, const TDesC8& aUtf8);
       
    42     void ExhaustivelyLengthTest(const TDesC16& aUnicode, const TDesC8& aUtf7, const TDesC8& aUtf8);
       
    43     void LengthTestGeneratingUtf7();
       
    44     void LengthTestGeneratingUtf8();
       
    45     };
       
    46 
       
    47 _LIT(KTestStep_T_ERROR, "T_ERROR");
       
    48 
       
    49 #endif