sl@0: // Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef TFBSGLYPHDATAPANIC_H sl@0: #define TFBSGLYPHDATAPANIC_H sl@0: sl@0: #include sl@0: #include "test/TGraphicsHarness.h" sl@0: class RFbsGlyphDataIterator; sl@0: sl@0: /** sl@0: Test class which exercises all panics for the glyph data extensions sl@0: RFbsGlyphDataIterator and RFbsGlyphMetricsArray. sl@0: Negative tests sl@0: */ sl@0: class CTFbsGlyphDataPanic : public CTGraphicsBase sl@0: { sl@0: public: sl@0: CTFbsGlyphDataPanic(CTestStep* aStep); sl@0: ~CTFbsGlyphDataPanic(); sl@0: protected: sl@0: //from CTGraphicsBase sl@0: virtual void RunTestCaseL(TInt aCurTestCase); sl@0: void ConstructL(); sl@0: sl@0: //test cases sl@0: void TestGlyphDataIteratorNotInitializedNext(); sl@0: void TestGlyphDataIteratorNotInitializedImage(); sl@0: void TestGlyphDataIteratorNotInitializedMetrics(); sl@0: void TestGlyphDataIteratorNotInitializedGlyphCode(); sl@0: void TestGlyphDataIteratorClosedNext(); sl@0: void TestGlyphDataIteratorClosedImage(); sl@0: void TestGlyphDataIteratorClosedMetrics(); sl@0: void TestGlyphDataIteratorClosedGlyphCode(); sl@0: void TestGlyphDataIteratorDiscardUsedFont(); sl@0: void TestGlyphMetricsArrayIndexNegative(); sl@0: void TestGlyphMetricsArrayIndexTooHigh(); sl@0: void TestGlyphDataIteratorOpenFailed(); sl@0: sl@0: //helper function sl@0: void OpenAndCloseIterator(RFbsGlyphDataIterator& aIterator); // the function opens and then closes an iterator sl@0: private: sl@0: RFbsSession* iFbs; sl@0: CFbsTypefaceStore* iTs; sl@0: CFbsFont* iFont; sl@0: RSgDriver iSgDriver; sl@0: TUint* iGlyphCodes; sl@0: }; sl@0: sl@0: class CTFbsGlyphDataPanicStep : public CTGraphicsStep sl@0: { sl@0: public: sl@0: CTFbsGlyphDataPanicStep(); sl@0: protected: sl@0: //from CTGraphicsStep sl@0: virtual CTGraphicsBase* CreateTestL(); sl@0: }; sl@0: sl@0: _LIT(KTFbsGlyphDataPanicStep,"TFbsGlyphDataPanic"); sl@0: sl@0: sl@0: #endif /* TFBSGLYPHDATAPANIC_H */