kerneltest/e32test/dma/d_dma.cpp
branchRCL_3
changeset 43 c1f20ce4abcf
parent 28 5b5d147c7838
child 44 3e88ff8f41d5
--- a/kerneltest/e32test/dma/d_dma.cpp	Thu Aug 19 11:14:22 2010 +0300
+++ b/kerneltest/e32test/dma/d_dma.cpp	Tue Aug 31 16:34:26 2010 +0300
@@ -159,6 +159,7 @@
 #endif
 
 
+#ifndef DMA_APIV2
 static TInt FragmentCount(DDmaRequest* aRequest)
 	{
 	TInt count = 0;
@@ -166,6 +167,7 @@
 		count++;
 	return count;
 	}
+#endif
 
 
 //////////////////////////////////////////////////////////////////////////////
@@ -258,6 +260,19 @@
 		r = TDmaChannel::Open(info, iChannel);
 		if (r!= KErrNone)
 			return r;
+
+		// ---> Code coverage of rarely called functions
+		const TDmac* const c = iChannel->Controller();
+		if (!c)
+			return KErrGeneral;
+		const TInt mts = iChannel->MaxTransferSize(0, iCookie);
+		if (mts == 0)
+			return KErrGeneral;
+		const TUint mam = iChannel->MemAlignMask(0, iCookie);
+		if (~mam == 0)
+			return KErrGeneral;
+		// <--- Code coverage of rarely called functions
+
 		iClient = &Kern::CurrentThread();
 		for (TInt i=0; i<KMaxRequests; ++i)
 			{
@@ -388,7 +403,11 @@
 		{
 		TInt reqIdx = (TInt)a1;
 		__ASSERT_DEBUG(0 <= reqIdx && reqIdx < KMaxRequests, Kern::PanicCurrentThread(KClientPanicCat, __LINE__));
+#ifdef DMA_APIV2
+		return iRequests[reqIdx]->FragmentCount();
+#else
 		return FragmentCount(iRequests[reqIdx]);
+#endif
 		}
 	case RTestDma::EMissInterrupts:
 		return iChannel->MissNextInterrupts((TInt)a1);