equal
deleted
inserted
replaced
|
1 // Copyright (c) 2007-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 #ifndef __T_DBNAMETEST_H__ |
|
17 #define __T_DBNAMETEST_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 #include <e32test.h> |
|
21 |
|
22 class CDbNameTest : public CActive |
|
23 { |
|
24 public: |
|
25 ~CDbNameTest(); |
|
26 static CDbNameTest* NewLC(); |
|
27 void RunTestsL(); |
|
28 |
|
29 void DoCancel() {} |
|
30 TInt RunError(TInt /* aError */) { return KErrNone; } |
|
31 void RunL(); |
|
32 enum TFileNameType |
|
33 { |
|
34 EMoreThanMaxLength =0, |
|
35 EMaxLength, |
|
36 ELessThanMaxLength, |
|
37 ENoDriveName, |
|
38 EInvalidFileName, |
|
39 ENullFileName |
|
40 |
|
41 }; |
|
42 |
|
43 private: |
|
44 CDbNameTest(); |
|
45 void ConstructL(); |
|
46 void AsyncOpenDatabaseTest(); |
|
47 void AsyncOpenDatabaseNullTestL(); |
|
48 void AsyncOpenDatabaseInvalidTest(); |
|
49 void SetAndTestFileNameL(TFileNameType aType, RArray<TInt>& aErrArray); |
|
50 |
|
51 private: |
|
52 RBuf iLongDbName; |
|
53 RBuf iInvalidDbName; |
|
54 RTest* iTest; |
|
55 TInt iFailedTests; |
|
56 CContactOpenOperation* iOpenOp; |
|
57 TPtrC iCurrName; |
|
58 CActiveSchedulerWait* iActiveSchedulerWait; |
|
59 }; |
|
60 |
|
61 #endif // __T_DBNAMETEST_H__ |