resourcemgmt/hwresourcesmgr/test/te_hwrm/hwrmtest.cpp
changeset 78 3f0699f2e14c
parent 70 653a8b91b95e
--- a/resourcemgmt/hwresourcesmgr/test/te_hwrm/hwrmtest.cpp	Tue Oct 12 15:02:43 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/test/te_hwrm/hwrmtest.cpp	Thu Oct 14 12:47:54 2010 +0300
@@ -288,6 +288,8 @@
 	ADD_TEST_STEP_ISO_CPP(CHWRMTest, TestFmTxEnableDuringPowersaveL);
 	
 #endif // INSECURE_AUDIO_POLICY_KEYS
+    ADD_TEST_STEP_ISO_CPP(CHWRMTest, TestFmTxGetNextClearFrequencyWithoutEnableL);
+
 
 	END_SUITE;
 	}
@@ -4407,7 +4409,7 @@
 	INFO_PRINTF1(_L("Start test step: TestFmTxGetNextClearFrequencyArrayL"));
 	
 	AddTestStateL(this, &CHWRMTest::FmTxOpenL, KTwoTimeUnits);
-	AddTestStateL(this, &CHWRMTest::FmTxGetNextClearFrequencyArrayWhileDisabledL, KOneTimeUnit);
+	//AddTestStateL(this, &CHWRMTest::FmTxGetNextClearFrequencyArrayWhileDisabledL, KOneTimeUnit);
 	AddTestStateL(this, &CHWRMTest::FmTxEnableL, KTwoTimeUnits);
 	AddTestStateL(this, &CHWRMTest::FmTxGetNextClearFrequencyArrayErrArgumentMinL, KOneTimeUnit);
 	AddTestStateL(this, &CHWRMTest::FmTxGetNextClearFrequencyArrayErrArgumentMaxL, KOneTimeUnit);
@@ -4639,6 +4641,17 @@
 
 #endif // INSECURE_AUDIO_POLICY_KEYS
 
+void CHWRMTest::TestFmTxGetNextClearFrequencyWithoutEnableL()
+	{
+	INFO_PRINTF1(_L("Start test step: TestFmTxGetNextClearFrequencyWithoutEnableL"));
+	
+	AddTestStateL(this, &CHWRMTest::FmTxOpenL, KTwoTimeUnits);
+	AddTestStateL(this, &CHWRMTest::FmTxGetNextClearFrequencyWithoutEnableL, KTwoTimeUnits);	
+	
+    ExecuteTestL();
+	}
+
+
 void CHWRMTest::InvalidSessionLightL()
 	{
 	INFO_PRINTF1(_L("Step state: InvalidSessionLightL"));
@@ -8697,6 +8710,28 @@
 #endif // INSECURE_AUDIO_POLICY_KEYS	
 
 
+
+void CHWRMTest::FmTxGetNextClearFrequencyWithoutEnableL()
+	{
+	INFO_PRINTF1(_L("Step state: FmTxGetNextClearFrequencyWithoutEnableL"));
+	
+	CHWRMFmTx& fmTx = GetFmTxSessionWithCallbackRegisteredL();
+
+    ExpectFmTxStatusNotificationL(EFmTxStateOff, EFmTxStateInactive); 
+    ExpectFmTxStatusNotificationL(EFmTxStateInactive, EFmTxStateOff);
+		
+	TInt clearFrequency;
+	fmTx.GetNextClearFrequencyL(clearFrequency);
+	
+	// the frequency that is returned is hard coded in the cmockfmtxengine
+	if (clearFrequency != 89000)
+		{
+		User::Leave(KErrGeneral);
+		}
+	}
+
+
+
 //
 // THE FOLLOWING STEPS AND STATES TEST LIGHT API DEPENDING ON 
 // PRODUCT-SPECIFIC PHYSICAL DEVICE CONFIGURATION (FLIP, SLIDER, ETC.