|
1 // |
|
2 // Copyright (c) 2005-2009 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 //! @file |
|
17 //! @SYMTestSuiteName GRAPHICS-BITGDI-FbsBitGcFont-PublicApi |
|
18 //! @SYMScriptTestEnvironment |
|
19 |
|
20 ///////////////////////////////////////////////////////////////////// |
|
21 // GRAPHICS-BITGDI-FbsBitGcFont-PublicApi.script |
|
22 // |
|
23 // Tests all public elements of the CFbsBitGcFont |
|
24 // classes as a means of confidence that the APIs work as expected. |
|
25 // |
|
26 // The purpose is to provide a regression test suite of PublishedAll APIs for CFbsBitGcFont |
|
27 // The tests are fully automated. |
|
28 ///////////////////////////////////////////////////////////////////// |
|
29 |
|
30 // **************************************************************************** |
|
31 // Class Name CFbsBitGcFont |
|
32 // **************************************************************************** |
|
33 |
|
34 LOAD_SUITE T_GraphicsBitgdiApi |
|
35 DELAY 1000 |
|
36 |
|
37 START_TESTCASE GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0001 |
|
38 //! @SYMTestCaseID GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0001 |
|
39 //! @SYMAPI CFbsBitGcFont::CFbsBitGcFont() |
|
40 //! @SYMAuthor Wei Liu |
|
41 //! @SYMCreationDate 20/01/2009 |
|
42 //! @SYMTestCaseDesc Create the CFbsBitGcFont Object by CFbsBitGcFont() function. |
|
43 //! @SYMTestActions 1. Create a RFbsSession object and connect it. |
|
44 //! 2. Create a CFbsBitGcFont object by default constructor. |
|
45 //! 3. Disconnect RFbsSession. |
|
46 //! @SYMTestStatus Implemented |
|
47 //! @SYMTestPriority High |
|
48 //! @SYMTestExpectedResults CFbsBitGcFont Object is created by default construction function without any error. |
|
49 //! @SYMTestType CIT |
|
50 START_TEST_BLOCK 10 T_GraphicsBitgdiApi \graphics\GRAPHICS-BITGDI-FbsBitGcFont-PublicApi.ini |
|
51 CREATE_OBJECT RFbsSession FbsSession |
|
52 CREATE_OBJECT CFbsBitGcFont FbsBitGcFont |
|
53 COMMAND FbsSession Connect |
|
54 COMMAND FbsBitGcFont NewL |
|
55 COMMAND FbsSession Disconnect |
|
56 END_TEST_BLOCK |
|
57 END_TESTCASE GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0001 |
|
58 |
|
59 START_TESTCASE GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0002 |
|
60 //! @SYMTestCaseID GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0002 |
|
61 //! @SYMAPI CFbsBitGcFont::~CFbsBitGcFont() |
|
62 //! @SYMAuthor Wei Liu |
|
63 //! @SYMCreationDate 20/01/2009 |
|
64 //! @SYMTestCaseDesc Delete the CFbsBitGcFont Object by default distructor function. |
|
65 //! @SYMTestActions 1. Create a RFbsSession object and connect it. |
|
66 //! 2. Create a CFbsBitGcFont object by default construction. |
|
67 //! 3. Delete a CFbsBitGcFont object by default distruction. |
|
68 //! 4. Disconnect RFbsSession. |
|
69 //! @SYMTestStatus Implemented |
|
70 //! @SYMTestPriority High |
|
71 //! @SYMTestExpectedResults CFbsBitGcFont Object is deleted by default distruction function without any error. |
|
72 //! @SYMTestType CIT |
|
73 START_TEST_BLOCK 10 T_GraphicsBitgdiApi \graphics\GRAPHICS-BITGDI-FbsBitGcFont-PublicApi.ini |
|
74 CREATE_OBJECT RFbsSession FbsSession |
|
75 CREATE_OBJECT CFbsBitGcFont FbsBitGcFont |
|
76 COMMAND FbsSession Connect |
|
77 COMMAND FbsBitGcFont NewL |
|
78 COMMAND FbsBitGcFont ~ |
|
79 COMMAND FbsSession Disconnect |
|
80 END_TEST_BLOCK |
|
81 END_TESTCASE GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0002 |
|
82 |
|
83 START_TESTCASE GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0003 |
|
84 //! @SYMTestCaseID GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0003 |
|
85 //! @SYMAPI CFbsBitGcFont::Address() const |
|
86 //! @SYMAuthor Wei Liu |
|
87 //! @SYMCreationDate 20/01/2009 |
|
88 //! @SYMTestCaseDesc Get the Address pointer from the CFbsBitGcFont::Address() function. |
|
89 //! @SYMTestActions 1. Create a RFbsSession object and connect it. |
|
90 //! 2. Create CFbsTypefaceStore. |
|
91 //! 3. Get the FbsBitGcFont Object from CFbsTypefaceStore object. |
|
92 //! 4. Get the Address pointer from Address(). |
|
93 //! 5. Delete all the objects. |
|
94 //! 6. Disconnect RFbsSession. |
|
95 //! @SYMTestStatus Implemented |
|
96 //! @SYMTestPriority High |
|
97 //! @SYMTestExpectedResults The address pointer is received without any error. |
|
98 //! @SYMTestType CIT |
|
99 START_TEST_BLOCK 10 T_GraphicsBitgdiApi \graphics\GRAPHICS-BITGDI-FbsBitGcFont-PublicApi.ini |
|
100 CREATE_OBJECT RFbsSession FbsSession |
|
101 CREATE_OBJECT CFbsBitGcFont FbsBitGcFont |
|
102 CREATE_OBJECT CFbsTypefaceStore FbsTypefaceStore |
|
103 COMMAND FbsSession Connect |
|
104 COMMAND FbsTypefaceStore NewL |
|
105 COMMAND FbsTypefaceStore GetNearestFontToDesignHeightInPixels GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0003-GetNearestFontToDesignHeightInPixels_command03 |
|
106 COMMAND FbsBitGcFont Address |
|
107 COMMAND FbsTypefaceStore ~ |
|
108 COMMAND FbsSession Disconnect |
|
109 END_TEST_BLOCK |
|
110 END_TESTCASE GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0003 |
|
111 |
|
112 START_TESTCASE GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0004 |
|
113 //! @SYMTestCaseID GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0004 |
|
114 //! @SYMAPI CFbsBitGcFont::Duplicate(TInt) |
|
115 //! @SYMAuthor Wei Liu |
|
116 //! @SYMCreationDate 20/01/2009 |
|
117 //! @SYMTestCaseDesc Duplicates a font by CFbsBitGcFont::Duplicate(TInt) function. |
|
118 //! @SYMTestActions 1. Create a RFbsSession object and connect it. |
|
119 //! 2. Create 2 FbsBitGcFont Objects. |
|
120 //! 3. Create CFbsTypefaceStore. |
|
121 //! 4. Get the FbsBitGcFont Object from CFbsTypefaceStore object. |
|
122 //! 5. Get the FbsBitGcFont2 Object from CFbsTypefaceStore object. |
|
123 //! 6. Duplicate the font in the FbsBitGcFont Object. |
|
124 //! 7. Delete all the objects. |
|
125 //! 8. Disconnect RFbsSession. |
|
126 //! @SYMTestStatus Implemented |
|
127 //! @SYMTestPriority High |
|
128 //! @SYMTestExpectedResults Duplicate function is called without any error. |
|
129 //! @SYMTestType CIT |
|
130 START_TEST_BLOCK 10 T_GraphicsBitgdiApi \graphics\GRAPHICS-BITGDI-FbsBitGcFont-PublicApi.ini |
|
131 CREATE_OBJECT RFbsSession FbsSession |
|
132 CREATE_OBJECT CFbsBitGcFont FbsBitGcFont |
|
133 CREATE_OBJECT CFbsBitGcFont FbsBitGcFont2 |
|
134 CREATE_OBJECT CFbsTypefaceStore FbsTypefaceStore |
|
135 COMMAND FbsSession Connect |
|
136 COMMAND FbsTypefaceStore NewL |
|
137 COMMAND FbsTypefaceStore GetNearestFontToDesignHeightInPixels GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0004-GetNearestFontToDesignHeightInPixels_command03 |
|
138 COMMAND FbsTypefaceStore GetNearestFontToDesignHeightInPixels GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0004-GetNearestFontToDesignHeightInPixels_command04 |
|
139 COMMAND FbsBitGcFont Duplicate GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0004-Duplicate_command05 |
|
140 COMMAND FbsTypefaceStore ~ |
|
141 COMMAND FbsSession Disconnect |
|
142 END_TEST_BLOCK |
|
143 END_TESTCASE GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0004 |
|
144 |
|
145 START_TESTCASE GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0005 |
|
146 //! @SYMTestCaseID GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0005 |
|
147 //! @SYMAPI CFbsBitGcFont::Duplicate(TInt) |
|
148 //! @SYMAuthor Wei Liu |
|
149 //! @SYMCreationDate 20/01/2009 |
|
150 //! @SYMTestCaseDesc Negative case, Duplicates a font by using bad handle. |
|
151 //! @SYMTestActions 1. Create a RFbsSession object and connect it. |
|
152 //! 2. Create a FbsBitGcFont Objects. |
|
153 //! 3. Create CFbsTypefaceStore. |
|
154 //! 4. Get the FbsBitGcFont Object from CFbsTypefaceStore object. |
|
155 //! 5. Duplicate the font using a bad handle. |
|
156 //! 7. Delete all the objects. |
|
157 //! 8. Disconnect RFbsSession. |
|
158 //! @SYMTestStatus Implemented |
|
159 //! @SYMTestPriority High |
|
160 //! @SYMTestExpectedResults KErrUnknown error will occur. |
|
161 //! @SYMTestType CIT |
|
162 START_TEST_BLOCK 10 T_GraphicsBitgdiApi \graphics\GRAPHICS-BITGDI-FbsBitGcFont-PublicApi.ini |
|
163 CREATE_OBJECT RFbsSession FbsSession |
|
164 CREATE_OBJECT CFbsBitGcFont FbsBitGcFont |
|
165 CREATE_OBJECT CFbsTypefaceStore FbsTypefaceStore |
|
166 COMMAND FbsSession Connect |
|
167 COMMAND FbsTypefaceStore NewL |
|
168 COMMAND FbsTypefaceStore GetNearestFontToDesignHeightInPixels GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0005-GetNearestFontToDesignHeightInPixels_command03 |
|
169 COMMAND !Error=-19 FbsBitGcFont Duplicate GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0005-Duplicate_command04 |
|
170 COMMAND FbsTypefaceStore ~ |
|
171 COMMAND FbsSession Disconnect |
|
172 END_TEST_BLOCK |
|
173 END_TESTCASE GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0005 |
|
174 |
|
175 START_TESTCASE GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0006 |
|
176 //! @SYMTestCaseID GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0006 |
|
177 //! @SYMAPI CFbsBitGcFont::Reset() const |
|
178 //! @SYMAuthor Wei Liu |
|
179 //! @SYMCreationDate 20/01/2009 |
|
180 //! @SYMTestCaseDesc Resets to its default settings. |
|
181 //! @SYMTestActions 1. Create a RFbsSession object and connect it. |
|
182 //! 2. Create CFbsTypefaceStore. |
|
183 //! 3. Get the FbsBitGcFont Object from CFbsTypefaceStore object. |
|
184 //! 4. Reset the FbsBitGcFont Object. |
|
185 //! 5. Delete all the objects. |
|
186 //! 6. Disconnect RFbsSession. |
|
187 //! @SYMTestStatus Implemented |
|
188 //! @SYMTestPriority High |
|
189 //! @SYMTestExpectedResults The Reset function is called without any error. |
|
190 //! @SYMTestType CIT |
|
191 START_TEST_BLOCK 10 T_GraphicsBitgdiApi \graphics\GRAPHICS-BITGDI-FbsBitGcFont-PublicApi.ini |
|
192 CREATE_OBJECT RFbsSession FbsSession |
|
193 CREATE_OBJECT CFbsBitGcFont FbsBitGcFont |
|
194 CREATE_OBJECT CFbsTypefaceStore FbsTypefaceStore |
|
195 COMMAND FbsSession Connect |
|
196 COMMAND FbsTypefaceStore NewL |
|
197 COMMAND FbsTypefaceStore GetNearestFontToDesignHeightInPixels GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0006-GetNearestFontToDesignHeightInPixels_command03 |
|
198 COMMAND FbsBitGcFont Reset |
|
199 COMMAND FbsTypefaceStore ~ |
|
200 COMMAND FbsSession Disconnect |
|
201 END_TEST_BLOCK |
|
202 END_TESTCASE GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0006 |