54 void Check(TInt aValue, TInt aLine) |
54 void Check(TInt aValue, TInt aLine) |
55 { |
55 { |
56 if(!aValue) |
56 if(!aValue) |
57 { |
57 { |
58 DeleteTestFiles(); |
58 DeleteTestFiles(); |
59 RDebug::Print(_L("*** Expresssion evaluated to false\r\n")); |
59 TheTest.Printf(_L("*** Expresssion evaluated to false\r\n")); |
60 TheTest(EFalse, aLine); |
60 TheTest(EFalse, aLine); |
61 } |
61 } |
62 } |
62 } |
63 void Check(TInt aValue, TInt aExpected, TInt aLine) |
63 void Check(TInt aValue, TInt aExpected, TInt aLine) |
64 { |
64 { |
65 if(aValue != aExpected) |
65 if(aValue != aExpected) |
66 { |
66 { |
67 DeleteTestFiles(); |
67 DeleteTestFiles(); |
68 RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue); |
68 TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue); |
69 TheTest(EFalse, aLine); |
69 TheTest(EFalse, aLine); |
70 } |
70 } |
71 } |
71 } |
72 #define TEST(arg) ::Check((arg), __LINE__) |
72 #define TEST(arg) ::Check((arg), __LINE__) |
73 #define TEST2(aValue, aExpected) ::Check(aValue, aExpected, __LINE__) |
73 #define TEST2(aValue, aExpected) ::Check(aValue, aExpected, __LINE__) |