Uses a loopback stream to set up communication between a master and slave on the same machine. Exercises various MODBUS functions, and tests that the results are correct. Test failures are reported to Serial, labelled "FAIL".
Also contains a couple of bug-fixes, which ensure that junk is not included in the MODBUS messages. (Found by the test harness.)
The motivation is to prepare for future code changes. Having a working test harness will help to ensure that changes have not broken anything.
Uses a loopback stream to set up communication between a master and slave on the same machine. Exercises various MODBUS functions, and tests that the results are correct. Test failures are reported to Serial, labelled "FAIL".
Also contains a couple of bug-fixes, which ensure that junk is not included in the MODBUS messages. (Found by the test harness.)
The motivation is to prepare for future code changes. Having a working test harness will help to ensure that changes have not broken anything.