XilinxProcessorIPLib/drivers/hdcp22_tx/src/xhdcp22_tx_test.c
u8 XHdcp22Tx_TestCheckResults(XHdcp22_Tx* InstancePtr,
                              XHdcp22_Tx_LogItem *Expected, u32 nExpected)
{
	u32 iLog = 0;
	u32 iExpected = 0;
	u8  Result = (TRUE);

	for (iExpected=0; iExpected<nExpected; iExpected++)
	{
		if (InstancePtr->Log.LogItems[iLog].LogEvent != Expected[iExpected].LogEvent ||
			InstancePtr->Log.LogItems[iLog].Data != Expected[iExpected].Data) {
				xil_printf("FAIL in step %d: \r\n\tExpected log event=%d, actual=%d\r\n"
				           "\tExpected data=0x%.2x, actual=0x%.2x\r\n",
				           iExpected,  Expected[iExpected].LogEvent,
				           InstancePtr->Log.LogItems[iLog].LogEvent,
				           Expected[iExpected].Data,
				           InstancePtr->Log.LogItems[iLog].Data);

				Result = (FALSE);
				break;
		}
		iLog++;
	}
	return Result;
}
/*****************************************************************************/
/**
*
* Compare logged results with expected results as a validation method.
*
* @param  InstancePtr is a pointer to the HDCP22 TX core instance.
* @param  Expected specifies expected logitems to compare with.
* @param  nExpected specifies number of items to compare with.
*
* @return None.
*
* @note   None.
*
******************************************************************************/
Compare logged results with expected results as a validation method.
Compare logged results with expected results as a validation method .
u8 XHdcp22Tx_TestCheckResults(XHdcp22_Tx* InstancePtr,
                              XHdcp22_Tx_LogItem *Expected, u32 nExpected)
{
	u32 iLog = 0;
	u32 iExpected = 0;
	u8  Result = (TRUE);
	for (iExpected=0; iExpected<nExpected; iExpected++)
	{
		if (InstancePtr->Log.LogItems[iLog].LogEvent != Expected[iExpected].LogEvent ||
			InstancePtr->Log.LogItems[iLog].Data != Expected[iExpected].Data) {
				xil_printf("FAIL in step %d: \r\n\tExpected log event=%d, actual=%d\r\n"
				           "\tExpected data=0x%.2x, actual=0x%.2x\r\n",
				           iExpected,  Expected[iExpected].LogEvent,
				           InstancePtr->Log.LogItems[iLog].LogEvent,
				           Expected[iExpected].Data,
				           InstancePtr->Log.LogItems[iLog].Data);
				Result = (FALSE);
				break;
		}
		iLog++;
	}
	return Result;
}
u8 XHdcp22Tx_TestCheckResults ( XHdcp22_Tx * InstancePtr , XHdcp22_Tx_LogItem * Expected , u32 nExpected ) { u32 iLog = 0 ; u32 iExpected = 0 ; u8 Result = ( TRUE ) ; for ( iExpected = 0 ; iExpected < nExpected ; iExpected ++ ) { if ( InstancePtr -> Log . LogItems [ iLog ] . LogEvent != Expected [ iExpected ] . LogEvent || InstancePtr -> Log . LogItems [ iLog ] . Data != Expected [ iExpected ] . Data ) { xil_printf ( " \r \n \t \r \n " " \t \r \n " , iExpected , Expected [ iExpected ] . LogEvent , InstancePtr -> Log . LogItems [ iLog ] . LogEvent , Expected [ iExpected ] . Data , InstancePtr -> Log . LogItems [ iLog ] . Data ) ; Result = ( FALSE ) ; break ; } iLog ++ ; } return Result ; }
Compare logged results with expected results as a validation method.
Compare logged results with expected results as a validation method .