equal
deleted
inserted
replaced
1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2002-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". |
12 // |
12 // |
13 // Description: |
13 // Description: |
14 // |
14 // |
15 |
15 |
16 #include <logview.h> |
16 #include <logview.h> |
17 #include "TEST.H" |
17 #include "t_logutil2.h" |
18 |
18 |
19 |
19 RTest TheTest(_L("t_logcontact")); |
20 #undef test //there is a "test" macro which hides "RTest test" declaration. |
|
21 |
|
22 RTest test(_L("Contact Test Harness")); |
|
23 |
20 |
24 /** |
21 /** |
25 @SYMTestCaseID SYSLIB-LOGENG-CT-1018 |
22 @SYMTestCaseID SYSLIB-LOGENG-CT-1018 |
26 @SYMTestCaseDesc Tests for backup operations |
23 @SYMTestCaseDesc Tests for backup operations |
27 @SYMTestPriority High |
24 @SYMTestPriority High |
30 @SYMTestExpectedResults Test must not fail |
27 @SYMTestExpectedResults Test must not fail |
31 @SYMREQ REQ0000 |
28 @SYMREQ REQ0000 |
32 */ |
29 */ |
33 static void TestBackupL(CLogClient& aClient) |
30 static void TestBackupL(CLogClient& aClient) |
34 { |
31 { |
35 test.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-1018 ")); |
32 TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-1018 ")); |
36 CTestActive* active = new (ELeave) CTestActive; |
33 CTestActive* active = new (ELeave) CTestActive; |
37 CleanupStack::PushL(active); |
34 CleanupStack::PushL(active); |
38 |
35 |
39 CLogEvent* event = CLogEvent::NewL(); |
36 CLogEvent* event = CLogEvent::NewL(); |
40 CleanupStack::PushL(event); |
37 CleanupStack::PushL(event); |
153 } |
150 } |
154 |
151 |
155 |
152 |
156 void doTestsL() |
153 void doTestsL() |
157 { |
154 { |
158 TestUtils::Initialize(_L("T_LOGCONTACT")); |
155 TestUtils::Initialize(_L("t_logcontact")); |
159 |
156 |
160 test.Start(_L("Prepare the test environment")); |
157 TheTest.Start(_L("Prepare the test environment")); |
161 |
158 |
162 // Create log client |
159 // Create log client |
163 CLogClient* client = CLogClient::NewL(theFs); |
160 CLogClient* client = CLogClient::NewL(theFs); |
164 CleanupStack::PushL(client); |
161 CleanupStack::PushL(client); |
165 |
162 |
166 // Send a message to the hicap helper to delete logeng DB |
163 // Send a message to the hicap helper to delete logeng DB |
167 TestUtils::DeleteDatabaseL(); |
164 TestUtils::DeleteDatabaseL(); |
168 |
165 |
169 test.Next(_L("Backup")); |
166 TheTest.Next(_L("Backup")); |
170 TestBackupL(*client); |
167 TestBackupL(*client); |
171 test.Next(_L("Backup completed ok")); |
168 TheTest.Next(_L("Backup completed ok")); |
172 theLog.Write(_L8("Test 2 OK\n")); |
169 theLog.Write(_L8("Test 2 OK\n")); |
173 |
170 |
174 CleanupStack::PopAndDestroy(client); |
171 CleanupStack::PopAndDestroy(client); |
175 } |
172 } |