persistentstorage/sql/TEST/t_sqlcompact1.cpp
changeset 55 44f437012c90
parent 28 7a522c0700d3
equal deleted inserted replaced
51:7d4490026038 55:44f437012c90
    57 void Check(TInt aValue, TInt aLine)
    57 void Check(TInt aValue, TInt aLine)
    58 	{
    58 	{
    59 	if(!aValue)
    59 	if(!aValue)
    60 		{
    60 		{
    61 		DestroyTestEnv();
    61 		DestroyTestEnv();
    62 		RDebug::Print(_L("*** Test failure. Boolean expression evaluates to false.\r\n"));
    62 		TheTest.Printf(_L("*** Test failure. Expression evaluated to false.\r\n"));
    63 		TheTest(EFalse, aLine);
    63 		TheTest(EFalse, aLine);
    64 		}
    64 		}
    65 	}
    65 	}
    66 void Check2(TInt aValue, TInt aExpected, TInt aLine)
    66 void Check2(TInt aValue, TInt aExpected, TInt aLine)
    67 	{
    67 	{
    68 	if(aValue != aExpected)
    68 	if(aValue != aExpected)
    69 		{
    69 		{
    70 		DestroyTestEnv();
    70 		DestroyTestEnv();
    71 		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
    71 		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
    72 		TheTest(EFalse, aLine);
    72 		TheTest(EFalse, aLine);
    73 		}
    73 		}
    74 	}
    74 	}
    75 #define TEST(arg) ::Check((arg), __LINE__)
    75 #define TEST(arg) ::Check((arg), __LINE__)
    76 #define TEST2(aValue, aExpected) ::Check2(aValue, aExpected, __LINE__)
    76 #define TEST2(aValue, aExpected) ::Check2(aValue, aExpected, __LINE__)