systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_step_result_check.cpp
branchRCL_3
changeset 22 8cb079868133
parent 21 ccb4f6b3db21
equal deleted inserted replaced
21:ccb4f6b3db21 22:8cb079868133
     1 // Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2007-2009 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 "Eclipse Public License v1.0"
     4 // under the terms of "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".
    34 TVerdict CResultCheckStep::doTestStepL()
    34 TVerdict CResultCheckStep::doTestStepL()
    35 	{
    35 	{
    36 	TInt expectedResult = 0;
    36 	TInt expectedResult = 0;
    37 	TInt expectedRegisterCount = 0;
    37 	TInt expectedRegisterCount = 0;
    38 	TInt expectedRestartCount = 0;
    38 	TInt expectedRestartCount = 0;
    39 	TInt processArguments = 0;
       
    40 	if (!GetIntFromConfig(ConfigSection(), KTSysMonServerExpectedResult, expectedResult) ||
    39 	if (!GetIntFromConfig(ConfigSection(), KTSysMonServerExpectedResult, expectedResult) ||
    41 		!GetIntFromConfig(ConfigSection(), KTSysMonServerExpectedRegisterCount, expectedRegisterCount) ||
    40 		!GetIntFromConfig(ConfigSection(), KTSysMonServerExpectedRegisterCount, expectedRegisterCount) ||
    42 		!GetIntFromConfig(ConfigSection(), KTSysMonServerExpectedRestartCount, expectedRestartCount) ||
    41 		!GetIntFromConfig(ConfigSection(), KTSysMonServerExpectedRestartCount, expectedRestartCount))
    43 		!GetIntFromConfig(ConfigSection(), KTSysMonServerProcessArguments, processArguments))
       
    44 		{
    42 		{
    45 		ERR_PRINTF1(_L("Error reading ini file data"));
    43 		ERR_PRINTF1(_L("Error reading ini file data"));
    46 		User::Leave(KErrNotFound);
    44 		User::Leave(KErrNotFound);
    47 		}
    45 		}
    48 
    46 
    49 	TInt actualResult = 0;
    47 	TInt actualResult = 0;
    50 	TInt actualRegisterCount = 0;
    48 	TInt actualRegisterCount = 0;
    51 	TInt actualRestartCount = 0;
    49 	TInt actualRestartCount = 0;
    52 	CSysMonTestHelper::GetResultIntL(ConfigSection(), actualResult);
    50 	CSysMonTestHelper::GetResultIntL(ConfigSection(), actualResult);
    53 	actualRegisterCount = CSysMonTestHelper::GetRegisterCount(processArguments);
    51 	actualRegisterCount = CSysMonTestHelper::GetRegisterCountL();
    54 	actualRestartCount = CSysMonTestHelper::GetRestartCountL();
    52 	actualRestartCount = CSysMonTestHelper::GetRestartCountL();
    55 
    53 
    56 	INFO_PRINTF2(_L("Actual result: %d"), actualResult);
    54 	INFO_PRINTF2(_L("Actual result: %d"), actualResult);
    57 	TEST(actualResult == expectedResult);
    55 	TEST(actualResult == expectedResult);
    58 	INFO_PRINTF2(_L("Actual register count: %d"), actualRegisterCount);
    56 	INFO_PRINTF2(_L("Actual register count: %d"), actualRegisterCount);