persistentstorage/sql/TEST/t_sqlattach.cpp
changeset 55 44f437012c90
parent 29 cce6680bbf1c
equal deleted inserted replaced
51:7d4490026038 55:44f437012c90
    79 void Check(TInt aValue, TInt aLine)
    79 void Check(TInt aValue, TInt aLine)
    80 	{
    80 	{
    81 	if(!aValue)
    81 	if(!aValue)
    82 		{
    82 		{
    83 		DeleteDatabases();
    83 		DeleteDatabases();
       
    84 		TheTest.Printf(_L("*** Expression evaluated to false\r\n"));
    84 		TheTest(EFalse, aLine);
    85 		TheTest(EFalse, aLine);
    85 		}
    86 		}
    86 	}
    87 	}
    87 void Check(TInt aValue, TInt aExpected, TInt aLine)
    88 void Check(TInt aValue, TInt aExpected, TInt aLine)
    88 	{
    89 	{
    89 	if(aValue != aExpected)
    90 	if(aValue != aExpected)
    90 		{
    91 		{
    91 		DeleteDatabases();
    92 		DeleteDatabases();
    92 		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
    93 		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
    93 		TheTest(EFalse, aLine);
    94 		TheTest(EFalse, aLine);
    94 		}
    95 		}
    95 	}
    96 	}
    96 #define TEST(arg) ::Check((arg), __LINE__)
    97 #define TEST(arg) ::Check((arg), __LINE__)
    97 #define TEST2(aValue, aExpected) ::Check(aValue, aExpected, __LINE__)
    98 #define TEST2(aValue, aExpected) ::Check(aValue, aExpected, __LINE__)