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