121
|
1 |
// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
//
|
|
15 |
|
|
16 |
#ifndef TFBSGLYPHDATAPANIC_H
|
|
17 |
#define TFBSGLYPHDATAPANIC_H
|
|
18 |
|
|
19 |
#include <sgresource/sgresource.h>
|
|
20 |
#include "test/TGraphicsHarness.h"
|
|
21 |
class RFbsGlyphDataIterator;
|
|
22 |
|
|
23 |
/**
|
|
24 |
Test class which exercises all panics for the glyph data extensions
|
|
25 |
RFbsGlyphDataIterator and RFbsGlyphMetricsArray.
|
|
26 |
Negative tests
|
|
27 |
*/
|
|
28 |
class CTFbsGlyphDataPanic : public CTGraphicsBase
|
|
29 |
{
|
|
30 |
public:
|
|
31 |
CTFbsGlyphDataPanic(CTestStep* aStep);
|
|
32 |
~CTFbsGlyphDataPanic();
|
|
33 |
protected:
|
|
34 |
//from CTGraphicsBase
|
|
35 |
virtual void RunTestCaseL(TInt aCurTestCase);
|
|
36 |
void ConstructL();
|
|
37 |
|
|
38 |
//test cases
|
|
39 |
void TestGlyphDataIteratorNotInitializedNext();
|
|
40 |
void TestGlyphDataIteratorNotInitializedImage();
|
|
41 |
void TestGlyphDataIteratorNotInitializedMetrics();
|
|
42 |
void TestGlyphDataIteratorNotInitializedGlyphCode();
|
|
43 |
void TestGlyphDataIteratorClosedNext();
|
|
44 |
void TestGlyphDataIteratorClosedImage();
|
|
45 |
void TestGlyphDataIteratorClosedMetrics();
|
|
46 |
void TestGlyphDataIteratorClosedGlyphCode();
|
|
47 |
void TestGlyphDataIteratorDiscardUsedFont();
|
|
48 |
void TestGlyphMetricsArrayIndexNegative();
|
|
49 |
void TestGlyphMetricsArrayIndexTooHigh();
|
|
50 |
void TestGlyphDataIteratorOpenFailed();
|
|
51 |
|
|
52 |
//helper function
|
|
53 |
void OpenAndCloseIterator(RFbsGlyphDataIterator& aIterator); // the function opens and then closes an iterator
|
|
54 |
private:
|
|
55 |
RFbsSession* iFbs;
|
|
56 |
CFbsTypefaceStore* iTs;
|
|
57 |
CFbsFont* iFont;
|
|
58 |
RSgDriver iSgDriver;
|
|
59 |
TUint* iGlyphCodes;
|
|
60 |
};
|
|
61 |
|
|
62 |
class CTFbsGlyphDataPanicStep : public CTGraphicsStep
|
|
63 |
{
|
|
64 |
public:
|
|
65 |
CTFbsGlyphDataPanicStep();
|
|
66 |
protected:
|
|
67 |
//from CTGraphicsStep
|
|
68 |
virtual CTGraphicsBase* CreateTestL();
|
|
69 |
};
|
|
70 |
|
|
71 |
_LIT(KTFbsGlyphDataPanicStep,"TFbsGlyphDataPanic");
|
|
72 |
|
|
73 |
|
|
74 |
#endif /* TFBSGLYPHDATAPANIC_H */
|