persistentstorage/sql/TEST/t_sqlattach2.cpp
changeset 55 44f437012c90
parent 0 08ec8eefde2f
equal deleted inserted replaced
51:7d4490026038 55:44f437012c90
    44 //Test macros and functions
    44 //Test macros and functions
    45 void Check1(TInt aValue, TInt aLine)
    45 void Check1(TInt aValue, TInt aLine)
    46 	{
    46 	{
    47 	if(!aValue)
    47 	if(!aValue)
    48 		{
    48 		{
    49 		RDebug::Print(_L("*** Line %d\r\n"), aLine);
    49 		TheTest.Printf(_L("*** Line %d. Expression evaluated to false\r\n"), aLine);
    50 		TheTest(EFalse, aLine);
    50 		TheTest(EFalse, aLine);
    51 		}
    51 		}
    52 	}
    52 	}
    53 void Check2(TInt aValue, TInt aExpected, TInt aLine)
    53 void Check2(TInt aValue, TInt aExpected, TInt aLine)
    54 	{
    54 	{
    55 	if(aValue != aExpected)
    55 	if(aValue != aExpected)
    56 		{
    56 		{
    57 		RDebug::Print(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
    57 		TheTest.Printf(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
    58 		TheTest(EFalse, aLine);
    58 		TheTest(EFalse, aLine);
    59 		}
    59 		}
    60 	}
    60 	}
    61 #define TEST(arg) ::Check1((arg), __LINE__)
    61 #define TEST(arg) ::Check1((arg), __LINE__)
    62 #define TEST2(aValue, aExpected) ::Check2(aValue, aExpected, __LINE__)
    62 #define TEST2(aValue, aExpected) ::Check2(aValue, aExpected, __LINE__)