Fixed unit test for Load Control object and Address module. Thank you to Chris Ellec for the patches.

This commit is contained in:
skarg
2018-05-31 00:37:20 +00:00
parent afd8687519
commit 51e672dd9a
4 changed files with 19 additions and 6 deletions
+13 -5
View File
@@ -526,12 +526,20 @@ bool WPValidateArgType(
BACNET_ERROR_CLASS * pErrorClass,
BACNET_ERROR_CODE * pErrorCode)
{
pValue = pValue;
ucExpectedTag = ucExpectedTag;
pErrorClass = pErrorClass;
pErrorCode = pErrorCode;
bool bResult;
return false;
/*
* start out assuming success and only set up error
* response if validation fails.
*/
bResult = true;
if (pValue->tag != ucExpectedTag) {
bResult = false;
*pErrorClass = ERROR_CLASS_PROPERTY;
*pErrorCode = ERROR_CODE_INVALID_DATA_TYPE;
}
return (bResult);
}
void testAnalogOutput(
+1
View File
@@ -1467,6 +1467,7 @@ void testLoadControl(
uint32_t decoded_instance = 0;
BACNET_READ_PROPERTY_DATA rpdata;
Analog_Output_Init();
Load_Control_Init();
rpdata.application_data = &apdu[0];
rpdata.application_data_len = sizeof(apdu);