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