本文整理汇总了C++中GetBoolFromConfig函数的典型用法代码示例。如果您正苦于以下问题:C++ GetBoolFromConfig函数的具体用法?C++ GetBoolFromConfig怎么用?C++ GetBoolFromConfig使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetBoolFromConfig函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetBoolFromConfig
/**
Function : ModifyDefaultSearchSortOptions
Description : Modifies the default values of TMsvSearchSortQuery object
@return : none
*/
void CT_MsgCreatePerfSearchSortQuery::ModifyDefaultSearchSortOptions()
{
// Set the wildcard cahracter option to be enabled or not
TBool wildcardSearch = EFalse;
GetBoolFromConfig(ConfigSection(), KWildcardSearch, wildcardSearch);
iSharedDataCommon.iSearchSortQuery->SetWildCardSearch(wildcardSearch);
// Set the whole word option to be enabled or not
TBool wholeWordOption = EFalse;
GetBoolFromConfig(ConfigSection(), KWholeWordOption, wholeWordOption);
iSharedDataCommon.iSearchSortQuery->SetWholeWord(wholeWordOption);
// Set the option for case sensitve/insensitive search option
TBool caseSensitiveFlag = EFalse;
GetBoolFromConfig(ConfigSection(), KCaseSensitive, caseSensitiveFlag);
iSharedDataCommon.iSearchSortQuery->SetCaseSensitiveOption(caseSensitiveFlag);
// Set the preferred result type flag, default value is TMsvId
TBool resInTMsvEntry = EFalse;
TMsvSearchSortResultType resultType = EMsvResultAsTMsvId;
GetBoolFromConfig(ConfigSection(), KResultAsTMsvEntry, resInTMsvEntry);
if(resInTMsvEntry)
{
resultType = EMsvResultAsTMsvEntry;
}
iSharedDataCommon.iSearchSortQuery->SetResultType(resultType);
// Set the subfolder search flag
TBool subfolderFlag = EFalse;
GetBoolFromConfig(ConfigSection(), KSubFolderSearch, subfolderFlag);
if(subfolderFlag)
{
iSharedDataCommon.iSearchSortQuery->SetSubFolderSearch(subfolderFlag);
}
}
示例2: GetStringFromConfig
TInt CTS_MultiHomingStep::GetResolverConfig(const TInt aIndex, TName &aHostName, TInt& aProtocol,
TBool& aExpectSuccess, TBool& aExpectTimeout, TBool& aExpectNotReady,
TBool& aExplicitResolve, TConnDetails **aConnDetails)
/**
* Gets resolver configuration from file, using defaults if necessary
* @param aIndex The index for the socket configkey
* @param aHostName The host to be resolved
* @param aProtocol The protocol to be used
* @param aExpectSuccess Flag indicating if name should be resolved ok
* @param aExpectTimeout Flag indicating if name resolution should timeout
* @param aConnDetails The connection for an explicit resolver
* @return System wide error code
*/
{
TInt err=KErrNone;
TName resolverName; // Create the Key for the config lookup
resolverName = KResolver;
resolverName.AppendNum(aIndex);
TPtrC ptrBuf;
err = GetStringFromConfig(resolverName, KDestName, ptrBuf);
if (!err)
{
LogExtra((TText8*)__FILE__, __LINE__, ESevrWarn, KEConfigFile);
iTestStepResult= EInconclusive;
return KErrNotFound;
}
aHostName.Copy(ptrBuf.Ptr(), ptrBuf.Length());
aExpectSuccess = ETrue;
GetBoolFromConfig(resolverName, KExpectSuccess, aExpectSuccess);
aExpectTimeout = EFalse;
GetBoolFromConfig(resolverName, KExpectTimeout, aExpectTimeout);
aExpectNotReady = EFalse;
GetBoolFromConfig(resolverName, KExpectNoDnsServer, aExpectNotReady);
aExplicitResolve = EFalse;
GetBoolFromConfig(resolverName, KExplicitResolve, aExplicitResolve);
err = GetStringFromConfig(resolverName, KProtocol, ptrBuf);
if (err && (ptrBuf.Compare(KTcp)==0))
aProtocol = KProtocolInetTcp;
else
aProtocol = KProtocolInetUdp;
err = GetStringFromConfig(resolverName, KConnName, ptrBuf);
if (!err)
{
return KErrNotFound;
}
*aConnDetails = iOwnerSuite->GetTConnection(ptrBuf);
return KErrNone;
}
示例3: GetBoolFromConfig
void COomTestStep::ReadTestConfigurationL()
{
// Read OOM Test Flag
GetBoolFromConfig(ConfigSection(), KConfigOOMTest, iOOMTest);
// Read OOM Server Test Flag
GetBoolFromConfig(ConfigSection(), KConfigOOMServerTest, iOOMServerTest);
}
示例4: INFO_PRINTF1
TVerdict CWriteBoolStep::doTestStepL()
/**
* @return - TVerdict code
* Override of base class pure virtual
* Our implementation only gets called if the base class doTestStepPreambleL() did
* not leave. That being the case, the current test result value will be EPass.
*/
{
INFO_PRINTF1(_L("This step tests WriteBoolToConfig function."));
SetTestStepResult(EFail);
TBool originalValue;
TBool TheBool;
TBool ret = EFalse;
if(!GetBoolFromConfig(ConfigSection(),KTe_RegStepTestSuiteBool, originalValue))
{
// Leave if there's any error.
User::Leave(KErrNotFound);
}
INFO_PRINTF2(_L("The ORIGINAL Bool is %d"), originalValue); // Block end
TheBool = ETrue;
if (WriteBoolToConfig(ConfigSection(),KTe_RegStepTestSuiteBool,TheBool))
{
if (GetBoolFromConfig(ConfigSection(),KTe_RegStepTestSuiteBool, TheBool) && TheBool)
{
INFO_PRINTF2(_L("The CHANGED Bool is %d"), TheBool);
ret = ETrue;
}
}
TheBool = EFalse;
if (WriteBoolToConfig(ConfigSection(),KTe_RegStepTestSuiteBool,TheBool))
{
if (GetBoolFromConfig(ConfigSection(),KTe_RegStepTestSuiteBool, TheBool) && !TheBool)
{
INFO_PRINTF2(_L("The CHANGED Bool is %d"), TheBool);
}
}
else
{
ret = EFalse;
}
if (!WriteBoolToConfig(ConfigSection(),KTe_RegStepTestSuiteBool,originalValue))
{
ret = EFalse;
}
if (ret)
{
SetTestStepResult(EPass);
}
return TestStepResult();
}
示例5: GetIntFromConfig
void CEtelMMLbsTestStepBase::ValidateMCRefTimeParams()
{
TInt expectedGpsWeek ;
GetIntFromConfig(ConfigSection(), _L("expectedGpsWeek"), expectedGpsWeek );
TInt expectedGpsTowOneMsce ;
GetIntFromConfig(ConfigSection(), _L("expectedGpsTowOneMsce"), expectedGpsTowOneMsce );
TBool expectedReftimeRequest;
GetBoolFromConfig(ConfigSection(), _L("expectedReftimeRequest"), expectedReftimeRequest);
TInt expectedRefTimeLsPart ;
GetIntFromConfig(ConfigSection(), _L("expectedRefTimeLsPart"), expectedRefTimeLsPart );
TInt expectedRefTimeMsPart ;
GetIntFromConfig(ConfigSection(), _L("expectedRefTimeMsPart"), expectedRefTimeMsPart );
TInt expectedRefTimeSfn ;
GetIntFromConfig(ConfigSection(), _L("expectedRefTimeSfn"), expectedRefTimeSfn );
TBool expectedAcqAsstRequest;
GetBoolFromConfig(ConfigSection(), _L("expectedAcqAsstRequest"), expectedAcqAsstRequest);
TBool expectedIntegrityRequest;
GetBoolFromConfig(ConfigSection(), _L("expectedIntegrityRequest"), expectedIntegrityRequest);
TInt expectedAcqAsstTime ;
GetIntFromConfig(ConfigSection(), _L("expectedAcqAsstTime"), expectedAcqAsstTime );
TInt expectedModePrimaryCode ;
GetIntFromConfig(ConfigSection(), _L("expectedModePrimaryCode"), expectedModePrimaryCode );
TInt expectedModeCellId ;
GetIntFromConfig(ConfigSection(), _L("expectedModeCellId"), expectedModeCellId );
TBool expectedModeStatusRequest;
GetBoolFromConfig(ConfigSection(), _L("expectedModeStatusRequest"), expectedModeStatusRequest);
//Reference Time Data populated and status is false
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iReferencTime.iGpsWeek == expectedGpsWeek);
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iReferencTime.iGpsTowOneMsec == expectedGpsTowOneMsce );
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iGpsAddlDataStatus.iReferenceTimeRequest == expectedReftimeRequest);
// Acquisition Assistance Data populated and status is false
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iReferencTime.iUtranGpsRefTime.iLsPart == expectedRefTimeLsPart);
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iReferencTime.iUtranGpsRefTime.iMsPart == expectedRefTimeMsPart);
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iReferencTime.iUtranGpsRefTime.iSfn == expectedRefTimeSfn);
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iGpsAddlDataStatus.iAcquisitionAssistanceReq == expectedAcqAsstRequest);
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iGpsAddlDataStatus.iRealTimeIntegrityRequest == expectedIntegrityRequest);
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iAcquisitionAssistance.iGpsReferenceTime == expectedAcqAsstTime );
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iAcquisitionAssistance.iUtranGpsReferenceTime.iPrimaryScramblingCode == expectedModePrimaryCode);
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iAcquisitionAssistance.iUtranGpsReferenceTime.iCellParametersID == expectedModeCellId);
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iReferencTime.iUtranGpsRefTime.iModeSpecificInfoStatus == expectedModeStatusRequest);
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iReferencTime.iUtranGpsRefTime.iModeSpecificInfo.iPrimaryScramblingCode == expectedModeCellId);
}
示例6: INFO_PRINTF1
/**
Function : doTestStepL
Description : Get the count of message entries satisfying serach-sort criteria and get the entries.
@return : TVerdict - Test step result
*/
TVerdict CT_MsgSearchSortByQueryObject::doTestStepL()
{
INFO_PRINTF1(_L("Test Step : SearchSortByQueryObject"));
// Read query marking option
TBool markQuery = EFalse;
GetBoolFromConfig(ConfigSection(), KMarkQuery, markQuery);
markQuery ? INFO_PRINTF1(_L("Query is marked")) : INFO_PRINTF1(_L("Query is to not marked"));
// Read the iteration limit for getting the results
TInt iteratorLimit = 0;
GetIntFromConfig(ConfigSection(), KIteratorLimit, iteratorLimit);
// Execute the search/sort request
iSharedDataCommon.iSearchSortOperation = CMsvSearchSortOperation::NewL(*iSharedDataCommon.iSession);
CT_MsgActive& active=Active();
TRAPD(err, iSharedDataCommon.iSearchSortOperation->RequestL(iSharedDataCommon.iSearchSortQuery, markQuery, active.iStatus, iteratorLimit));
if(err == KErrNone)
{
active.Activate();
CActiveScheduler::Start();
//Check Search/Sort operation for errors
TInt error = active.Result();
if (error != KErrNone)
{
ERR_PRINTF2(_L("Search/Sort request failed with %d error"), error);
SetTestStepError(error);
}
else
{
// Get the query ID for the above search/sort request
TInt quryId = iSharedDataCommon.iSearchSortOperation->GetQueryIdL();
TBool isRepetitionRequired = EFalse;
GetBoolFromConfig(ConfigSection(), KIsRepetitionRequired, isRepetitionRequired);
// Save the query ID to INI file
isRepetitionRequired ? WriteIntToConfig(ConfigSection(), KRepeatedQueryID, quryId):WriteIntToConfig(ConfigSection(), KLastQueryID, quryId);
TBool resInTMsvEntry = EFalse;
GetBoolFromConfig(ConfigSection(), KResultAsTMsvEntry, resInTMsvEntry);
TMsvSearchSortResultType resultType = EMsvResultAsTMsvId;
if(resInTMsvEntry)
{
resultType = EMsvResultAsTMsvEntry;
}
RetriveSearchSortResultL(iteratorLimit, resultType);
}
}
else
{
SetTestStepError(err);
}
return TestStepResult();
}
示例7: _LIT
/**
* New contact entries are added in the database. The newly added contacts can have fields that meet the sort order
* of some existing views, With the addition of such contact fields, the existing views needs resorting. The newly added
* fields may also meet the filter criteria of some existing views. This is useful while testing filtered views
* The new added contacts can have fields with some predefined string content, this is useful in case of Find Views and Sub Views.
*/
void CTestContactViewCRUDOperationsStep::AddContactEntriesL()
{
_LIT(KViewSortOrder, "SortOrder");
TPtrC viewSortOrderString;
GetStringFromConfig(ConfigSection(), KViewSortOrder, viewSortOrderString);
RContactViewSortOrder sortOrder = ViewUtilityReference().ConvertStringToSortOrderL(viewSortOrderString);
CleanupClosePushL(sortOrder);
_LIT(KNumOfContactsToBeAdded, "NumOfContactsToBeAdded");
TInt numOfContactsToBeAdded;
GetIntFromConfig(ConfigSection(), KNumOfContactsToBeAdded, numOfContactsToBeAdded);
for(TInt i = 0; i < numOfContactsToBeAdded; ++i)
{
CContactCard* contactCard = CContactCard::NewL();
CleanupStack::PushL(contactCard);
AddContactFieldL(*contactCard, sortOrder);
TBool filterBasedFields;
_LIT(KFilterBasedFields, "FilterBasedFields");
GetBoolFromConfig(ConfigSection(), KFilterBasedFields, filterBasedFields);
if(filterBasedFields)
{
AddFieldsSpecificToFilterL(*contactCard);
}
TBool contactsWithDesiredString;
_LIT(KContactsWithDesiredString, "ContactsWithDesiredString");
GetBoolFromConfig(ConfigSection(), KContactsWithDesiredString, contactsWithDesiredString);
if(contactsWithDesiredString)
{
AddMatchingStringToContactL(*contactCard);
}
TContactItemId contactId = DatabaseReference().AddNewContactL(*contactCard);
TPtrC addContactToGroup;
_LIT(KAddContactToGroup, "grouplist");
GetStringFromConfig(ConfigSection(), KAddContactToGroup, addContactToGroup);
if(addContactToGroup != KNullDesC)
{
IterateThroAllGroupSectionsAndUpdateContactL(addContactToGroup, *contactCard);
}
CleanupStack::PopAndDestroy();// contactCard
DatabaseReference().CloseContactL(contactId);
}
CleanupStack::PopAndDestroy(); // sortOrder
}
示例8: GetStringFromConfig
// Gets the input from ini file
void CTestContactsPBAPExport::GetInputFromIni()
{
iSetOOM = EFalse;
GetStringFromConfig(ConfigSection(), KStandard, iStandard);
GetStringFromConfig(ConfigSection(), KExportTo, iExportTo);
GetStringFromConfig(ConfigSection(), KFilter, iFilter);
// For OOM testing
GetBoolFromConfig(ConfigSection(), KSetOOM, iSetOOM);
GetBoolFromConfig(ConfigSection(), KDamageDb, iDamageDb);
GetBoolFromConfig(ConfigSection(), KInvalidFileSystem, iInvalidFileSystem);
GetBoolFromConfig(ConfigSection(), KFilterBitsFutureUse, iFilterBitsFutureUse);
GetBoolFromConfig(ConfigSection(), KSetFilterOnlyFutureUse, iSetFilterOnlyFutureUse);
}
示例9: GetBoolFromConfig
void CEtelMMLbsTestStepBase::ValidateMCParams()
{
TBool isVelocityRequested;
GetBoolFromConfig(ConfigSection(), _L("velocityRequested"), isVelocityRequested);
TInt expectedGpsTow ;
GetIntFromConfig(ConfigSection(), _L("expectedGpsTow"), expectedGpsTow );
TBool expectedCorrectionRequest;
GetBoolFromConfig(ConfigSection(), _L("expectedCorrectionRequest"), expectedCorrectionRequest);
TInt expectedGpsAlmanac ;
GetIntFromConfig(ConfigSection(), _L("expectedGpsAlmanac"), expectedGpsAlmanac );
TBool expectedGpsAlmanacRequest;
GetBoolFromConfig(ConfigSection(), _L("expectedGpsAlmanacRequest"), expectedGpsAlmanacRequest);
TInt expectedBadSatList ;
GetIntFromConfig(ConfigSection(), _L("expectedBadSatList"), expectedBadSatList );
TInt expectedHorAccuracy ;
GetIntFromConfig(ConfigSection(), _L("expectedHorAccuracy"), expectedHorAccuracy );
TInt expectedVertAccuracy ;
GetIntFromConfig(ConfigSection(), _L("expectedVertAccuracy"), expectedVertAccuracy );
TBool expectedAddlAsstDataRequest;
GetBoolFromConfig(ConfigSection(), _L("expectedAddlAsstDataRequest"), expectedAddlAsstDataRequest);
TEST(iMeasurementControl.iVelocityRequested == isVelocityRequested);
TEST(iMeasurementControl.iMeasReportTransferMode == DMMTSY_PHONE_LCS_MC_RPTTRANSFERMODE);
//DGPS corrections data populated and status is false
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iDgpsCorrections.iGpsTow == expectedGpsTow);
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iGpsAddlDataStatus.iDgpsCorrectionsRequest == expectedCorrectionRequest);
//Almanac data populated and status is false
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iAlmanac.iWnA == expectedGpsAlmanac);
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iGpsAddlDataStatus.iAlmanacRequest == expectedGpsAlmanacRequest);
//RealTime integrity data populated and status is false
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iBadSatList[0] == expectedBadSatList);
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosReportingQuantity.iHorzAccuracy == expectedHorAccuracy);
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosReportingQuantity.iVertAccuracy == expectedVertAccuracy);
//Additional Assistance Data is not required
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosReportingQuantity.iAddlAssistanceDataReq == expectedAddlAsstDataRequest);
}
示例10: SetTestStepResult
/**
Implementation of CTestStep base class virtual
It is used for doing all initialisation common to derived classes in here.
Make it being able to leave if there are any errors here as there's no point in
trying to run a test step if anything fails.
The leave will be picked up by the framework.
@return - TVerdict
*/
TVerdict CTe_graphicsperformanceSuiteStepBase::doTestStepPreambleL()
{
SetTestStepResult(EPass);
// Create and install Active Scheduler in case tests require active objects
iScheduler = new(ELeave) CActiveScheduler;
CActiveScheduler::Install(iScheduler);
FbsStartup();
TESTNOERRORL(RFbsSession::Connect());
HAL::Get(HALData::ECPUSpeed,iCPUSpeed);
INFO_PRINTF2(_L("CPUSpeed: %i kHz"),iCPUSpeed);
// get input for tests from .ini file
TEST(GetIntFromConfig(_L("Profiling"), _L("DoProfiling"), iDoProfiling));
TEST(GetBoolFromConfig(_L("SanityCheck"), _L("Bitmaps"), iShowBitmaps));
if (iDoProfiling>0)
{
__INITPROFILER
}
iProfiler = CTProfiler::NewL(*this);
__UHEAP_MARK;
return TestStepResult();
}
示例11: INFO_PRINTF1
TVerdict CCTestLtsySmsControlReceiveSmsCase1Step::doTestStepL()
/**
* @return - TVerdict code
* Override of base class pure virtual
* Our implementation only gets called if the base class doTestStepPreambleL() did
* not leave. That being the case, the current test result value will be EPass.
*/
{
if (TestStepResult()==EPass)
{
// ************** Delete the Block, the block start ****************
INFO_PRINTF1(_L("Please modify me. I am in CCTestLtsySmsControlReceiveSmsCase1Step::doTestStepL() in the file CTestLtsySmsControlReceiveSmsCase1Step.cpp")); //Block start
TPtrC TheString;
TBool TheBool;
TInt TheInt;
if(!GetStringFromConfig(ConfigSection(),KTe_integration_stltsySuiteString, TheString) ||
!GetBoolFromConfig(ConfigSection(),KTe_integration_stltsySuiteBool,TheBool) ||
!GetIntFromConfig(ConfigSection(),KTe_integration_stltsySuiteInt,TheInt)
)
{
// Leave if there's any error.
User::Leave(KErrNotFound);
}
else
{
INFO_PRINTF4(_L("The test step is %S, The Bool is %d, The int-value is %d"), &TheString, TheBool,TheInt); // Block end
}
// ************** Block end ****************
SetTestStepResult(EPass);
}
return TestStepResult();
}
示例12: while
TInt CC32RunThreadStep::ReadIniTotalSemaphoreCount()
/**
* @return - TInt code
* Override of base class virtual
* Finds semaphore count from the ini file.
*/
{
TInt semaphoreCount = 0;
TInt count = 0;
TBool findField = ETrue;
TBool semStatus;
while(findField)
{
//parse thread details from ini files
iSection.Copy(KThreadSection);
iSection.AppendNum(count++);
findField = GetBoolFromConfig(iSection, KSemaphore, semStatus);
if(findField)
{
if(semStatus)
{
//increment if semaphore field is set to True.
semaphoreCount++;
}
}
else
{
findField = EFalse;
}
}
return semaphoreCount;
}
示例13: INFO_PRINTF1
/**
This is to test the find fuctionality to get the list type of a specific given uri
and check that returned list type is corrrect if it is positive and non-capability test.
It reads values from INI file and gets the list type of a specific uri from DB.
@internalTechnology
@test
@param None
@return EPass or EFail indicating the success or failure of the test step
*/
TVerdict CTestUriListTypeStep::doTestStepL()
{
__UHEAP_MARK;
INFO_PRINTF1(_L("\n"));
// Get necessary information from INI file
TPtrC uri;
TInt serviceType;
TInt expListType;
TInt expRetCode;
TBool isCapabilityTest;
if(!GetStringFromConfig(ConfigSection(), KIniUri, uri) ||
!GetIntFromConfig(ConfigSection(), KIniServiceType, serviceType) ||
!GetIntFromConfig(ConfigSection(), KIniExpectedListType, expListType) ||
!GetIntFromConfig(ConfigSection(), KIniExpectedRetCode, expRetCode) ||
!GetBoolFromConfig(ConfigSection(), KIniIsCapabilityTest, isCapabilityTest)
)
{
ERR_PRINTF6(_L("Problem in reading values from ini. \
\nExpected fields are: \n%S\n%S\n%S\n%S\n%S\n"
),&KIniUri, &KIniServiceType, &KIniExpectedRetCode, &KIniExpectedListType, &isCapabilityTest
);
SetTestStepResult(EFail);
}
示例14: GetBoolFromConfig
TVerdict CTSmallWindowsTest::doTestStepPreambleL()
{
CTe_graphicsperformanceSuiteStepBase::doTestStepPreambleL();
iScreenSize = CTWindow::GetDisplaySizeInPixels();
TBool preload = EFalse;
GetBoolFromConfig(_L("FlowTests"), _L("Preload"), preload);
TPtrC fileNameList;
TEST(GetStringFromConfig(_L("FlowTests"), _L("Files"), fileNameList));
ExtractListL(fileNameList, iFileNames);
ComputeSmallWindows();
TPoint initialPosition(0, 0);
RArray<TPoint> initialPositions;
RArray<pTWindowCreatorFunction> windowCreatorFunctions;
CleanupClosePushL(initialPositions);
CleanupClosePushL(windowCreatorFunctions);
for (TInt i = 0; i < iWindowsAcross; i++)
{
initialPosition.iY = 0;
for (TInt j = 0; j < iWindowsAcross; j++)
{
windowCreatorFunctions.AppendL(CTSmallWindowRaster::NewL);
initialPositions.AppendL(initialPosition);
initialPosition.iY += iWindowSize.iHeight;
}
initialPosition.iX += iWindowSize.iWidth;
}
iFlowWindowsController = CTFlowWindowsController::NewL(preload, iFileNames, iWindowSize, windowCreatorFunctions, initialPositions, ETrue);
CleanupStack::PopAndDestroy(2, &initialPositions);
return TestStepResult();
}
示例15: GetIntFromConfig
TVerdict CLbsConnectDisconnectNotificationTest::doTestStepPreambleL()
/**
* @return - TVerdict code
* Override of base class virtual
*/
{
__UHEAP_MARK;
// Get the delay
GetIntFromConfig(ConfigSection(), KDelay, iDelay);
// Assistance data provider
TInt provider;
GetIntFromConfig(ConfigSection(), KProvider, provider);
iProvider = TUid::Uid(provider);
// Step mode?
TBool stepMode = EFalse;
GetBoolFromConfig(ConfigSection(), KStepMode, stepMode);
iState = EStart;
iTest = new (ELeave) CAOTest(this, iDelay, stepMode); // Stopped in postamble
iGateway = new (ELeave) CAOGateway(this); // Stopped during test
SetTestStepResult(EPass);
return TestStepResult();
}