fbs/fontandbitmapserver/tfbs/tfbsglyphdatapanic.h
author andy simpson <andrews@symbian.org>
Fri, 08 Oct 2010 17:18:41 +0100
changeset 198 9f2f0d4d53f3
parent 152 9f1c3fea0f87
permissions -rw-r--r--
Bug 3802 : Remove reference to tfxrenderstage as we do not have the source

// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//

#ifndef TFBSGLYPHDATAPANIC_H
#define TFBSGLYPHDATAPANIC_H

#include <sgresource/sgresource.h>
#include "test/TGraphicsHarness.h"
class RFbsGlyphDataIterator;

/**
Test class which exercises all panics for the glyph data extensions 
RFbsGlyphDataIterator and RFbsGlyphMetricsArray. 
Negative tests
*/
class CTFbsGlyphDataPanic : public CTGraphicsBase
    {
public:
    CTFbsGlyphDataPanic(CTestStep* aStep);
    ~CTFbsGlyphDataPanic();
protected:
//from  CTGraphicsBase
    virtual void RunTestCaseL(TInt aCurTestCase);
    void ConstructL();
    
//test cases
    void TestGlyphDataIteratorNotInitializedNext();
    void TestGlyphDataIteratorNotInitializedImage();
    void TestGlyphDataIteratorNotInitializedMetrics();
    void TestGlyphDataIteratorNotInitializedGlyphCode();
    void TestGlyphDataIteratorClosedNext();
    void TestGlyphDataIteratorClosedImage();
    void TestGlyphDataIteratorClosedMetrics();
    void TestGlyphDataIteratorClosedGlyphCode();
    void TestGlyphDataIteratorDiscardUsedFont();
    void TestGlyphMetricsArrayIndexNegative();
    void TestGlyphMetricsArrayIndexTooHigh();
    void TestGlyphDataIteratorOpenFailed();

    //helper function
    void OpenAndCloseIterator(RFbsGlyphDataIterator& aIterator); // the function opens and then closes an iterator
private:
    RFbsSession* iFbs;
    CFbsTypefaceStore* iTs;
    CFbsFont* iFont;
    RSgDriver iSgDriver;
    TUint* iGlyphCodes;
   };

class CTFbsGlyphDataPanicStep : public CTGraphicsStep
    {
public:
    CTFbsGlyphDataPanicStep();
protected:  
    //from CTGraphicsStep
    virtual CTGraphicsBase* CreateTestL();
    };

_LIT(KTFbsGlyphDataPanicStep,"TFbsGlyphDataPanic");


#endif /* TFBSGLYPHDATAPANIC_H */