Commit f09a7471b08117a7d53f2e7866589cfc5702e79f

Authored by Stéphane Raimbault
1 parent 618f06ba

Enhance the output of the bad response test.

Showing 1 changed file with 5 additions and 4 deletions
tests/unit-test-master.c
... ... @@ -254,7 +254,7 @@ int main(void)
254 254 printf("OK\n");
255 255  
256 256  
257   - /** ILLEGAL DATA ADDRESS */
  257 + /** ILLEGAL DATA ADDRESS **/
258 258 printf("\nTEST ILLEGAL DATA ADDRESS:\n");
259 259  
260 260 /* The mapping begins at 0 and ending at address + nb_points so
... ... @@ -333,7 +333,7 @@ int main(void)
333 333 }
334 334  
335 335  
336   - /** TOO MANY DATA */
  336 + /** TOO MANY DATA **/
337 337 printf("\nTEST TOO MANY DATA ERROR:\n");
338 338  
339 339 ret = read_coil_status(&mb_param, SLAVE,
... ... @@ -398,16 +398,17 @@ int main(void)
398 398 printf("FAILED\n");
399 399 }
400 400  
401   - /* BAD RESPONSE */
  401 + /** BAD RESPONSE **/
  402 + printf("\nTEST BAD RESPONSE ERROR:\n");
402 403  
403 404 /* Allocate only the required space */
404 405 uint16_t *tab_rp_registers_bad = (uint16_t *) malloc(
405 406 UT_HOLDING_REGISTERS_NB_POINTS_SPECIAL * sizeof(uint16_t));
406   - printf("1/1 read_holding_registers: ");
407 407 ret = read_holding_registers(&mb_param,
408 408 SLAVE, UT_HOLDING_REGISTERS_ADDRESS,
409 409 UT_HOLDING_REGISTERS_NB_POINTS_SPECIAL,
410 410 tab_rp_registers_bad);
  411 + printf("* read_holding_registers: ");
411 412 if (ret > 0) {
412 413 /* Error not detected */
413 414 printf("FAILED\n");
... ...