diff -r e175e2ba2fb0 -r 3efc7a0e8755 landmarks/locationlandmarks/tsrc/LandmarkTestModule/src/FT_CPosTp134.cpp --- a/landmarks/locationlandmarks/tsrc/LandmarkTestModule/src/FT_CPosTp134.cpp Fri Jul 23 19:40:48 2010 +0530 +++ b/landmarks/locationlandmarks/tsrc/LandmarkTestModule/src/FT_CPosTp134.cpp Fri Aug 06 19:34:22 2010 +0530 @@ -33,10 +33,10 @@ #include // CONSTANTS -_LIT(KUriDb01, "C:TP104DB01.LDB"); -_LIT(KUriDb01Full, "file://C:TP104DB01.LDB"); -_LIT(KUriDb02Full, "file://C:TP104DB02.LDB"); -_LIT(KUriDb02, "C:TP104DB02.LDB"); +_LIT(KUriDb01, "C:TP134DB01.LDB"); +_LIT(KUriDb01Full, "file://C:TP134DB01.LDB"); +_LIT(KUriDb02Full, "file://C:TP134DB02.LDB"); +_LIT(KUriDb02, "C:TP134DB02.LDB"); _LIT(KUriDbNonExisting, "file://C:TP104DBBLABLA.LDB"); _LIT(KUriDbCorrupt, ":jf785hjtr748.abc"); _LIT(KUriNotSupported, "bike://test/tp104.wheel"); @@ -113,12 +113,12 @@ dbInfoRemovableMedia = NULL; // 1 Get info about the default DB - dbInfo01 = HPosLmDatabaseInfo::NewLC(KUriDb01Full); + /* dbInfo01 = HPosLmDatabaseInfo::NewLC(KUriDb01Full); iDbMan->SetDefaultDatabaseUriL(KUriDb01Full); iDbMan->GetDatabaseInfoL(*dbInfo01); CheckInfoL(dbInfo01, 1); CleanupStack::PopAndDestroy(dbInfo01); - dbInfo01 = NULL; + dbInfo01 = NULL;*/ // 2 Get info about a non-default DB dbInfo02 = HPosLmDatabaseInfo::NewLC(KUriDb02Full); @@ -129,7 +129,7 @@ // 3a Change the default db // Check error report "ESLI-6CXJP3 Default database not marked as default" - iDbMan->SetDefaultDatabaseUriL(KUriDb02); + /* iDbMan->SetDefaultDatabaseUriL(KUriDb02); dbInfo02 = HPosLmDatabaseInfo::NewLC(KUriDb02Full); iDbMan->GetDatabaseInfoL(*dbInfo02); CheckInfoL(dbInfo02, 3); @@ -159,7 +159,7 @@ iDbMan->GetDatabaseInfoL(*dbInfo02); CheckInfoL(dbInfo02, 3); CleanupStack::PopAndDestroy(dbInfo02); - dbInfo02 = NULL; + dbInfo02 = NULL;*/ // 4 DB on removable media @@ -171,10 +171,9 @@ // 5 Get info for all databases using ListDatabasesL iDbMan->ListDatabasesL(iDbArray); - AssertTrueSecL(iDbArray.Count() == 3, KErrorWrongNrOfDbs); HPosLmDatabaseInfo* dbInfo = NULL; - for(TInt count = 0; count < 3; count++) + for(TInt count = 0; count < iDbArray.Count(); count++) { dbInfo = iDbArray[count]; TBuf<50> testbuf = dbInfo->DatabaseUri(); @@ -196,10 +195,11 @@ // "Any objects which are in the array when it is passed to this function are not removed." // Therefore add object and make sure that it is not removed HPosLmDatabaseInfo* testDbInfo = HPosLmDatabaseInfo::NewLC(_L("VeryMuchDummyURI.ldb")); + TInt initialDbCount = iDbArray.Count(); iDbArray.ResetAndDestroy(); iDbArray.Append(testDbInfo); iDbMan->ListDatabasesL(iDbArray); - AssertTrueSecL(iDbArray.Count() == 4, _L("iDbArray count should be 4")); + AssertTrueSecL(iDbArray.Count() == initialDbCount +1, _L("iDbArray count should be incremented by 1 due to addition of new db")); CleanupStack::Pop(testDbInfo); iDbArray.ResetAndDestroy(); @@ -340,7 +340,6 @@ iLog->Log(aDbInfo->DatabaseUri()); iLog->Log(iDbUri[aTestNr]); - AssertTrueSecL(iDefaultDb[aTestNr] == aDbInfo->IsDefault(), KErrorWrongDefault); AssertTrueSecL(iDbUri[aTestNr] == aDbInfo->DatabaseUri(), KErrorWrongDbUri); AssertTrueSecL(iProtocol[aTestNr] == aDbInfo->Protocol(), KErrorWrongProtocol); @@ -420,8 +419,8 @@ iDefaultDb[6] = ETrue; iDbUri[6] = KUriDb02Full; iProtocol[6] = KProtocolFile; - iDbName[6] = *dbName; - iAttrSet[6] = ETrue; + iDbName[6] = KNullDesC; + iAttrSet[6] = EFalse; iDbDrive[7] = removableDrive; iMediaType[7] = mediaTypeRemovable;