graphicsapitest/graphicssvs/bitgdi/scripts/GRAPHICS-BITGDI-FbsBitGcFont-PublicApi.script
//
// Copyright (c) 2005-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-BITGDI-FbsBitGcFont-PublicApi
//! @SYMScriptTestEnvironment
/////////////////////////////////////////////////////////////////////
// GRAPHICS-BITGDI-FbsBitGcFont-PublicApi.script
//
// Tests all public elements of the CFbsBitGcFont
// classes as a means of confidence that the APIs work as expected.
//
// The purpose is to provide a regression test suite of PublishedAll APIs for CFbsBitGcFont
// The tests are fully automated.
/////////////////////////////////////////////////////////////////////
// ****************************************************************************
// Class Name CFbsBitGcFont
// ****************************************************************************
LOAD_SUITE T_GraphicsBitgdiApi
DELAY 1000
START_TESTCASE GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0001
//! @SYMTestCaseID GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0001
//! @SYMAPI CFbsBitGcFont::CFbsBitGcFont()
//! @SYMAuthor Wei Liu
//! @SYMCreationDate 20/01/2009
//! @SYMTestCaseDesc Create the CFbsBitGcFont Object by CFbsBitGcFont() function.
//! @SYMTestActions 1. Create a RFbsSession object and connect it.
//! 2. Create a CFbsBitGcFont object by default constructor.
//! 3. Disconnect RFbsSession.
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults CFbsBitGcFont Object is created by default construction function without any error.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsBitgdiApi \graphics\GRAPHICS-BITGDI-FbsBitGcFont-PublicApi.ini
CREATE_OBJECT RFbsSession FbsSession
CREATE_OBJECT CFbsBitGcFont FbsBitGcFont
COMMAND FbsSession Connect
COMMAND FbsBitGcFont NewL
COMMAND FbsSession Disconnect
END_TEST_BLOCK
END_TESTCASE GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0001
START_TESTCASE GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0002
//! @SYMTestCaseID GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0002
//! @SYMAPI CFbsBitGcFont::~CFbsBitGcFont()
//! @SYMAuthor Wei Liu
//! @SYMCreationDate 20/01/2009
//! @SYMTestCaseDesc Delete the CFbsBitGcFont Object by default distructor function.
//! @SYMTestActions 1. Create a RFbsSession object and connect it.
//! 2. Create a CFbsBitGcFont object by default construction.
//! 3. Delete a CFbsBitGcFont object by default distruction.
//! 4. Disconnect RFbsSession.
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults CFbsBitGcFont Object is deleted by default distruction function without any error.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsBitgdiApi \graphics\GRAPHICS-BITGDI-FbsBitGcFont-PublicApi.ini
CREATE_OBJECT RFbsSession FbsSession
CREATE_OBJECT CFbsBitGcFont FbsBitGcFont
COMMAND FbsSession Connect
COMMAND FbsBitGcFont NewL
COMMAND FbsBitGcFont ~
COMMAND FbsSession Disconnect
END_TEST_BLOCK
END_TESTCASE GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0002
START_TESTCASE GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0003
//! @SYMTestCaseID GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0003
//! @SYMAPI CFbsBitGcFont::Address() const
//! @SYMAuthor Wei Liu
//! @SYMCreationDate 20/01/2009
//! @SYMTestCaseDesc Get the Address pointer from the CFbsBitGcFont::Address() function.
//! @SYMTestActions 1. Create a RFbsSession object and connect it.
//! 2. Create CFbsTypefaceStore.
//! 3. Get the FbsBitGcFont Object from CFbsTypefaceStore object.
//! 4. Get the Address pointer from Address().
//! 5. Delete all the objects.
//! 6. Disconnect RFbsSession.
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults The address pointer is received without any error.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsBitgdiApi \graphics\GRAPHICS-BITGDI-FbsBitGcFont-PublicApi.ini
CREATE_OBJECT RFbsSession FbsSession
CREATE_OBJECT CFbsBitGcFont FbsBitGcFont
CREATE_OBJECT CFbsTypefaceStore FbsTypefaceStore
COMMAND FbsSession Connect
COMMAND FbsTypefaceStore NewL
COMMAND FbsTypefaceStore GetNearestFontToDesignHeightInPixels GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0003-GetNearestFontToDesignHeightInPixels_command03
COMMAND FbsBitGcFont Address
COMMAND FbsTypefaceStore ~
COMMAND FbsSession Disconnect
END_TEST_BLOCK
END_TESTCASE GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0003
START_TESTCASE GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0004
//! @SYMTestCaseID GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0004
//! @SYMAPI CFbsBitGcFont::Duplicate(TInt)
//! @SYMAuthor Wei Liu
//! @SYMCreationDate 20/01/2009
//! @SYMTestCaseDesc Duplicates a font by CFbsBitGcFont::Duplicate(TInt) function.
//! @SYMTestActions 1. Create a RFbsSession object and connect it.
//! 2. Create 2 FbsBitGcFont Objects.
//! 3. Create CFbsTypefaceStore.
//! 4. Get the FbsBitGcFont Object from CFbsTypefaceStore object.
//! 5. Get the FbsBitGcFont2 Object from CFbsTypefaceStore object.
//! 6. Duplicate the font in the FbsBitGcFont Object.
//! 7. Delete all the objects.
//! 8. Disconnect RFbsSession.
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults Duplicate function is called without any error.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsBitgdiApi \graphics\GRAPHICS-BITGDI-FbsBitGcFont-PublicApi.ini
CREATE_OBJECT RFbsSession FbsSession
CREATE_OBJECT CFbsBitGcFont FbsBitGcFont
CREATE_OBJECT CFbsBitGcFont FbsBitGcFont2
CREATE_OBJECT CFbsTypefaceStore FbsTypefaceStore
COMMAND FbsSession Connect
COMMAND FbsTypefaceStore NewL
COMMAND FbsTypefaceStore GetNearestFontToDesignHeightInPixels GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0004-GetNearestFontToDesignHeightInPixels_command03
COMMAND FbsTypefaceStore GetNearestFontToDesignHeightInPixels GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0004-GetNearestFontToDesignHeightInPixels_command04
COMMAND FbsBitGcFont Duplicate GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0004-Duplicate_command05
COMMAND FbsTypefaceStore ~
COMMAND FbsSession Disconnect
END_TEST_BLOCK
END_TESTCASE GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0004
START_TESTCASE GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0005
//! @SYMTestCaseID GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0005
//! @SYMAPI CFbsBitGcFont::Duplicate(TInt)
//! @SYMAuthor Wei Liu
//! @SYMCreationDate 20/01/2009
//! @SYMTestCaseDesc Negative case, Duplicates a font by using bad handle.
//! @SYMTestActions 1. Create a RFbsSession object and connect it.
//! 2. Create a FbsBitGcFont Objects.
//! 3. Create CFbsTypefaceStore.
//! 4. Get the FbsBitGcFont Object from CFbsTypefaceStore object.
//! 5. Duplicate the font using a bad handle.
//! 7. Delete all the objects.
//! 8. Disconnect RFbsSession.
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults KErrUnknown error will occur.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsBitgdiApi \graphics\GRAPHICS-BITGDI-FbsBitGcFont-PublicApi.ini
CREATE_OBJECT RFbsSession FbsSession
CREATE_OBJECT CFbsBitGcFont FbsBitGcFont
CREATE_OBJECT CFbsTypefaceStore FbsTypefaceStore
COMMAND FbsSession Connect
COMMAND FbsTypefaceStore NewL
COMMAND FbsTypefaceStore GetNearestFontToDesignHeightInPixels GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0005-GetNearestFontToDesignHeightInPixels_command03
COMMAND !Error=-19 FbsBitGcFont Duplicate GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0005-Duplicate_command04
COMMAND FbsTypefaceStore ~
COMMAND FbsSession Disconnect
END_TEST_BLOCK
END_TESTCASE GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0005
START_TESTCASE GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0006
//! @SYMTestCaseID GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0006
//! @SYMAPI CFbsBitGcFont::Reset() const
//! @SYMAuthor Wei Liu
//! @SYMCreationDate 20/01/2009
//! @SYMTestCaseDesc Resets to its default settings.
//! @SYMTestActions 1. Create a RFbsSession object and connect it.
//! 2. Create CFbsTypefaceStore.
//! 3. Get the FbsBitGcFont Object from CFbsTypefaceStore object.
//! 4. Reset the FbsBitGcFont Object.
//! 5. Delete all the objects.
//! 6. Disconnect RFbsSession.
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults The Reset function is called without any error.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsBitgdiApi \graphics\GRAPHICS-BITGDI-FbsBitGcFont-PublicApi.ini
CREATE_OBJECT RFbsSession FbsSession
CREATE_OBJECT CFbsBitGcFont FbsBitGcFont
CREATE_OBJECT CFbsTypefaceStore FbsTypefaceStore
COMMAND FbsSession Connect
COMMAND FbsTypefaceStore NewL
COMMAND FbsTypefaceStore GetNearestFontToDesignHeightInPixels GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0006-GetNearestFontToDesignHeightInPixels_command03
COMMAND FbsBitGcFont Reset
COMMAND FbsTypefaceStore ~
COMMAND FbsSession Disconnect
END_TEST_BLOCK
END_TESTCASE GRAPHICS-BITGDI-FbsBitGcFont-PublicApi-0006