Closed JWhitleyWork closed 5 years ago
Some more Node Tests that I think might be valuable:
- [ ] With both nodes connected, write to /writer/can_rx Expected output: Identical message published on /reader/can_tx
I added this one at the bottom:
Some more Node Tests that I think might be valuable:
- [ ] Send message with DLC 0 Expected output: Message received with empty payload
- [ ] Send message with data.size != dlc Expected output ??
- [ ] Send message with ID > 2^11 and is_extended flag not set Expected output: ???
- [ ] Send message with ID < 2^11 and is_extended flag set Expected output: Message as normal, left zero padded ID
I added these with one change: The last item causes a write failure at the Kvaser canlib level so I would expect it to do the same in kvaser_interface
.
This is to discuss the addition of automated unit and node tests and what tests make sense to complete. The tests below assume that 2 virtual CAN channels have been created. After some discussion with @zoakesAStuff, this is an initial pass:
Unit Tests (for
kvaser_interface
) - Implemented in #37Node Tests (for
kvaser_can_bridge
) - Implemented in #40These tests assume that the virtual channels (2) are still available. The testing rig would set up 2 instances of
kvaser_can_bridge
: One connected to channel 1 (writer) and one connected to channel 2 (reader).