|
1 // Copyright (c) 2002-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 // |
|
15 |
|
16 #include <e32test.h> |
|
17 #include <ecom/ecom.h> |
|
18 #include "ConvertDates.h" |
|
19 |
|
20 _LIT(KTestName,"Basic Calcon tests."); |
|
21 LOCAL_D RTest test(KTestName); |
|
22 |
|
23 void mainL(); |
|
24 |
|
25 GLDEF_C TInt E32Main() |
|
26 { |
|
27 __UHEAP_MARK; |
|
28 CTrapCleanup* cleanupStack=CTrapCleanup::New(); |
|
29 |
|
30 TRAPD(error,mainL()); |
|
31 test(KErrNone == error); |
|
32 REComSession::FinalClose(); |
|
33 |
|
34 delete cleanupStack; |
|
35 __UHEAP_MARKEND; |
|
36 return KErrNone; |
|
37 } |
|
38 |
|
39 /** |
|
40 @SYMTestCaseID PIM-TCCNMAIN-0001 |
|
41 */ |
|
42 |
|
43 void mainL() |
|
44 { |
|
45 CConvertDates* convDates = CConvertDates::NewL(); |
|
46 CleanupStack::PushL(convDates); |
|
47 |
|
48 convDates->iTest(convDates->IntegrityTestL()); |
|
49 |
|
50 TInt err=KErrNone; |
|
51 TRAP(err,convDates->ConvertL(1)); |
|
52 convDates->iTest(err == KErrNone); |
|
53 TRAP(err,convDates->ConvertL(2)); |
|
54 convDates->iTest(err == KErrNone); |
|
55 |
|
56 convDates->iTest(convDates->CompareL()); |
|
57 convDates->iTest.Start(_L("@SYMTestCaseID PIM-TCCNMAIN-0001")); |
|
58 convDates->iTest.End(); |
|
59 convDates->iTest.Close(); |
|
60 |
|
61 CleanupStack::PopAndDestroy(convDates); |
|
62 } |