1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
17 #include <f32file.h> |
17 #include <f32file.h> |
18 #include <e32std.h> |
18 #include <e32std.h> |
19 #include <e32test.h> |
19 #include <e32test.h> |
20 #include <s32file.h> |
20 #include <s32file.h> |
21 #include <numberconversion.h> |
21 #include <numberconversion.h> |
22 |
22 #include "t_logutil.h" |
23 |
|
24 RTest TheTest(_L("t_logapi_helper")); |
|
25 |
23 |
26 _LIT(KSeparator, ";"); // Invalid filepath char used to separate filenames |
24 _LIT(KSeparator, ";"); // Invalid filepath char used to separate filenames |
27 |
25 |
28 ////////////////////////////////////////////////////////////////////////////////////////// |
26 RTest TheTest(_L("t_logapi_helper")); |
29 //Tests macros and functions. |
|
30 //If (!aValue) then the test will be panicked, the test data files will be deleted. |
|
31 static void Check(TInt aValue, TInt aLine) |
|
32 { |
|
33 if(!aValue) |
|
34 { |
|
35 TheTest.Printf(_L("*** Boolean expression evaluated to false\r\n")); |
|
36 TheTest(EFalse, aLine); |
|
37 } |
|
38 } |
|
39 //If (aValue != aExpected) then the test will be panicked, the test data files will be deleted. |
|
40 static void Check(TInt aValue, TInt aExpected, TInt aLine) |
|
41 { |
|
42 if(aValue != aExpected) |
|
43 { |
|
44 TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue); |
|
45 TheTest(EFalse, aLine); |
|
46 } |
|
47 } |
|
48 //Use these to test conditions. |
|
49 #define TEST(arg) Check((arg), __LINE__) |
|
50 #define TEST2(aValue, aExpected) Check(aValue, aExpected, __LINE__) |
|
51 |
27 |
52 /* |
28 /* |
53 This method helps to do operations on files and folders, like copy, delete, rename, create directory (MkDir) |
29 This method helps to do operations on files and folders, like copy, delete, rename, create directory (MkDir) |
54 This process has a capabilities to write in all files of the system. |
30 This process has a capabilities to write in all files of the system. |
55 -param: anOld: source file |
31 -param: anOld: source file |