persistentstorage/sql/TEST/t_sqlsecurity6.cpp
changeset 55 44f437012c90
parent 29 cce6680bbf1c
equal deleted inserted replaced
51:7d4490026038 55:44f437012c90
    35 void Check1(TInt aValue, TInt aLine)
    35 void Check1(TInt aValue, TInt aLine)
    36 	{
    36 	{
    37 	if(!aValue)
    37 	if(!aValue)
    38 		{
    38 		{
    39 		DestroyTestEnv();
    39 		DestroyTestEnv();
    40 		RDebug::Print(_L("*** Boolean expression evaluated to false. Line %d\r\n"), aLine);
    40 		TheTest.Printf(_L("*** Expression evaluated to false. Line %d\r\n"), aLine);
    41 		TheTest(EFalse, aLine);
    41 		TheTest(EFalse, aLine);
    42 		}
    42 		}
    43 	}
    43 	}
    44 void Check2(TInt aValue, TInt aExpected, TInt aLine)
    44 void Check2(TInt aValue, TInt aExpected, TInt aLine)
    45 	{
    45 	{
    46 	if(aValue != aExpected)
    46 	if(aValue != aExpected)
    47 		{
    47 		{
    48 		DestroyTestEnv();
    48 		DestroyTestEnv();
    49 		RDebug::Print(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
    49 		TheTest.Printf(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
    50 		TheTest(EFalse, aLine);
    50 		TheTest(EFalse, aLine);
    51 		}
    51 		}
    52 	}
    52 	}
    53 #define TEST(arg) ::Check1((arg), __LINE__)
    53 #define TEST(arg) ::Check1((arg), __LINE__)
    54 #define TEST2(aValue, aExpected) ::Check2(aValue, aExpected, __LINE__)
    54 #define TEST2(aValue, aExpected) ::Check2(aValue, aExpected, __LINE__)