kerneltest/e32test/power/t_switchoff.cpp
changeset 286 48e57fb1237e
parent 0 a41df078684a
equal deleted inserted replaced
285:ff5437e4337c 286:48e57fb1237e
     1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Eclipse Public License v1.0"
     4 // under the terms of the License "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    13 // Description:
    13 // Description:
    14 // e32test\power\t_switchoff.cpp
    14 // e32test\power\t_switchoff.cpp
    15 // 
    15 // 
    16 //
    16 //
    17 
    17 
       
    18 #define __E32TEST_EXTENSION__
       
    19 
    18 #include <e32event.h>
    20 #include <e32event.h>
    19 #include <e32event_private.h>
    21 #include <e32event_private.h>
    20 #include <e32svr.h>
    22 #include <e32svr.h>
    21 #include <e32test.h>
    23 #include <e32test.h>
       
    24 #include "testexclusions.h"
    22 
    25 
    23 LOCAL_D RTest test(_L(" T_SWITCHOFF "));
    26 LOCAL_D RTest test(_L(" T_SWITCHOFF "));
    24 
    27 
    25 void SetAbsoluteTimeout(RTimer& aTimer, TUint aUs, TRequestStatus& aStatus)
    28 void SetAbsoluteTimeout(RTimer& aTimer, TUint aUs, TRequestStatus& aStatus)
    26 	{
    29 	{
    59 GLDEF_C TInt E32Main()
    62 GLDEF_C TInt E32Main()
    60 	{
    63 	{
    61 	test.Title();
    64 	test.Title();
    62 	test.Start(_L("Testing"));
    65 	test.Start(_L("Testing"));
    63 
    66 
       
    67 	TInt testExclusions = 0;
       
    68 	test_KErrNone(GetTestExclusionSettings(testExclusions));
       
    69 	
       
    70 	if (testExclusions & KDisableControllerShutdown)
       
    71 		{
       
    72 		UserSvr::HalFunction(EHalGroupPower, EPowerHalPowerManagerTestMode, (TAny*)KDisableControllerShutdown, NULL);
       
    73 		}
       
    74 	
       
    75 
    64 	SwittchOffTests();
    76 	SwittchOffTests();
    65 
    77 
    66 	test.End();
    78 	test.End();
    67 
    79 
    68 	return KErrNone;
    80 	return KErrNone;