--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmlibs/mmfw/tsrc/mmfunittest/aclnt/TSU_MMF_ACLNT_01/TestStepConvertNew.cpp Thu Oct 07 22:34:12 2010 +0100
@@ -0,0 +1,141 @@
+// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// This file contains an example Test step implementation
+// This demonstrates the various functions provided
+// by the CTestStep base class which are available within
+// a test step
+//
+//
+
+// EPOC includes
+#include <e32base.h>
+#include <e32test.h>
+#include <e32keys.h>
+#include <c32comm.h>
+#include <f32file.h>
+#include <etel.h>
+#include <etelmm.h>
+#include <testframework.h>
+
+//#include <MdaAudioSamplePlayer.h>
+#include <mdaaudiosampleeditor.h>
+//#include <MdaAudioTonePlayer.h>
+
+// Test system includes
+#include <testframework.h>
+
+// Specific includes for this test suite
+#include "TestStepUnitMMFAudClient.h"
+#include "TestSuiteUnitMMFAudClient.h"
+
+// Specific includes for these test steps
+#include "TestStepConvert.h"
+
+
+#include "MmfAudioController.h"
+#include "mmfclientaudioconverter.h"
+//#include "MmfClientAudioPlayer.h"
+//#include <mmffourcc.h>
+//#include <mmfpaniccodes.h>
+//#include <mmfFormatImplementationUIDs.hrh>
+// --------------------------------------------
+
+/**
+ *
+ * Static constructor for CTestStepRecorderNew.
+ *
+ *
+ * @return "CTestStepConvertAllocFailNew*"
+ * The constructed CTestStepConvertAllocFailNew
+ *
+ * @xxxx
+ *
+ */
+CTestStepConvertNew* CTestStepConvertNew::NewL()
+ {
+ CTestStepConvertNew* self = new(ELeave) CTestStepConvertNew;
+ return self;
+ }
+
+/**
+ *
+ * Test step constructor.
+ * Each test step initialises its own name.
+ *
+ * @xxxx
+ *
+ */
+CTestStepConvertNew::CTestStepConvertNew()
+ {
+ // store the name of this test case
+ // this is the name that is used by the script file
+ iTestStepName = _L("MM-MMF-ACLNT-U-0550-CP");
+ }
+
+/**
+ *
+ * Test step destructor.
+ *
+ * @xxxx
+ *
+ */
+CTestStepConvertNew::~CTestStepConvertNew()
+ {
+ }
+
+void CTestStepConvertNew::MoscoStateChangeEvent(CBase* /*aObject*/,
+ TInt /*aPreviousState*/,
+ TInt /*aCurrentState*/,
+ TInt aErrorcCode)
+ {
+ iError = aErrorcCode;
+ CActiveScheduler::Stop();
+ }
+
+/**
+ *
+ * Do the test step.
+ * Each test step must supply an implementation for DoTestStepL.
+ *
+ * @return "TVerdict"
+ * The result of the test step
+ *
+ * @xxxx
+ *
+ */
+TVerdict CTestStepConvertNew::DoTestStepL()
+ {
+ iTestStepResult = EPass;
+
+ // Printing to the console and log file
+ INFO_PRINTF1(_L("MM-MMF-ACLNT-U-0550-CP"));
+ INFO_PRINTF1(_L("this is test of CMdaAudioConvertUtility::NewL() "));
+
+ __MM_HEAP_MARK;
+ iConvert = CMdaAudioConvertUtility::NewL(*this);
+
+ if (iConvert == NULL ||
+ iError != KErrNone ||
+ iConvert->State() != CMdaAudioConvertUtility::ENotReady )
+ iTestStepResult = EFail;
+
+ delete iConvert;
+ iConvert = NULL;
+ __MM_HEAP_MARKEND;
+
+ INFO_PRINTF1(_L("finished with this test step"));
+ // test steps return a result
+ return iTestStepResult;
+ }
+