1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/fbs/fontandbitmapserver/tfbs/tfbsglyphdatapanic.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,74 @@
1.4 +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#ifndef TFBSGLYPHDATAPANIC_H
1.20 +#define TFBSGLYPHDATAPANIC_H
1.21 +
1.22 +#include <sgresource/sgresource.h>
1.23 +#include "test/TGraphicsHarness.h"
1.24 +class RFbsGlyphDataIterator;
1.25 +
1.26 +/**
1.27 +Test class which exercises all panics for the glyph data extensions
1.28 +RFbsGlyphDataIterator and RFbsGlyphMetricsArray.
1.29 +Negative tests
1.30 +*/
1.31 +class CTFbsGlyphDataPanic : public CTGraphicsBase
1.32 + {
1.33 +public:
1.34 + CTFbsGlyphDataPanic(CTestStep* aStep);
1.35 + ~CTFbsGlyphDataPanic();
1.36 +protected:
1.37 +//from CTGraphicsBase
1.38 + virtual void RunTestCaseL(TInt aCurTestCase);
1.39 + void ConstructL();
1.40 +
1.41 +//test cases
1.42 + void TestGlyphDataIteratorNotInitializedNext();
1.43 + void TestGlyphDataIteratorNotInitializedImage();
1.44 + void TestGlyphDataIteratorNotInitializedMetrics();
1.45 + void TestGlyphDataIteratorNotInitializedGlyphCode();
1.46 + void TestGlyphDataIteratorClosedNext();
1.47 + void TestGlyphDataIteratorClosedImage();
1.48 + void TestGlyphDataIteratorClosedMetrics();
1.49 + void TestGlyphDataIteratorClosedGlyphCode();
1.50 + void TestGlyphDataIteratorDiscardUsedFont();
1.51 + void TestGlyphMetricsArrayIndexNegative();
1.52 + void TestGlyphMetricsArrayIndexTooHigh();
1.53 + void TestGlyphDataIteratorOpenFailed();
1.54 +
1.55 + //helper function
1.56 + void OpenAndCloseIterator(RFbsGlyphDataIterator& aIterator); // the function opens and then closes an iterator
1.57 +private:
1.58 + RFbsSession* iFbs;
1.59 + CFbsTypefaceStore* iTs;
1.60 + CFbsFont* iFont;
1.61 + RSgDriver iSgDriver;
1.62 + TUint* iGlyphCodes;
1.63 + };
1.64 +
1.65 +class CTFbsGlyphDataPanicStep : public CTGraphicsStep
1.66 + {
1.67 +public:
1.68 + CTFbsGlyphDataPanicStep();
1.69 +protected:
1.70 + //from CTGraphicsStep
1.71 + virtual CTGraphicsBase* CreateTestL();
1.72 + };
1.73 +
1.74 +_LIT(KTFbsGlyphDataPanicStep,"TFbsGlyphDataPanic");
1.75 +
1.76 +
1.77 +#endif /* TFBSGLYPHDATAPANIC_H */