mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioPlaybackTestModule/src/MmfTsPlay_core.cpp
changeset 21 2ed61feeead6
parent 12 5a06f39ad45b
--- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioPlaybackTestModule/src/MmfTsPlay_core.cpp	Fri May 14 18:19:45 2010 -0500
+++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioPlaybackTestModule/src/MmfTsPlay_core.cpp	Fri May 28 19:26:28 2010 -0500
@@ -1934,7 +1934,7 @@
 
 	if ( !section->GetLine(KTagSoundFile, FileNamePtr, ENoTag) )
 		{
-		TBool UsingStartDefault, UsingEndDefault, UsingDefaultReportDelay;
+		TBool UsingStartDefault, UsingEndDefault, UsingDefaultReportDelay ,UsingNegativeTestCaseDefault;
 		TFileName FileName = FileNamePtr;
 	//	TInt WindowError;
 
@@ -1956,6 +1956,14 @@
 
 		ReportDelay = GetTimeIntervalL(section, KTagDelay, UsingDefaultReportDelay, (TTimeIntervalMicroSeconds32)KDefaultReportDelay);
 		iLogger->Log(_L("Setting delays to report position to [%d]"), ReportDelay.Int());
+		
+	
+		TInt NegativeTestCaseValue = GetIntL(section, KNegativeTag, UsingNegativeTestCaseDefault,0);
+		
+		if  (NegativeTestCaseValue == 1)
+		    {
+		     sndPlayer->iNegativePlayBackWindow = true;
+		    }
 
 		CParameters *reportParams = new(ELeave)CParameters(CSimpleSoundPlayer::KPlayerActionReportPosition);
 		CleanupStack::PushL(reportParams);
@@ -1975,8 +1983,14 @@
 
 		TTimeIntervalMicroSeconds ExpectedDuration = TTimeIntervalMicroSeconds(I64INT(EndPosition.Int64()) - I64INT(StartPosition.Int64()));
 		iLogger->Log(_L("ExpectedDuration: %d") ,ExpectedDuration.Int64() );
-
-		if (  Abs(ExpectedDuration.Int64() - PerceivedDuration.Int64()) > ErrorRange.Int64() )
+		
+	    if((ExpectedDuration > (sndPlayer->GetDuration())) && (sndPlayer->iNegativePlayBackWindow)) 
+		   {
+		   iLogger->Log(_L("ExpectedDuration is greater than the actual duration of the file"));
+		   iLogger->Log(_L("Negative Test was successful"));		   
+		   aResult.iResultDes.Copy(KTestCaseResultSuccess());
+       } 
+	    else if (  Abs(ExpectedDuration.Int64() - PerceivedDuration.Int64()) > ErrorRange.Int64() )
 			{	//Durations too different
 			iLogger->Log(_L("The clips duration is too different from the actual duration + position") );
 			aResult.iResult = KErrExpectedValueDifferent;