diff -r 000000000000 -r 08ec8eefde2f persistentstorage/dbms/tdbms/t_dbfail2.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/dbms/tdbms/t_dbfail2.cpp Fri Jan 22 11:06:30 2010 +0200 @@ -0,0 +1,221 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Secure shared databases failures test +// +// + +#include +#include +#include +#include "t_dbfail.h" + +LOCAL_D TBuf<64> TheFormat2; +_LIT(KTestDatabase2,"C:t_fail.db"); +_LIT(KTestDatabase3,"C:t_fail2.db"); +const TUid KPolicyUid = {0x11335579}; + +GLDEF_C void PrepareDbFmtString() + { + TheFormat2.Copy(_L("SECURE")); + TheFormat2.Append(KPolicyUid.Name()); + } + +LOCAL_C void DbCreate2L() + { + User::LeaveIfError(TheDatabase.Create(TheDbs, KTestDatabase2, TheFormat2)); + RDebug::Print(_L("Secure shared database created.\n")); + } + +LOCAL_C void DbDatabaseNamesL() + { + CDbDatabaseNames* dbNames = TheDbs.DatabaseNamesL(EDriveC, KPolicyUid); + test(dbNames != NULL); + TInt cnt = dbNames->Count(); + TInt i; + for(i=0;i