os/textandloc/fontservices/textshaperplugin/test/t_shapeteststep.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2010 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 #ifndef T_SHAPETESTSTEP_H_
    19 #define T_SHAPETESTSTEP_H_
    20 
    21 #include <e32cmn.h>
    22 #include <test/testexecutestepbase.h>
    23 
    24 class CFontStore;
    25 class CBitmapFont;
    26 class CTestData;
    27 
    28 class CShapeTestStep : public CTestStep
    29     {
    30 public:
    31     static CTestStep * CreateShapeTestStep(const TDesC& aStepName);    
    32     
    33 protected:
    34     TVerdict doTestStepL();
    35 
    36 private:
    37     CShapeTestStep(TInt aTestDataIndex, TInt aNumberOfTestDataFiles, TUint32 aScript, TUint32 aLang, const TDesC& aScriptName, const TDesC& aTestID);
    38     
    39     void SetupTestDataL();
    40     
    41     void doShapeText(CBitmapFont* font, CTestData& aTestData, TBool aCheckOutput = EFalse);
    42     void shapeText(CBitmapFont* font, CTestData& aTestData, TBool aCheckOutput = EFalse);
    43     
    44     void doOomShapeText(CBitmapFont* font, CTestData& aTestData);
    45     void oomShapeText(CBitmapFont* font, CTestData& aTestData);
    46     
    47     void doRepeatShapeText(CBitmapFont* font, CTestData& aTestData);
    48     void repeatShapeText(CBitmapFont* aFont, CTestData& aTestData);
    49     
    50     void doRepeatShapeUsingVariousFontSizesTest(CFontStore* aFontStore, const TDesC aTypefaceName, const TDesC &aText1,
    51                                                 const TDesC &aText2, const TDesC &aText3);
    52     void ShapeTestL();
    53     
    54     static const TDesC& getText1();
    55     static const TDesC& getText2();
    56     static const TDesC& getText3();
    57     
    58 private:
    59     const TInt iTestDataIndex;
    60     const TInt iNumberOfTestDataFiles;
    61     const TUint32 iScript;
    62     const TUint32 iLang;
    63     const TBuf<32> iScriptName;
    64     const TBuf<64> iTestID;
    65     RPointerArray<CTestData> iTestDataArr;
    66     };
    67 
    68 #endif /* T_SHAPETESTSTEP_H_ */