Update contrib.
1 // Copyright (c) 2008-2009 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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // TDISPLAYCONFIGURATION.CPP
15 // Test class for TDisplayConfiguration
19 #include "wsdynamicresclassic.h"
20 #include <test/extendtef.h>
21 #include "teflogextensions.h"
25 TLoggerStub(CTestExecuteLogger& aLogger)
26 : iLogger(&aLogger) {}
27 CTestExecuteLogger* iLogger;
28 CTestExecuteLogger& operator()()const
34 // This handles any non-member uses of the extended ASSERT_XXX macros
35 void TefUnitFailLeaveL()
38 User::Leave(KErrTEFUnitFail);
41 // Create a suite of all the tests
42 CTestSuite* CWsDynamicResClassic::CreateSuiteL(const TDesC& aName)
44 SUB_SUITE_OPT(CWsDynamicResClassic,NULL);
46 ADD_THIS_TEST_STEP(GRAPHICS_WSERV_DYNAMICRES_0100L);
54 @SYMTestCaseID GRAPHICS_WSERV_DYNAMICRES_0100L
55 @SYMTestCaseDesc GetInterface in classic
60 @SYMTestPurpose GetInterface should always return NULL in classic
63 Create a CWsScreenDevice
64 Call GetInterface with various GUIDS.
65 @SYMTestExpectedResults
66 Should always return NULL
68 void CWsDynamicResClassic::GRAPHICS_WSERV_DYNAMICRES_0100L()
73 CWsScreenDevice* screenDevice = NULL;
75 TRAPD(err, screenDevice = new (ELeave) CWsScreenDevice(session));
76 PRINT_ON_ERROR2_L(err, _L("Failed to create screen device: %d"), err);
79 ASSERT_EQUALS_X(screenDevice->Construct(0), KErrNone);
81 void* interface = screenDevice->GetInterface(12344321);
82 ASSERT_NULL (interface);
83 interface = screenDevice->GetInterface(0);
84 ASSERT_NULL (interface);