First public contribution.
2 * Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * CSyntaxTest class implementation
25 #ifndef __CSyntaxTest_H
26 #define __CSyntaxTest_H
28 #include "t_testaction.h"
29 #include "tcertwriter.h"
30 #include "SyntaxResult.h"
32 _LIT(KResultsFile, "Results.txt");
34 class CSyntaxTest : public CTestAction
37 static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole,
38 Output& aOut, const TTestActionSpec& aTestActionSpec);
39 static CTestAction* NewLC(RFs& aFs, CConsoleBase& aConsole,
40 Output& aOut, const TTestActionSpec& aTestActionSpec);
44 virtual void DoPerformPrerequisite(TRequestStatus& aStatus);
45 virtual void DoPerformPostrequisite(TRequestStatus& aStatus);
46 virtual void PerformAction(TRequestStatus& aStatus);
48 virtual void DoReportAction();
49 virtual void DoCheckResult(TInt aError);
53 CSyntaxTest(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
54 void ConstructL(const TTestActionSpec& aTestActionSpec);
55 HBufC8* readCertLC(const TDesC &aFilename);
56 void ReadAndSyntaxCheckL(const TDesC &aFilename);
57 void TestInternalizeExternalizeL(CX509Certificate* aCert);
58 TBool LoadResultsL(void);
59 TBool CheckResult(const TDesC &aFilename, const TInt &aError);
60 void PrintError(const TInt &aError);
68 FileOutput* iSyntaxOut;
70 static TInt nInstances;
71 RPointerArray<CSyntaxResult> *iExpectedResults;