persistentstorage/sqlite3api/TEST/t_sqlitedb64.cpp
changeset 55 44f437012c90
parent 0 08ec8eefde2f
equal deleted inserted replaced
51:7d4490026038 55:44f437012c90
     1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2009-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".
    81 //Test macros and functions
    81 //Test macros and functions
    82 static void Check(TInt aValue, TInt aLine)
    82 static void Check(TInt aValue, TInt aLine)
    83 	{
    83 	{
    84 	if(!aValue)
    84 	if(!aValue)
    85 		{
    85 		{
       
    86 		TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
    86 		DeleteTestFiles();
    87 		DeleteTestFiles();
    87 		PrintSqliteErrMsg();
    88 		PrintSqliteErrMsg();
    88 		TheTest(EFalse, aLine);
    89 		TheTest(EFalse, aLine);
    89 		}
    90 		}
    90 	}
    91 	}
    91 static void Check(TInt aValue, TInt aExpected, TInt aLine)
    92 static void Check(TInt aValue, TInt aExpected, TInt aLine)
    92 	{
    93 	{
    93 	if(aValue != aExpected)
    94 	if(aValue != aExpected)
    94 		{
    95 		{
    95 		DeleteTestFiles();
    96 		DeleteTestFiles();
    96 		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
    97 		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
    97 		PrintSqliteErrMsg();
    98 		PrintSqliteErrMsg();
    98 		TheTest(EFalse, aLine);
    99 		TheTest(EFalse, aLine);
    99 		}
   100 		}
   100 	}
   101 	}
   101 #define TEST(arg) ::Check((arg), __LINE__)
   102 #define TEST(arg) ::Check((arg), __LINE__)