persistentstorage/dbms/tdbms/t_dbenvdestroy.cpp
changeset 55 44f437012c90
parent 0 08ec8eefde2f
equal deleted inserted replaced
51:7d4490026038 55:44f437012c90
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2004-2010 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".
    38 //Test macros and functions
    38 //Test macros and functions
    39 static void Check(TInt aValue, TInt aExpected, TInt aLine)
    39 static void Check(TInt aValue, TInt aExpected, TInt aLine)
    40 	{
    40 	{
    41 	if(aValue != aExpected)
    41 	if(aValue != aExpected)
    42 		{
    42 		{
    43 		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
    43 		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
    44 		TheTest(EFalse, aLine);
    44 		TheTest(EFalse, aLine);
    45 		}
    45 		}
    46 	}
    46 	}
    47 #define TEST2(aValue, aExpected) ::Check(aValue, aExpected, __LINE__)
    47 #define TEST2(aValue, aExpected) ::Check(aValue, aExpected, __LINE__)
    48 
    48 
    49 ///////////////////////////////////////////////////////////////////////////////////////
    49 ///////////////////////////////////////////////////////////////////////////////////////
    50 
    50 
    51 static void DeleteTestDatabase(TUid aUid, const TDesC& aDbName)
    51 static void DeleteTestDatabase(TUid aUid, const TDesC& aDbName)
    52 	{
    52 	{
    53 	RDebug::Print(_L("Deleting %X \"%S\" database.\n"), aUid, &aDbName);
    53 	TheTest.Printf(_L("Deleting %X \"%S\" database.\n"), aUid, &aDbName);
    54 	TInt err = TheDbs.DeleteDatabase(aDbName, aUid);
    54 	TInt err = TheDbs.DeleteDatabase(aDbName, aUid);
    55 	if(err != KErrNone && err != KErrNotFound)
    55 	if(err != KErrNone && err != KErrNotFound)
    56 		{
    56 		{
    57 		RDebug::Print(_L("Error %d deleting \"%S\" database.\n"), err, &aDbName);
    57 		TheTest.Printf(_L("Error %d deleting \"%S\" database.\n"), err, &aDbName);
    58 		}
    58 		}
    59 	}
    59 	}
    60 
    60 
    61 /**
    61 /**
    62 @SYMTestCaseID SYSLIB-DBMS-CT-0024
    62 @SYMTestCaseID SYSLIB-DBMS-CT-0024