diff -r 61e9400fe245 -r 0cb2248d0edc apicompatanamdw/bcdrivers/os/graphics/fbserv/scripts/GRAPHICS-FBSERV-FbsFont-PublicApi.script --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/apicompatanamdw/bcdrivers/os/graphics/fbserv/scripts/GRAPHICS-FBSERV-FbsFont-PublicApi.script Thu Apr 22 17:15:08 2010 +0530 @@ -0,0 +1,713 @@ +// +// Copyright (c) 2009 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: +// +//! @file +//! @SYMTestSuiteName GRAPHICS-FBSERV-FbsFont-PublicApi +//! @SYMScriptTestEnvironment This test script requires a basic ROM. + +///////////////////////////////////////////////////////////////////// +// GRAPHICS-FBSERV-FbsFont-PublicAPI.script +// +// Copyright (c) 2006-2008 Symbian Software Ltd. All rights reserved. +// +// Tests all public elements of the CFbsFont class +// as a means of confidence that the APIs work as expected. +// +// The purpose is to provide a regression test suite of PublishedAll APIs for CFbsFont. +// Negative testing is performed to confirm that correct errors are returned when incorrect parameters are given. +// The tests are fully automated. +///////////////////////////////////////////////////////////////////// + +LOAD_SUITE T_FBServAPI + + +START_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0001 +//! @SYMTestCaseID GRAPHICS-FBSERV-FbsFont-PublicApi-0001 +//! @SYMAPI CFbsFont +//! @SYMAuthor Anton Golovko +//! @SYMCreationDate 22/03/2006 +//! @SYMTestCaseDependencies setup-GRAPHICS-FBSERV-FbsFont-PublicApi.script +//! @SYMTestCaseDesc Simple CFbsFont test +//! @SYMTestActions 1. Create FBS session +//! 2. Create FBS typeface store +//! 3. Creates a CFbsFont class instance obtaining it from FBS typeface store +//! @SYMTestStatus Implemented +//! @SYMTestPriority Critical +//! @SYMTestExpectedResults Creation of CFbsFont class doesn't cause panic. +//! @SYMTestType CIT + START_TEST_BLOCK 100 T_FBServAPI \graphics\GRAPHICS-FBSERV-FbsFont-PublicApi.ini + CREATE_OBJECT RFbsSession RFbsSession1 + CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1 + CREATE_OBJECT CFbsFont CFbsFont1 + COMMAND RFbsSession1 Connect + COMMAND CFbsTypefaceStore1 NewL + COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0001-001-GetNearestFontToDesignHeightInPixels_command004 + COMMAND CFbsTypefaceStore1 ~ + COMMAND RFbsSession1 Disconnect + END_TEST_BLOCK +END_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0001 + + +START_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0002 +//! @SYMTestCaseID GRAPHICS-FBSERV-FbsFont-PublicApi-0002 +//! @SYMAPI CFbsFont +//! @SYMAuthor Anton Golovko +//! @SYMCreationDate 22/03/2006 +//! @SYMTestCaseDependencies setup-GRAPHICS-FBSERV-FbsFont-PublicApi.script +//! @SYMTestCaseDesc CFbsFont::GetFontMetrics() test +//! Uses API elements: GetFontMetrics() +//! @SYMTestActions 1. Create FBS session +//! 2. Create FBS typeface store +//! 3. Creates a CFbsFont class instance obtaining it from Arial, 12px FBS typeface store +//! 4. Create a TOpenFontMetrics instance and pass it as a parameter to font's GetFontMetrics +//! @SYMTestStatus Implemented +//! @SYMTestPriority Critical +//! @SYMTestExpectedResults The function GetFontMetrics() returns true and doesn't cause panic. +//! @SYMTestType CIT + START_TEST_BLOCK 100 T_FBServAPI \graphics\GRAPHICS-FBSERV-FbsFont-PublicApi.ini + CREATE_OBJECT RFbsSession RFbsSession1 + CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1 + CREATE_OBJECT CFbsFont CFbsFont1 + COMMAND RFbsSession1 Connect + COMMAND CFbsTypefaceStore1 NewL + COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0002-001-GetNearestFontToDesignHeightInPixels_command004 + COMMAND CFbsFont1 GetFontMetrics GRAPHICS-FBSERV-FbsFont-PublicApi-0002-001-GetFontMetrics_command006 + COMMAND CFbsTypefaceStore1 ~ + COMMAND RFbsSession1 Disconnect + END_TEST_BLOCK +END_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0002 + + +START_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0003 +//! @SYMTestCaseID GRAPHICS-FBSERV-FbsFont-PublicApi-0003 +//! @SYMAPI CFbsFont +//! @SYMAuthor Anton Golovko +//! @SYMCreationDate 22/03/2006 +//! @SYMTestCaseDependencies setup-GRAPHICS-FBSERV-FbsFont-PublicApi.script +//! @SYMTestCaseDesc CFbsFont::TextWidthInPixels() test +//! Uses API elements: TextWidthInPixels() +//! @SYMTestActions 1. Create FBS session +//! 2. Create FBS typeface store +//! 3. Creates a CFbsFont class instance obtaining it from FBS typeface store +//! 4. Call TextWidthInPixels(const TDesC\&) method passing descriptor "a" +//! @SYMTestStatus Implemented +//! @SYMTestPriority Critical +//! @SYMTestExpectedResults The TextWidthInPixels() result value is greater than 0 and the method doesn't cause panic. +//! @SYMTestType CIT + START_TEST_BLOCK 100 T_FBServAPI \graphics\GRAPHICS-FBSERV-FbsFont-PublicApi.ini + CREATE_OBJECT RFbsSession RFbsSession1 + CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1 + CREATE_OBJECT CFbsFont CFbsFont1 + COMMAND RFbsSession1 Connect + COMMAND CFbsTypefaceStore1 NewL + COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0003-001-GetNearestFontToDesignHeightInPixels_command004 + COMMAND CFbsFont1 TextWidthInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0003-001-TextWidthInPixels_command006 + COMMAND CFbsTypefaceStore1 ~ + COMMAND RFbsSession1 Disconnect + END_TEST_BLOCK +END_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0003 + + +START_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0004 +//! @SYMTestCaseID GRAPHICS-FBSERV-FbsFont-PublicApi-0004 +//! @SYMAPI CFbsFont +//! @SYMAuthor Anton Golovko +//! @SYMCreationDate 22/03/2006 +//! @SYMTestCaseDependencies setup-GRAPHICS-FBSERV-FbsFont-PublicApi.script +//! @SYMTestCaseDesc CFbsFont::TextWidthInPixels() with SCharWidth as a parameter test +//! Uses API elements: TextWidthInPixels() +//! @SYMTestActions 1. Create FBS session +//! 2. Create FBS typeface store +//! 3. Creates a CFbsFont class instance obtaining it from FBS typeface store +//! 4. Call TextWidthInPixels(const TDesC\&, SCharWidth\&) method passing descriptor "a" +//! @SYMTestStatus Implemented +//! @SYMTestPriority Critical +//! @SYMTestExpectedResults The TextWidthInPixels() result value is equal to SCharWidth.iMove and iLeftAdjust + iWidth + iRightAdjust +//! of the SCharWidth to equal iMove and the method doesn't cause panic. +//! @SYMTestType CIT + START_TEST_BLOCK 100 T_FBServAPI \graphics\GRAPHICS-FBSERV-FbsFont-PublicApi.ini + CREATE_OBJECT RFbsSession RFbsSession1 + CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1 + CREATE_OBJECT CFbsFont CFbsFont1 + COMMAND RFbsSession1 Connect + COMMAND CFbsTypefaceStore1 NewL + COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0004-001-GetNearestFontToDesignHeightInPixels_command004 + COMMAND CFbsFont1 TextWidthInPixelsWithCharWidth GRAPHICS-FBSERV-FbsFont-PublicApi-0004-001-TextWidthInPixelsWithCharWidth_command006 + COMMAND CFbsTypefaceStore1 ~ + COMMAND RFbsSession1 Disconnect + END_TEST_BLOCK +END_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0004 + + +START_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0005 +//! @SYMTestCaseID GRAPHICS-FBSERV-FbsFont-PublicApi-0005 +//! @SYMAPI CFbsFont +//! @SYMAuthor Anton Golovko +//! @SYMCreationDate 22/03/2006 +//! @SYMTestCaseDependencies setup-GRAPHICS-FBSERV-FbsFont-PublicApi.script +//! @SYMTestCaseDesc CFbsFont::Handle() test +//! Uses API elements: Handle() +//! @SYMTestActions 1. Create FBS session +//! 2. Create FBS typeface store +//! 3. Creates a CFbsFont class instance obtaining it from FBS typeface store +//! 4. Call Handle() method +//! @SYMTestStatus Implemented +//! @SYMTestPriority Critical +//! @SYMTestExpectedResults The result of Handle() is not zero and the method doesn't cause panic. +//! @SYMTestType CIT + START_TEST_BLOCK 100 T_FBServAPI \graphics\GRAPHICS-FBSERV-FbsFont-PublicApi.ini + CREATE_OBJECT RFbsSession RFbsSession1 + CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1 + CREATE_OBJECT CFbsFont CFbsFont1 + COMMAND RFbsSession1 Connect + COMMAND CFbsTypefaceStore1 NewL + COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0005-001-GetNearestFontToDesignHeightInPixels_command004 + COMMAND CFbsFont1 Handle + COMMAND CFbsTypefaceStore1 ~ + COMMAND RFbsSession1 Disconnect + END_TEST_BLOCK +END_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0005 + + +START_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0007 +//! @SYMTestCaseID GRAPHICS-FBSERV-FbsFont-PublicApi-0007 +//! @SYMAPI CFbsFont +//! @SYMAuthor Anton Golovko +//! @SYMCreationDate 22/03/2006 +//! @SYMTestCaseDependencies setup-GRAPHICS-FBSERV-FbsFont-PublicApi.script +//! @SYMTestCaseDesc Deprecated CFbsFont::RawTextWidthInPixels() test +//! Uses API elements: RawTextWidthInPixels(), MeasureText() +//! @SYMTestActions 1. Create FBS session +//! 2. Create FBS typeface store +//! 3. Creates a CFbsFont class instance obtaining it from FBS typeface store +//! 4. Call RawTextWidthInPixels() method passing descriptor "qwerty" to it +//! 5. Use MeasureText() methods to check that result is the same +//! @SYMTestStatus Implemented +//! @SYMTestPriority Critical +//! @SYMTestExpectedResults RawTextWidthInPixels() method call will give same result as MeasureText() and the RawTextWidthInPixels() method doesn't cause panic. +//! @SYMTestType CIT + START_TEST_BLOCK 100 T_FBServAPI \graphics\GRAPHICS-FBSERV-FbsFont-PublicApi.ini + CREATE_OBJECT RFbsSession RFbsSession1 + CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1 + CREATE_OBJECT CFbsFont CFbsFont1 + COMMAND RFbsSession1 Connect + COMMAND CFbsTypefaceStore1 NewL + COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0007-001-GetNearestFontToDesignHeightInPixels_command004 + COMMAND CFbsFont1 RawTextWidthInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0007-001-RawTextWidthInPixels_command006 + COMMAND CFbsTypefaceStore1 ~ + COMMAND RFbsSession1 Disconnect + END_TEST_BLOCK +END_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0007 + + +START_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0008 +//! @SYMTestCaseID GRAPHICS-FBSERV-FbsFont-PublicApi-0008 +//! @SYMAPI CFbsFont +//! @SYMAuthor Anton Golovko +//! @SYMCreationDate 22/03/2006 +//! @SYMTestCaseDependencies setup-GRAPHICS-FBSERV-FbsFont-PublicApi.script +//! @SYMTestCaseDesc CFbsFont::GetFaceAttrib() test +//! Uses API elements: GetFaceAttrib() +//! @SYMTestActions 1. Create FBS session +//! 2. Create FBS typeface store +//! 3. Creates a CFbsFont class instance (for an Open Font, take Swiss) obtaining it from FBS typeface store +//! 4. Call GetFaceAttrib() method passing a blank TOpenFontFaceAttrib instance to it +//! @SYMTestStatus Implemented +//! @SYMTestPriority Critical +//! @SYMTestExpectedResults Font face attributes are correct and the GetFaceAttrib() method doesn't cause panic. +//! @SYMTestType CIT + START_TEST_BLOCK 100 T_FBServAPI \graphics\GRAPHICS-FBSERV-FbsFont-PublicApi.ini + CREATE_OBJECT RFbsSession RFbsSession1 + CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1 + CREATE_OBJECT CFbsFont CFbsFont1 + COMMAND RFbsSession1 Connect + COMMAND CFbsTypefaceStore1 NewL + COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0008-001-GetNearestFontToDesignHeightInPixels_command004 + COMMAND CFbsFont1 GetFaceAttrib GRAPHICS-FBSERV-FbsFont-PublicApi-0008-001-GetFaceAttrib_command006 + COMMAND CFbsTypefaceStore1 ~ + COMMAND RFbsSession1 Disconnect + END_TEST_BLOCK +END_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0008 + + +START_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0009 +//! @SYMTestCaseID GRAPHICS-FBSERV-FbsFont-PublicApi-0009 +//! @SYMAPI CFbsFont +//! @SYMAuthor Anton Golovko +//! @SYMCreationDate 22/03/2006 +//! @SYMTestCaseDependencies setup-GRAPHICS-FBSERV-FbsFont-PublicApi.script +//! @SYMTestCaseDesc CFbsFont::IsOpenFont() test +//! Uses API elements: IsOpenFont() +//! @SYMTestActions 1. Create FBS session +//! 2. Create FBS typeface store +//! 3. Creates several instances of CFbsFont class for different fonts +//! obtaining them from FBS typeface store +//! 4. Call their CFbsFont::IsOpenFont() method +//! @SYMTestStatus Implemented +//! @SYMTestPriority Critical +//! @SYMTestExpectedResults The function IsOpenFont() doesn't cause panic. +//! @SYMTestType CIT + START_TEST_BLOCK 100 T_FBServAPI \graphics\GRAPHICS-FBSERV-FbsFont-PublicApi.ini + CREATE_OBJECT RFbsSession RFbsSession1 + CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1 + CREATE_OBJECT CFbsFont CFbsFont1 + CREATE_OBJECT CFbsFont CFbsFont2 + COMMAND RFbsSession1 Connect + COMMAND CFbsTypefaceStore1 NewL + COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0009-001-GetNearestFontToDesignHeightInPixels_command004 + COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0009-001-GetNearestFontToDesignHeightInPixels_command005 + COMMAND CFbsFont1 IsOpenFont + COMMAND CFbsFont2 IsOpenFont + COMMAND CFbsTypefaceStore1 ~ + COMMAND RFbsSession1 Disconnect + END_TEST_BLOCK +END_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0009 + + + +START_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0011 +//! @SYMTestCaseID GRAPHICS-FBSERV-FbsFont-PublicApi-0011 +//! @SYMAPI CFbsFont +//! @SYMAuthor Anton Golovko +//! @SYMCreationDate 27/03/2006 +//! @SYMTestCaseDependencies setup-GRAPHICS-FBSERV-FbsFont-PublicApi.script +//! @SYMTestCaseDesc Simple test of font metrics related methods inherited from CFont +//! Uses API elements: FontCapitalAscent(), FontMaxAscent(), FontStandardDescent(), FontMaxDescent(), FontLineGap(), +//! FontMaxHeight(), TypeUid(), HeightInPixels(), AscentInPixels(), DescentInPixels(), CharWidthInPixels(), +//! TextCount(), MaxCharWidthInPixels(), MaxNormalCharWidthInPixels(), FontSpecInTwips(), +//! WidthZeroInPixels(), BaselineOffsetInPixels() +//! @SYMTestActions 1. Create FBS session +//! 2. Create FBS typeface store +//! 3. Create a CFbsFont (Arial, 12px) class instance obtaining it from FBS typeface store +//! 4. Call FontCapitalAscent() +//! 5. Call FontMaxAscent() +//! 6. Call FontStandardDescent() +//! 7. Call FontMaxDescent() +//! 8. Call FontLineGap() +//! 9. Call FontMaxHeight() +//! 10. Call TypeUid() +//! 11. Call HeightInPixels() +//! 12. Call AscentInPixels() +//! 13. Call DescentInPixels() +//! 14. Call CharWidthInPixels() passing 'a' as an argument +//! 15. Call TextCount() with "a" and 100, check that the retuned value is 1 +//! 16. Call TextCount() with "abcdf", 30 and a excessWidthInPixels variable as arguments, check that returned value +//! and aExcessWidthInPixels are greater that 0 +//! 17. Call MaxCharWidthInPixels() +//! 18. Call MaxNormalCharWidthInPixels() +//! 19. Call FontSpecInTwips() +//! 20. Call WidthZeroInPixels() +//! 21. Call BaselineOffsetInPixels() +//! @SYMTestStatus Implemented +//! @SYMTestPriority Critical +//! @SYMTestExpectedResults Expects the operations not to cause panic and returned values of the methods to be greater than 0 +//! @SYMTestType CIT + START_TEST_BLOCK 100 T_FBServAPI \graphics\GRAPHICS-FBSERV-FbsFont-PublicApi.ini + CREATE_OBJECT RFbsSession RFbsSession1 + CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1 + CREATE_OBJECT CFbsFont CFbsFont1 + COMMAND RFbsSession1 Connect + COMMAND CFbsTypefaceStore1 NewL + COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0011-001-GetNearestFontToDesignHeightInPixels_command004 + COMMAND CFbsFont1 FontCapitalAscent + COMMAND CFbsFont1 FontMaxAscent + COMMAND CFbsFont1 FontStandardDescent + COMMAND CFbsFont1 FontMaxDescent + COMMAND CFbsFont1 FontLineGap + COMMAND CFbsFont1 FontMaxHeight + COMMAND CFbsFont1 TypeUid + COMMAND CFbsFont1 HeightInPixels + COMMAND CFbsFont1 AscentInPixels + COMMAND CFbsFont1 DescentInPixels + COMMAND CFbsFont1 CharWidthInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0011-001-CharWidthInPixels_command016 + COMMAND CFbsFont1 TextCount GRAPHICS-FBSERV-FbsFont-PublicApi-0011-001-TextCount_command017 + COMMAND CFbsFont1 TextCount GRAPHICS-FBSERV-FbsFont-PublicApi-0011-001-TextCount_command018 + COMMAND CFbsFont1 MaxCharWidthInPixels + COMMAND CFbsFont1 MaxNormalCharWidthInPixels + COMMAND CFbsFont1 FontSpecInTwips + COMMAND CFbsFont1 WidthZeroInPixels + COMMAND CFbsFont1 BaselineOffsetInPixels + COMMAND CFbsTypefaceStore1 ~ + COMMAND RFbsSession1 Disconnect + END_TEST_BLOCK +END_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0011 + + +START_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0012 +//! @SYMTestCaseID GRAPHICS-FBSERV-FbsFont-PublicApi-0012 +//! @SYMAPI CFbsFont +//! @SYMAuthor Anton Golovko +//! @SYMCreationDate 28/03/2006 +//! @SYMTestCaseDependencies setup-GRAPHICS-FBSERV-FbsFont-PublicApi.script +//! @SYMTestCaseDesc CFbsFont::GetCharacterData() test +//! Uses API elements: GetCharacterData() +//! @SYMTestActions 1. Create FBS session +//! 2. Create FBS typeface store +//! 3. Create a CFbsFont (Arial, 12px) class instance obtaining it from FBS typeface store +//! 4. Call GetCharacterData() passing code 65 ('a') as an argument +//! @SYMTestStatus Implemented +//! @SYMTestPriority Critical +//! @SYMTestExpectedResults Expects the GetCharacterData() function call not to cause panic and that passed arguments are set to meaningful values +//! @SYMTestType CIT + START_TEST_BLOCK 100 T_FBServAPI \graphics\GRAPHICS-FBSERV-FbsFont-PublicApi.ini + CREATE_OBJECT RFbsSession RFbsSession1 + CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1 + CREATE_OBJECT CFbsFont CFbsFont1 + COMMAND RFbsSession1 Connect + COMMAND CFbsTypefaceStore1 NewL + COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0012-001-GetNearestFontToDesignHeightInPixels_command004 + COMMAND CFbsFont1 GetCharacterData GRAPHICS-FBSERV-FbsFont-PublicApi-0012-001-GetCharacterData_command006 + COMMAND CFbsTypefaceStore1 ~ + COMMAND RFbsSession1 Disconnect + END_TEST_BLOCK +END_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0012 + + +START_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0013 +//! @SYMTestCaseID GRAPHICS-FBSERV-FbsFont-PublicApi-0013 +//! @SYMAPI CFbsFont +//! @SYMAuthor Anton Golovko +//! @SYMCreationDate 28/03/2006 +//! @SYMTestCaseDependencies setup-GRAPHICS-FBSERV-FbsFont-PublicApi.script +//! @SYMTestCaseDesc CFbsFont::MeasureText() test +//! Uses API elements: MeasureText() +//! @SYMTestActions 1. Create FBS session +//! 2. Create FBS typeface store +//! 3. Create a CFbsFont (Arial, 12px) class instance obtaining it from FBS typeface store +//! 4. Call MeasureText() passing only a descriptor "a" as an argument +//! @SYMTestStatus Implemented +//! @SYMTestPriority Critical +//! @SYMTestExpectedResults Expects the MeasureText() function call not to cause panic and returned value to be greater that 0 +//! @SYMTestType CIT + START_TEST_BLOCK 100 T_FBServAPI \graphics\GRAPHICS-FBSERV-FbsFont-PublicApi.ini + CREATE_OBJECT RFbsSession RFbsSession1 + CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1 + CREATE_OBJECT CFbsFont CFbsFont1 + CREATE_OBJECT TMeasureTextInput TMeasureTextInput1 + CREATE_OBJECT TMeasureTextOutput TMeasureTextOutput1 + COMMAND RFbsSession1 Connect + COMMAND CFbsTypefaceStore1 NewL + COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0013-001-GetNearestFontToDesignHeightInPixels_command004 + COMMAND TMeasureTextOutput1 new + COMMAND TMeasureTextInput1 new + COMMAND CFbsFont1 MeasureText GRAPHICS-FBSERV-FbsFont-PublicApi-0013-001-MeasureText_command010 + COMMAND CFbsTypefaceStore1 ~ + COMMAND RFbsSession1 Disconnect + COMMAND TMeasureTextInput1 ~ + COMMAND TMeasureTextOutput1 ~ + END_TEST_BLOCK +END_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0013 + + +START_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0014 +//! @SYMTestCaseID GRAPHICS-FBSERV-FbsFont-PublicApi-0014 +//! @SYMAPI CFbsFont +//! @SYMAuthor Anton Golovko +//! @SYMCreationDate 28/03/2006 +//! @SYMTestCaseDependencies setup-GRAPHICS-FBSERV-FbsFont-PublicApi.script +//! @SYMTestCaseDesc CFbsFont::ExtendedFunction() test +//! Uses API elements: ExtendedFunction() +//! @SYMTestActions 1. Create FBS session +//! 2. Create FBS typeface store +//! 3. Create a CFbsFont (Arial, 12px) class instance obtaining it from FBS typeface store +//! 4. Call font's ExtendedFunction() passing KFontCapitalAscent (0x1020498E defined in GDI.H) as a parameter +//! @SYMTestStatus Implemented +//! @SYMTestPriority Critical +//! @SYMTestExpectedResults Expects the ExtendedFunction() call not to cause panic and returned value to be greater than 0 +//! @SYMTestType CIT + START_TEST_BLOCK 100 T_FBServAPI \graphics\GRAPHICS-FBSERV-FbsFont-PublicApi.ini + CREATE_OBJECT RFbsSession RFbsSession1 + CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1 + CREATE_OBJECT CFbsFont CFbsFont1 + COMMAND RFbsSession1 Connect + COMMAND CFbsTypefaceStore1 NewL + COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0014-001-GetNearestFontToDesignHeightInPixels_command004 + COMMAND CFbsFont1 ExtendedFunction GRAPHICS-FBSERV-FbsFont-PublicApi-0014-001-ExtendedFunction_command006 + COMMAND CFbsTypefaceStore1 ~ + COMMAND RFbsSession1 Disconnect + END_TEST_BLOCK +END_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0014 + + +START_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0017 +//! @SYMTestCaseID GRAPHICS-FBSERV-FbsFont-PublicApi-0017 +//! @SYMAPI CFbsFont +//! @SYMAuthor Anton Golovko +//! @SYMCreationDate 31/05/2006 +//! @SYMTestCaseDependencies setup-GRAPHICS-FBSERV-FbsFont-PublicApi.script +//! @SYMTestCaseDesc CFbsFont::TextWidthInPixels() test with an empty string +//! Uses API elements: TextWidthInPixels() +//! @SYMTestActions 1. Create FBS session +//! 2. Create FBS typeface store +//! 3. Creates a CFbsFont class instance obtaining it from FBS typeface store +//! 4. Call TextWidthInPixels(const TDesC&) method passing descriptor "" +//! @SYMTestStatus Implemented +//! @SYMTestPriority Critical +//! @SYMTestExpectedResults The function TextWidthInPixels() doesn't cause panic. +//! @SYMTestType CIT + START_TEST_BLOCK 100 T_FBServAPI \graphics\GRAPHICS-FBSERV-FbsFont-PublicApi.ini + CREATE_OBJECT RFbsSession RFbsSession1 + CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1 + CREATE_OBJECT CFbsFont CFbsFont1 + COMMAND RFbsSession1 Connect + COMMAND CFbsTypefaceStore1 NewL + COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0017-001-GetNearestFontToDesignHeightInPixels_command004 + COMMAND CFbsFont1 TextWidthInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0017-001-TextWidthInPixels_command006 + COMMAND CFbsTypefaceStore1 ~ + COMMAND RFbsSession1 Disconnect + END_TEST_BLOCK +END_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0017 + + +START_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0018 +//! @SYMTestCaseID GRAPHICS-FBSERV-FbsFont-PublicApi-0018 +//! @SYMAPI CFbsFont +//! @SYMAuthor Anton Golovko +//! @SYMCreationDate 31/05/2006 +//! @SYMTestCaseDependencies setup-GRAPHICS-FBSERV-FbsFont-PublicApi.script +//! @SYMTestCaseDesc CFbsFont::RawTextWidthInPixels() test with an empty string +//! Uses API elements: RawTextWidthInPixels() +//! @SYMTestActions 1. Create FBS session +//! 2. Create FBS typeface store +//! 3. Creates a CFbsFont class instance obtaining it from FBS typeface store +//! 4. Call RawTextWidthInPixels() method passing descriptor "" +//! @SYMTestStatus Implemented +//! @SYMTestPriority Critical +//! @SYMTestExpectedResults The function RawTextWidthInPixels() doesn't cause panic. +//! @SYMTestType CIT + START_TEST_BLOCK 100 T_FBServAPI \graphics\GRAPHICS-FBSERV-FbsFont-PublicApi.ini + CREATE_OBJECT RFbsSession RFbsSession1 + CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1 + CREATE_OBJECT CFbsFont CFbsFont1 + COMMAND RFbsSession1 Connect + COMMAND CFbsTypefaceStore1 NewL + COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0018-001-GetNearestFontToDesignHeightInPixels_command004 + COMMAND CFbsFont1 RawTextWidthInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0018-001-RawTextWidthInPixels_command006 + COMMAND CFbsTypefaceStore1 ~ + COMMAND RFbsSession1 Disconnect + END_TEST_BLOCK +END_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0018 + + +START_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0019 +//! @SYMTestCaseID GRAPHICS-FBSERV-FbsFont-PublicApi-0019 +//! @SYMAPI CFbsFont +//! @SYMAuthor Anton Golovko +//! @SYMCreationDate 31/05/2006 +//! @SYMTestCaseDependencies setup-GRAPHICS-FBSERV-FbsFont-PublicApi.script +//! @SYMTestCaseDesc CFbsFont::HasCharacter() test for negative character code +//! Uses API elements: HasCharacter() +//! @SYMTestActions 1. Create FBS session +//! 2. Create FBS typeface store +//! 3. Creates a CFbsFont class instance (for an Open Font) obtaining it from FBS typeface store +//! 4. Call CFbsFont::HasCharacter() method passign code -1 as an argument +//! @SYMTestStatus Implemented +//! @SYMTestPriority Critical +//! @SYMTestExpectedResults The function HasCharacter() doesn't cause panic. +//! @SYMTestType CIT + START_TEST_BLOCK 100 T_FBServAPI \graphics\GRAPHICS-FBSERV-FbsFont-PublicApi.ini + CREATE_OBJECT RFbsSession RFbsSession1 + CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1 + CREATE_OBJECT CFbsFont CFbsFont1 + COMMAND RFbsSession1 Connect + COMMAND CFbsTypefaceStore1 NewL + COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0019-001-GetNearestFontToDesignHeightInPixels_command004 + COMMAND CFbsFont1 HasCharacter GRAPHICS-FBSERV-FbsFont-PublicApi-0019-001-HasCharacter_command006 + COMMAND CFbsTypefaceStore1 ~ + COMMAND RFbsSession1 Disconnect + END_TEST_BLOCK +END_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0019 + + +START_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0020 +//! @SYMTestCaseID GRAPHICS-FBSERV-FbsFont-PublicApi-0020 +//! @SYMAPI CFbsFont +//! @SYMAuthor Anton Golovko +//! @SYMCreationDate 31/05/2006 +//! @SYMTestCaseDependencies setup-GRAPHICS-FBSERV-FbsFont-PublicApi.script +//! @SYMTestCaseDesc CFbsFont::CharWidthInPixels() test with 0 as character code +//! Uses API elements: CharWidthInPixels() +//! @SYMTestActions 1. Create FBS session +//! 2. Create FBS typeface store +//! 3. Create a CFbsFont (Arial, 12px) class instance obtaining it from FBS typeface store +//! 4. Call CharWidthInPixels() passing char with code 0 as an argument +//! @SYMTestStatus Implemented +//! @SYMTestPriority Critical +//! @SYMTestExpectedResults The function CharWidthInPixels() doesn't cause panic. +//! @SYMTestType CIT + START_TEST_BLOCK 100 T_FBServAPI \graphics\GRAPHICS-FBSERV-FbsFont-PublicApi.ini + CREATE_OBJECT RFbsSession RFbsSession1 + CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1 + CREATE_OBJECT CFbsFont CFbsFont1 + COMMAND RFbsSession1 Connect + COMMAND CFbsTypefaceStore1 NewL + COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0020-001-GetNearestFontToDesignHeightInPixels_command004 + COMMAND CFbsFont1 CharWidthInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0020-001-CharWidthInPixels_command006 + COMMAND CFbsTypefaceStore1 ~ + COMMAND RFbsSession1 Disconnect + END_TEST_BLOCK +END_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0020 + + +START_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0021 +//! @SYMTestCaseID GRAPHICS-FBSERV-FbsFont-PublicApi-0021 +//! @SYMAPI CFbsFont +//! @SYMAuthor Anton Golovko +//! @SYMCreationDate 31/05/2006 +//! @SYMTestCaseDependencies setup-GRAPHICS-FBSERV-FbsFont-PublicApi.script +//! @SYMTestCaseDesc CFbsFont::TextCount() (TextCount(const TDesC &aText, TInt aWidthInPixels) version) test with negative argument in place of width in pexils +//! Uses API elements: TextCount() +//! @SYMTestActions 1. Create FBS session +//! 2. Create FBS typeface store +//! 3. Create a CFbsFont (Arial, 12px) class instance obtaining it from FBS typeface store +//! 4. Call TextCount() passing text "qwerty" and width -1 +//! @SYMTestStatus Implemented +//! @SYMTestPriority Critical +//! @SYMTestExpectedResults The function TextCount() doesn't cause panic. +//! @SYMTestType CIT + START_TEST_BLOCK 100 T_FBServAPI \graphics\GRAPHICS-FBSERV-FbsFont-PublicApi.ini + CREATE_OBJECT RFbsSession RFbsSession1 + CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1 + CREATE_OBJECT CFbsFont CFbsFont1 + COMMAND RFbsSession1 Connect + COMMAND CFbsTypefaceStore1 NewL + COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0021-001-GetNearestFontToDesignHeightInPixels_command004 + COMMAND CFbsFont1 TextCount GRAPHICS-FBSERV-FbsFont-PublicApi-0021-001-TextCount_command006 + COMMAND CFbsTypefaceStore1 ~ + COMMAND RFbsSession1 Disconnect + END_TEST_BLOCK +END_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0021 + + +START_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0022 +//! @SYMTestCaseID GRAPHICS-FBSERV-FbsFont-PublicApi-0022 +//! @SYMAPI CFbsFont +//! @SYMAuthor Anton Golovko +//! @SYMCreationDate 31/05/2006 +//! @SYMTestCaseDependencies setup-GRAPHICS-FBSERV-FbsFont-PublicApi.script +//! @SYMTestCaseDesc CFbsFont::TextCount() (TextCount(const TDesC &aText, TInt aWidthInPixels) version) test with 0 argument in place of width in pexils and empty string +//! Uses API elements: TextCount() +//! @SYMTestActions 1. Create FBS session +//! 2. Create FBS typeface store +//! 3. Create a CFbsFont (Arial, 12px) class instance obtaining it from FBS typeface store +//! 4. Call TextCount() passing text "" and width 0 +//! @SYMTestStatus Implemented +//! @SYMTestPriority Critical +//! @SYMTestExpectedResults The function TextCount() doesn't cause panic. +//! @SYMTestType CIT + START_TEST_BLOCK 100 T_FBServAPI \graphics\GRAPHICS-FBSERV-FbsFont-PublicApi.ini + CREATE_OBJECT RFbsSession RFbsSession1 + CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1 + CREATE_OBJECT CFbsFont CFbsFont1 + COMMAND RFbsSession1 Connect + COMMAND CFbsTypefaceStore1 NewL + COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0022-001-GetNearestFontToDesignHeightInPixels_command004 + COMMAND CFbsFont1 TextCount GRAPHICS-FBSERV-FbsFont-PublicApi-0022-001-TextCount_command006 + COMMAND CFbsTypefaceStore1 ~ + COMMAND RFbsSession1 Disconnect + END_TEST_BLOCK +END_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0022 + + +START_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0023 +//! @SYMTestCaseID GRAPHICS-FBSERV-FbsFont-PublicApi-0023 +//! @SYMAPI CFbsFont +//! @SYMAuthor Anton Golovko +//! @SYMCreationDate 31/05/2006 +//! @SYMTestCaseDependencies setup-GRAPHICS-FBSERV-FbsFont-PublicApi.script +//! @SYMTestCaseDesc CFbsFont::TextCount() (TextCount(const TDesC &aText, TInt aWidthInPixels, TInt &aExcessWidthInPixels) version) test with negative argument in place of width in pexils +//! Uses API elements: TextCount() +//! @SYMTestActions 1. Create FBS session +//! 2. Create FBS typeface store +//! 3. Create a CFbsFont (Arial, 12px) class instance obtaining it from FBS typeface store +//! 4. Call TextCount() passing text "qwerty" and width -1 +//! @SYMTestStatus Implemented +//! @SYMTestPriority Critical +//! @SYMTestExpectedResults The function TextCount() doesn't cause panic. +//! @SYMTestType CIT + START_TEST_BLOCK 100 T_FBServAPI \graphics\GRAPHICS-FBSERV-FbsFont-PublicApi.ini + CREATE_OBJECT RFbsSession RFbsSession1 + CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1 + CREATE_OBJECT CFbsFont CFbsFont1 + COMMAND RFbsSession1 Connect + COMMAND CFbsTypefaceStore1 NewL + COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0023-001-GetNearestFontToDesignHeightInPixels_command004 + COMMAND CFbsFont1 TextCount GRAPHICS-FBSERV-FbsFont-PublicApi-0023-001-TextCount_command006 + COMMAND CFbsTypefaceStore1 ~ + COMMAND RFbsSession1 Disconnect + END_TEST_BLOCK +END_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0023 + + +START_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0024 +//! @SYMTestCaseID GRAPHICS-FBSERV-FbsFont-PublicApi-0024 +//! @SYMAPI CFbsFont +//! @SYMAuthor Anton Golovko +//! @SYMCreationDate 31/05/2006 +//! @SYMTestCaseDependencies setup-GRAPHICS-FBSERV-FbsFont-PublicApi.script +//! @SYMTestCaseDesc CFbsFont::TextCount() (TextCount(const TDesC &aText, TInt aWidthInPixels, TInt &aExcessWidthInPixels) version) test with 0 argument in place of width in pexils and empty string +//! Uses API elements: TextCount() +//! @SYMTestActions 1. Create FBS session +//! 2. Create FBS typeface store +//! 3. Create a CFbsFont (Arial, 12px) class instance obtaining it from FBS typeface store +//! 4. Call TextCount() passing text "" and width 0 +//! @SYMTestStatus Implemented +//! @SYMTestPriority Critical +//! @SYMTestExpectedResults The function TextCount() doesn't cause panic. +//! @SYMTestType CIT + START_TEST_BLOCK 100 T_FBServAPI \graphics\GRAPHICS-FBSERV-FbsFont-PublicApi.ini + CREATE_OBJECT RFbsSession RFbsSession1 + CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1 + CREATE_OBJECT CFbsFont CFbsFont1 + COMMAND RFbsSession1 Connect + COMMAND CFbsTypefaceStore1 NewL + COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0024-001-GetNearestFontToDesignHeightInPixels_command004 + COMMAND CFbsFont1 TextCount GRAPHICS-FBSERV-FbsFont-PublicApi-0024-001-TextCount_command006 + COMMAND CFbsTypefaceStore1 ~ + COMMAND RFbsSession1 Disconnect + END_TEST_BLOCK +END_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0024 + + +START_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0025 +//! @SYMTestCaseID GRAPHICS-FBSERV-FbsFont-PublicApi-0025 +//! @SYMAPI CFbsFont +//! @SYMAuthor Anton Golovko +//! @SYMCreationDate 31/05/2006 +//! @SYMTestCaseDependencies setup-GRAPHICS-FBSERV-FbsFont-PublicApi.script +//! @SYMTestCaseDesc CFbsFont::GetCharacterData() test with 0 as a character code +//! Uses API elements: GetCharacterData() +//! @SYMTestActions 1. Create FBS session +//! 2. Create FBS typeface store +//! 3. Create a CFbsFont (Arial, 12px) class instance obtaining it from FBS typeface store +//! 4. Call GetCharacterData() passing code 0 as an argument +//! @SYMTestStatus Implemented +//! @SYMTestPriority Critical +//! @SYMTestExpectedResults The function GetCharacterData() doesn't cause panic. +//! @SYMTestType CIT + START_TEST_BLOCK 100 T_FBServAPI \graphics\GRAPHICS-FBSERV-FbsFont-PublicApi.ini + CREATE_OBJECT RFbsSession RFbsSession1 + CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1 + CREATE_OBJECT CFbsFont CFbsFont1 + COMMAND RFbsSession1 Connect + COMMAND CFbsTypefaceStore1 NewL + COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-FBSERV-FbsFont-PublicApi-0025-001-GetNearestFontToDesignHeightInPixels_command004 + COMMAND CFbsFont1 GetCharacterData GRAPHICS-FBSERV-FbsFont-PublicApi-0025-001-GetCharacterData_command006 + COMMAND CFbsTypefaceStore1 ~ + COMMAND RFbsSession1 Disconnect + END_TEST_BLOCK +END_TESTCASE GRAPHICS-FBSERV-FbsFont-PublicApi-0025 + +