os/graphics/fbs/fontandbitmapserver/trasterizer/test/trasterizerinvalid.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/fbs/fontandbitmapserver/trasterizer/test/trasterizerinvalid.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,74 @@
     1.4 +// Copyright (c) 2008-2009 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 +// trasterizerinvalid.h
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +#include "trasterizerinvalid.h"
    1.22 +
    1.23 +const TUid KUidInvalidInterface = {0xFFFFFFFF};
    1.24 +
    1.25 +CTRasterizerInvalid::CTRasterizerInvalid()
    1.26 +	{
    1.27 +	SetTestStepName(KTRasterizerInvalidStep);
    1.28 +	}
    1.29 +
    1.30 +/**
    1.31 +@SYMTestCaseID		
    1.32 +	GRAPHICS-FBSERV-RASTERIZER-010
    1.33 +
    1.34 +@SYMTestPriority
    1.35 +	Normal
    1.36 +
    1.37 +@SYMPREQ
    1.38 +	PREQ2096
    1.39 +
    1.40 +@SYMREQ
    1.41 +	REQ10860
    1.42 +	REQ10861 
    1.43 +	
    1.44 +@SYMTestCaseDesc
    1.45 +	Test that CFbsRasterizer::GetInterface() returns the correct error code when
    1.46 +	passed a non-existent interface UID.
    1.47 +
    1.48 +@SYMTestActions	
    1.49 +	Call CFbsRasterizer::GetInterface() with a UID of an interface that does not exist.
    1.50 +
    1.51 +@SYMTestExpectedResults
    1.52 +	CFbsRasterizer::GetInterface() should return KErrExtensionNotSupported.
    1.53 +	The pointer to the in/out interface parameter should be set to NULL.
    1.54 +*/
    1.55 +void CTRasterizerInvalid::TestGetInterfaceL()
    1.56 +	{
    1.57 +	INFO_PRINTF1(_L("TestGetInterface"));		
    1.58 +	
    1.59 +	// Get the example rasterizer
    1.60 +	GetExampleRasterizerL();
    1.61 +	
    1.62 +	TAny* interfaceRet;
    1.63 +	TInt err = iRasterizer->GetInterface(KUidInvalidInterface, interfaceRet);
    1.64 +	TESTL(err == KErrExtensionNotSupported);
    1.65 +	TESTL(interfaceRet == NULL);
    1.66 +	}
    1.67 +
    1.68 +/**
    1.69 +Override of base class pure virtual
    1.70 +Lists the tests to be run
    1.71 +*/
    1.72 +TVerdict CTRasterizerInvalid::doTestStepL()
    1.73 +	{		
    1.74 +	TestGetInterfaceL();
    1.75 +	
    1.76 +	return TestStepResult();
    1.77 +	}