1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // This contains CommDb Unit Test Case 002.01 |
|
15 // |
|
16 // |
|
17 |
|
18 // EPOC includes |
|
19 #include <e32base.h> |
|
20 |
|
21 // Test system includes |
|
22 #include <networking/log.h> |
|
23 #include <networking/teststep.h> |
|
24 #include "Teststepcommdb.h" |
|
25 #include "TestSuiteCommdb.h" |
|
26 #include "step_002_01.h" |
|
27 |
|
28 #include <commdb.h> |
|
29 |
|
30 |
|
31 |
|
32 // constructor |
|
33 CCommDbTest002_01::CCommDbTest002_01() |
|
34 { |
|
35 // store the name of this test case |
|
36 iTestStepName = _L("step_002_01"); |
|
37 } |
|
38 |
|
39 // destructor |
|
40 CCommDbTest002_01::~CCommDbTest002_01() |
|
41 { |
|
42 } |
|
43 |
|
44 // do Test step 002.01 |
|
45 TVerdict CCommDbTest002_01::doTestStepL( ) |
|
46 { |
|
47 |
|
48 Log(_L("Step 002.01 called ")); |
|
49 |
|
50 // delete database file before running this test |
|
51 /*#ifdef __SECURE_DATA__ |
|
52 DeleteCurrentDatabaseL(); |
|
53 #else*/ |
|
54 //#endif |
|
55 |
|
56 CCommsDatabase* TheDb; |
|
57 TheDb=CCommsDatabase::NewL(); |
|
58 CleanupStack::PushL(TheDb); |
|
59 TVersion DbVersion = TheDb->Version(); |
|
60 |
|
61 CleanupStack::PopAndDestroy(); |
|
62 |
|
63 Log(_L("Version details: Major %d Minor %d Build %x"), DbVersion.iMajor, DbVersion.iMinor, DbVersion.iBuild); |
|
64 if ( DbVersion.iMinor == 1 && DbVersion.iMajor == 1 && DbVersion.iBuild == 0x1 ) |
|
65 { |
|
66 iTestStepResult=EPass; |
|
67 } |
|
68 else |
|
69 { |
|
70 iTestStepResult=EFail; |
|
71 } |
|
72 |
|
73 return iTestStepResult; |
|
74 } |
|