persistentstorage/sql/TEST/t_sqlcompact4.cpp
changeset 55 44f437012c90
parent 29 cce6680bbf1c
equal deleted inserted replaced
51:7d4490026038 55:44f437012c90
    91 void Check(TInt aValue, TInt aLine)
    91 void Check(TInt aValue, TInt aLine)
    92 	{
    92 	{
    93 	if(!aValue)
    93 	if(!aValue)
    94 		{
    94 		{
    95 		DestroyTestEnv();
    95 		DestroyTestEnv();
    96 		RDebug::Print(_L("*** Test failure. Boolean expression evaluates to false.\r\n"));
    96 		TheTest.Printf(_L("*** Test failure. Boolean expression evaluates to false.\r\n"));
    97 		TheTest(EFalse, aLine);
    97 		TheTest(EFalse, aLine);
    98 		}
    98 		}
    99 	}
    99 	}
   100 void Check(TInt aValue, TInt aExpected, TInt aLine)
   100 void Check(TInt aValue, TInt aExpected, TInt aLine)
   101 	{
   101 	{
   102 	if(aValue != aExpected)
   102 	if(aValue != aExpected)
   103 		{
   103 		{
   104 		DestroyTestEnv();
   104 		DestroyTestEnv();
   105 		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
   105 		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
   106 		TheTest(EFalse, aLine);
   106 		TheTest(EFalse, aLine);
   107 		}
   107 		}
   108 	}
   108 	}
   109 #define TEST(arg) ::Check((arg), __LINE__)
   109 #define TEST(arg) ::Check((arg), __LINE__)
   110 #define TEST2(aValue, aExpected) ::Check(aValue, aExpected, __LINE__)
   110 #define TEST2(aValue, aExpected) ::Check(aValue, aExpected, __LINE__)