persistentstorage/sql/TEST/t_sqlbur2.cpp
changeset 55 44f437012c90
parent 51 7d4490026038
equal deleted inserted replaced
51:7d4490026038 55:44f437012c90
    69 void Check(TInt aValue, TInt aLine)
    69 void Check(TInt aValue, TInt aLine)
    70 	{
    70 	{
    71 	if(!aValue)
    71 	if(!aValue)
    72 		{
    72 		{
    73 		DestroyTestEnv();
    73 		DestroyTestEnv();
    74 		RDebug::Print(_L("*** Boolean expression evaluated to false.\r\n"));
    74 		TheTest.Printf(_L("*** Boolean expression evaluated to false.\r\n"));
    75 		TheTest(EFalse, aLine);
    75 		TheTest(EFalse, aLine);
    76 		}
    76 		}
    77 	}
    77 	}
    78 void Check(TInt aValue, TInt aExpected, TInt aLine)
    78 void Check(TInt aValue, TInt aExpected, TInt aLine)
    79 	{
    79 	{
    80 	if(aValue != aExpected)
    80 	if(aValue != aExpected)
    81 		{
    81 		{
    82 		DestroyTestEnv();
    82 		DestroyTestEnv();
    83 		RDebug::Print(_L("*** Expected error: %d, got: %d.\r\n"), aExpected, aValue);
    83 		TheTest.Printf(_L("*** Expected error: %d, got: %d.\r\n"), aExpected, aValue);
    84 		TheTest(EFalse, aLine);
    84 		TheTest(EFalse, aLine);
    85 		}
    85 		}
    86 	}
    86 	}
    87 #define TEST(arg) ::Check((arg), __LINE__)
    87 #define TEST(arg) ::Check((arg), __LINE__)
    88 #define TEST2(aValue, aExpected) ::Check(aValue, aExpected, __LINE__)
    88 #define TEST2(aValue, aExpected) ::Check(aValue, aExpected, __LINE__)