persistentstorage/sql/TEST/t_sqlenvcreate.cpp
changeset 55 44f437012c90
parent 29 cce6680bbf1c
equal deleted inserted replaced
51:7d4490026038 55:44f437012c90
    66 //Test macros and functions
    66 //Test macros and functions
    67 static void Check(TInt aValue, TInt aLine)
    67 static void Check(TInt aValue, TInt aLine)
    68 	{
    68 	{
    69 	if(!aValue)
    69 	if(!aValue)
    70 		{
    70 		{
    71 		RDebug::Print(_L("*** Line %d\r\n"), aLine);
    71 		TheTest.Printf(_L("*** Line %d. Expresssion evaluated to false\r\n"), aLine);
    72 		TheTest(EFalse, aLine);
    72 		TheTest(EFalse, aLine);
    73 		}
    73 		}
    74 	}
    74 	}
    75 static void Check(TInt aValue, TInt aExpected, TInt aLine)
    75 static void Check(TInt aValue, TInt aExpected, TInt aLine)
    76 	{
    76 	{
    77 	if(aValue != aExpected)
    77 	if(aValue != aExpected)
    78 		{
    78 		{
    79 		RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
    79 		TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
    80 		TheTest(EFalse, aLine);
    80 		TheTest(EFalse, aLine);
    81 		}
    81 		}
    82 	}
    82 	}
    83 #define TEST(arg) ::Check((arg), __LINE__)
    83 #define TEST(arg) ::Check((arg), __LINE__)
    84 #define TEST2(aValue, aExpected) ::Check(aValue, aExpected, __LINE__)
    84 #define TEST2(aValue, aExpected) ::Check(aValue, aExpected, __LINE__)