You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
659 B
C++
25 lines
659 B
C++
#include "tests.h"
|
|
#include "p_serial_packet.h"
|
|
|
|
void run_tests()
|
|
{
|
|
|
|
// tests
|
|
ps_packet test_pkt_send = ps_packet::test_packet_send();
|
|
test_pkt_send.encode();
|
|
test_pkt_send.show_packet();
|
|
printf("\n\n");
|
|
bool decode_ret = test_pkt_send.decode();
|
|
printf("Decode was %s\n", decode_ret ? "Successful" : "Unsuccessful");
|
|
test_pkt_send.show_packet();
|
|
printf("\n\n");
|
|
|
|
ps_packet test_pkt_recv = ps_packet::test_packet_recv();
|
|
bool decode_ret_recv = test_pkt_recv.decode();
|
|
printf("Decode was %s\n", decode_ret_recv ? "Successful" : "Unsuccessful");
|
|
test_pkt_recv.show_packet();
|
|
printf("\n\n");
|
|
test_pkt_recv.encode();
|
|
test_pkt_recv.show_packet();
|
|
}
|