这篇教程C++ GetBoolFromConfig函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetBoolFromConfig函数的典型用法代码示例。如果您正苦于以下问题:C++ GetBoolFromConfig函数的具体用法?C++ GetBoolFromConfig怎么用?C++ GetBoolFromConfig使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetBoolFromConfig函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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); } }
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:40,
示例2: GetStringFromConfigTInt 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; }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:60,
示例3: GetBoolFromConfigvoid COomTestStep::ReadTestConfigurationL() { // Read OOM Test Flag GetBoolFromConfig(ConfigSection(), KConfigOOMTest, iOOMTest); // Read OOM Server Test Flag GetBoolFromConfig(ConfigSection(), KConfigOOMServerTest, iOOMServerTest); }
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:7,
示例4: INFO_PRINTF1TVerdict 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(); }
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:57,
示例5: GetIntFromConfigvoid 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);}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:56,
示例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(); }
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:59,
示例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 }
开发者ID:Esclapion,项目名称:qt-mobility,代码行数:58,
示例8: GetStringFromConfig// Gets the input from ini filevoid 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); }
开发者ID:Esclapion,项目名称:qt-mobility,代码行数:14,
示例9: GetBoolFromConfigvoid 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); }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:48,
示例10: SetTestStepResult/**Implementation of CTestStep base class virtualIt 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 intrying 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(); }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:35,
示例11: INFO_PRINTF1TVerdict 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(); }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:35,
示例12: whileTInt 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; }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:35,
示例13: INFO_PRINTF1/**This is to test the find fuctionality to get the list type of a specific given uriand 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); }
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:34,
示例14: GetBoolFromConfigTVerdict 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(); }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:34,
示例15: GetIntFromConfigTVerdict 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(); }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:25,
示例16: INFO_PRINTF1/**@SYMTestCaseID PIM-APP-ENGINES-CALINTERIMAPI-CIT-0005-HP@SYMTestType CIT@SYMTestPriority Medium@SYMPREQ 1098@SYMFssID 3.2.1 005@SYMTestCaseDesc delete the opened file@SYMTestActions deletes the opened file@SYMTestExpectedResults Aganda file is and deleted*/void CTestCalInterimApiSuiteStepBase::DeleteCalenderFileL() { INFO_PRINTF1(_L("Deleting calender file")); TRAPD(err, iSession->DeleteCalFileL(iCalenderFileName)); if( err == KErrNone ) { TBool reCreateCalFile = ETrue; if (!GetBoolFromConfig(ConfigSection(), KReCreateCalFile, reCreateCalFile)) { reCreateCalFile = ETrue; } if (reCreateCalFile) { INFO_PRINTF1(_L("Trying to create the file after deletion")); TRAPD(err, iSession->CreateCalFileL(iCalenderFileName)); if( err != KErrNone ) { ERR_PRINTF2(KErrInDeleteCalFileL, err); SetTestStepResult(EFail); } } } else { ERR_PRINTF2(KErrDeletingCalenderFile, err); SetTestStepResult(EFail); } }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:40,
示例17: GetPartOfBufferL/** Gets the specified part of the unicode based on the requirement from the user@param aBuffer Pointer to CHtmlToCrtConvBuffer@param aPartOfUnicode Contains the return value of GetPartOfBufferL()@test*/void CTestHtmlToCrtConverterBufferStep::GetPartOfConvertedBufferL(CHtmlToCrtConvBuffer* aBuffer, TDes& aPartOfBuffer) { GetBoolFromConfig(ConfigSection(), KGetPartOfBuffer, iGetPartOfBuffer); if ( iGetPartOfBuffer == EFalse ) { return; } GetIntFromConfig(ConfigSection(), KStartPosition, iStartPosition); GetIntFromConfig(ConfigSection(), KEndPosition, iEndPosition); TPtrC partOfBufferUnicode; if ( iEndPosition == 0 ) { // Gets the part of the buffer from the start position till the end aBuffer->GetToEndOfBufferL(partOfBufferUnicode, iStartPosition); aPartOfBuffer.Copy(partOfBufferUnicode); } else if ( (iStartPosition != 0) && (iEndPosition != 0) ) { // Get the specified part of the buffer returned from CHtmlToCrtConverterBuffer aBuffer->GetPartOfBufferL(partOfBufferUnicode, iStartPosition, iEndPosition); aPartOfBuffer.Copy(partOfBufferUnicode); } else if ( iEndPosition != 0 ) { TBuf8<KMaxLengthString> partOfBufferUnicode; // Get the sample of text from the file and returns it in the partOfBufferUnicode aBuffer->GetSampleOfTextFromFileL(partOfBufferUnicode, iEndPosition, 0); aPartOfBuffer.Copy(partOfBufferUnicode); } }
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:37,
示例18: INFO_PRINTF1/** Calls CFbsFont::HasCharacter() */void CT_DataFbsFont::DoCmdHasCharacter(const TDesC& aSection) { INFO_PRINTF1(_L("Calls CFbsFont::HasCharacter()")); // get character code from parameters TInt charCode = 0; if(!GetIntFromConfig(aSection, KCharCode(), charCode)) { ERR_PRINTF2(_L("No %S"), &KCharCode()); SetBlockResult(EFail); } else { // call HasCharacter() TBool actual = iFbsFont->HasCharacter(charCode); TBool expected; if(GetBoolFromConfig(aSection, KExpectedBool(), expected)) { // check that the value is as expected if (actual != expected) { ERR_PRINTF3(_L("The value is not as expected! expected: %d, actual: %d"), expected, actual); SetBlockResult(EFail); } } } }
开发者ID:fedor4ever,项目名称:default,代码行数:29,
示例19: DoCmd_iParRightToLeftvoid CT_DataDrawTextExtendedParam::DoCmd_iParRightToLeft(const TDesC& aSection) { if ( !GetBoolFromConfig(aSection, KFldValue(), iDrawTextExtendedParam->iParRightToLeft) ) { INFO_PRINTF2(_L("iParRightToLeft=%d"), iDrawTextExtendedParam->iParRightToLeft); } }
开发者ID:fedor4ever,项目名称:default,代码行数:7,
示例20: doTestStepPreambleLenum TVerdict CTS_Delay::doTestStepPreambleL(void)/** * Implements OOM testing in each test */ { if (!(GetBoolFromConfig(KDelay,KOomTest,iIsOOMTest))) iIsOOMTest=EFalse; return EPass; }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:9,
示例21: GetBoolFromConfigTBool CDataWrapperBase::GetCommandBoolParameter(const TDesC& aParameterName, const TDesC& aSection, TBool& aResult, TText8 *aFileName, TInt aLine, TBool aMandatory) { TBool ret = GetBoolFromConfig(aSection, aParameterName, aResult); if (aMandatory && !ret) { Logger().LogExtra(aFileName, aLine, ESevrErr, _L("No %S"), &aParameterName); SetBlockResult(EFail); } return ret; }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:10,
示例22: INFO_PRINTF1/** Function : doTestStepL Description : Get the count of message entries satisfying serach-sort criteria. @return : TVerdict - Test step result */TVerdict CT_MsgSearchSortResultByQueryId::doTestStepL() { INFO_PRINTF1(_L("Test Step : SearchSortResultByQueryId")); TInt queryId = 0; if(!GetIntFromConfig(ConfigSection(), KRepeatedQueryID, queryId)) { ERR_PRINTF1(_L("Can not find any Query ID for Execution")); SetTestStepResult(EFail); } else { // Set the preferred result type flag, default value is TMsvId TBool resInTMsvEntry = EFalse; GetBoolFromConfig(ConfigSection(), KResultAsTMsvEntry, resInTMsvEntry); TMsvSearchSortResultType resultType = EMsvResultAsTMsvId; if(resInTMsvEntry) { resultType = EMsvResultAsTMsvEntry; } // Set 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(queryId, 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 { RetriveSearchSortResultL(iteratorLimit, resultType); } } else { SetTestStepError(err); } } return TestStepResult(); }
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:59,
示例23: doTestStepPreambleL// Function : doTestStepPreambleL()// Description :// @return :TVerdict EPass/EFailTVerdict CT_ReadFileStep::doTestStepPreambleL() { //call Seek base class doTestStepPreambleL TVerdict ret=CT_SeekFileStep::doTestStepPreambleL(); //Set up seekread if (!GetBoolFromConfig(ConfigSection(),KT_ReadSeek,iSeek)) { //defaulting to constructor value WARN_PRINTF2(_L("Using default seek value: (%d)"), iSeek); } return ret; }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:17,
示例24: GetBoolFromConfig/* Compare the transparency status of the entries before and after storing @param aEntry1 Pointer to the stored entry@param aEntry2 Pointer to the entry fetched from the database@test*/void CTestCalInterimApiSuiteStepBase::CompareTransL(CCalEntry* aEntry1, CCalEntry* aEntry2) { TBool allocTest = EFalse; GetBoolFromConfig(ConfigSection(), KAllocTest, allocTest); if (allocTest) { TInt trans1 = 0; TInt trans2 = 0; TInt tryCount = 1; TInt err = KErrNone; TInt err1 = KErrNone; for ( ;; ) { __UHEAP_SETFAIL(RHeap::EDeterministic, tryCount); TRAP(err, trans1 = aEntry1->TimeTransparencyL()); TRAP(err1, trans2 = aEntry2->TimeTransparencyL()); if ( err==KErrNone && err1==KErrNone) { __UHEAP_RESET; INFO_PRINTF1(_L("OOM testing of CCalEntry::TimeTransparencyL Api is done")); break; } if ( err != KErrNoMemory || err1 != KErrNoMemory) { __UHEAP_RESET; SetTestStepResult(EFail); break; } tryCount++; __UHEAP_RESET; } TESTL(trans1 == trans2); } else { TInt trans(aEntry1->TimeTransparencyL()); if (trans<0) { TESTL(KDefaultTranspStatus == aEntry2->TimeTransparencyL()); INFO_PRINTF1(_L("Busy Status is set correctly to default value")); } else { TESTL(trans == (aEntry2->TimeTransparencyL())); INFO_PRINTF1(_L("Busy Status is set correctly")); } } }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:55,
示例25: CleanupClosePushL/** Retrieves daylight property for various time zones in OOM conditions*/void CTestTZServer::OOMDaylightSavingL() { RTz tz; CleanupClosePushL(tz); User::LeaveIfError(tz.Connect()); tz.SetAutoUpdateBehaviorL(RTz::ETZAutoDSTUpdateOn); CTzId* tzId = NULL; TRAPD(err1,tzId = tz.GetTimeZoneIdL()); //the current system time zone TESTL ( err1 == KErrNone ); CleanupStack::PushL(tzId); TBool isDaylightOn = EFalse; iFailAt = 0; for ( ;; ) { StartHeapCheck(iFailAt); TRAPD(err, isDaylightOn = tz.IsDaylightSavingOnL(*tzId)); //daylight property for current system time zone if ( err == KErrNone ) { __UHEAP_RESET; INFO_PRINTF1(_L("OOM testing of IsDaylightSavingOnL()) Api is done")); break; } if ( ErrorProcess(err) ) { EndHeapCheck(); } else { break; } } iField.Zero(); iField.Append(KDaylightSaving); GetBoolFromConfig(ConfigSection(),iField,iDaylightSaving); //gets expected daylight property //compares expected daylight property with actual daylight property TESTL(iDaylightSaving == isDaylightOn); CleanupStack::PopAndDestroy(tzId); CleanupStack::PopAndDestroy(&tz); }
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:52,
示例26: DoCmdSetOpaquevoid CT_DataWindowGc::DoCmdSetOpaque(const TDesC& aSection) { TBool drawOpaque=ETrue; if( GetBoolFromConfig(aSection, KFldDrawOpaque(), drawOpaque)) { INFO_PRINTF1(_L("CWindowGc::SetOpaque")); iWindowGc->SetOpaque(drawOpaque); } else { ERR_PRINTF2(_L("Missing parameter %S"), &KFldDrawOpaque()); SetBlockResult(EFail); } }
开发者ID:fedor4ever,项目名称:default,代码行数:14,
示例27: SetIsSink/**Test SetIsSink()*/void CT_AvdtpSEPInfoData::DoCmdSetIsSink(const TDesC& aSection) { INFO_PRINTF1(_L("TAvdtpSEPInfo SetIsSink() Call.")); TBool isSink=EFalse; if( !GetBoolFromConfig(aSection, KFldIsSink(), isSink) ) { ERR_PRINTF2(KLogMissingParameter, &KFldIsInUse); SetBlockResult(EFail); } else { INFO_PRINTF2(_L("Execute SetIsSink(TBool), isSink = %d"), isSink); iData->SetIsSink(isSink); } }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:18,
示例28: TESTLTVerdict CTestCompareCntFiles::doTestStepL()/** * @return - TVerdict code * Override of base class pure virtual */ { // connect to file system User::LeaveIfError(iFsSession.Connect()); TESTL(TestStepResult() == EPass); INFO_PRINTF1(_L("CTestCompareCntFiles::doTestStepL() start")); TESTL(GetStringFromConfig(ConfigSection(), KExportFile, iExportFilePath)); GetStringFromConfig(ConfigSection(), KExpectedExportFile, iExpectedExportFilePath); GetStringFromConfig(ConfigSection(), KFieldToVerify, iFieldToVerify); GetStringFromConfig(ConfigSection(), KNoField, iNoField); // Create Utility class object, to use TokenizeStringL CTestStep* self = static_cast<CTestStep*>(this); iExportObj = new(ELeave) CContactsPBAPExportUtilityClass(self); TokenizeAndCompareL(); TokenizeAndCheckNoFieldL(); // Comparing two files TBool compareFile = EFalse; GetBoolFromConfig(ConfigSection(), KCompareFile, compareFile); if(compareFile) { TBool fileCompare = EFalse; // Call CompareWholeFileL to use the normal comparison of two files, ignoring the REV property fileCompare = CompareWholeFileL(iExpectedExportFilePath, iExportFilePath); if(!fileCompare) { SetTestStepResult(EFail); } } iFsSession.Close(); INFO_PRINTF1(_L("CTestCompareCntFiles::doTestStepL() finish")); return TestStepResult(); }
开发者ID:Esclapion,项目名称:qt-mobility,代码行数:47,
注:本文中的GetBoolFromConfig函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GetBorder函数代码示例 C++ GetBool函数代码示例 |