Commit b0c05667dfc60cc82a14109561853deb92404b5d
1 parent
014a9fcd
Fix double negative in tests
Showing
1 changed file
with
2 additions
and
2 deletions
tests/unit-test-client.c
| ... | ... | @@ -496,7 +496,7 @@ int main(int argc, char *argv[]) |
| 496 | 496 | ASSERT_TRUE(rc == -1 && errno == ETIMEDOUT, ""); |
| 497 | 497 | |
| 498 | 498 | rc = modbus_set_slave(ctx, MODBUS_BROADCAST_ADDRESS); |
| 499 | - ASSERT_TRUE(rc != -1, "Invalid broadcast address"); | |
| 499 | + ASSERT_TRUE(rc == 0, "Invalid broadcast address"); | |
| 500 | 500 | |
| 501 | 501 | rc = modbus_read_registers(ctx, UT_REGISTERS_ADDRESS, |
| 502 | 502 | UT_REGISTERS_NB, tab_rp_registers); |
| ... | ... | @@ -508,7 +508,7 @@ int main(int argc, char *argv[]) |
| 508 | 508 | ASSERT_TRUE(rc == UT_REGISTERS_NB, ""); |
| 509 | 509 | |
| 510 | 510 | rc = modbus_set_slave(ctx, MODBUS_BROADCAST_ADDRESS); |
| 511 | - ASSERT_TRUE(rc != -1, "Invalid broacast address"); | |
| 511 | + ASSERT_TRUE(rc == 0, "Invalid broacast address"); | |
| 512 | 512 | |
| 513 | 513 | rc = modbus_read_registers(ctx, UT_REGISTERS_ADDRESS, |
| 514 | 514 | UT_REGISTERS_NB, tab_rp_registers); | ... | ... |