From e886f3b41fdf7e77666dff3dbd15af1d2ae00c5a Mon Sep 17 00:00:00 2001 From: KaitlynAnn99 Date: Mon, 25 Nov 2024 16:06:36 -0500 Subject: [PATCH] lol one more --- include/tiny_gea_packet.h | 2 +- test/tests/tiny_erd_client_test.cpp | 10 +-- test/tests/tiny_gea2_interface_test.cpp | 88 ++++++++++++------------- test/tests/tiny_gea3_interface_test.cpp | 48 +++++++------- 4 files changed, 74 insertions(+), 74 deletions(-) diff --git a/include/tiny_gea_packet.h b/include/tiny_gea_packet.h index b16506d..0512728 100644 --- a/include/tiny_gea_packet.h +++ b/include/tiny_gea_packet.h @@ -45,7 +45,7 @@ enum { /*! * Macro for statically allocating a GEA3 packet with a given payload size. Payload size is set automatically. */ -#define tiny_gea3_STATIC_ALLOC_PACKET(_name, _payloadLength) \ +#define tiny_gea_STATIC_ALLOC_PACKET(_name, _payloadLength) \ static uint8_t _name##Storage[_payloadLength + tiny_gea_packet_overhead] = { 0, _payloadLength }; \ static tiny_gea_packet_t* const _name = (tiny_gea_packet_t*)_name##Storage diff --git a/test/tests/tiny_erd_client_test.cpp b/test/tests/tiny_erd_client_test.cpp index 4196a7e..ef7b650 100644 --- a/test/tests/tiny_erd_client_test.cpp +++ b/test/tests/tiny_erd_client_test.cpp @@ -244,7 +244,7 @@ TEST_GROUP(tiny_erd_client) #define a_read_request_should_be_sent(request_id, address, erd) \ do { \ - tiny_gea3_STATIC_ALLOC_PACKET(request, 4); \ + tiny_gea_STATIC_ALLOC_PACKET(request, 4); \ request->source = endpoint_address; \ request->destination = address; \ request->payload[0] = tiny_gea3_erd_api_command_read_request; \ @@ -257,7 +257,7 @@ TEST_GROUP(tiny_erd_client) #define a_write_request_should_be_sent(request_id, address, erd, data) \ do { \ if(sizeof(data) == 1) { \ - tiny_gea3_STATIC_ALLOC_PACKET(request, 6); \ + tiny_gea_STATIC_ALLOC_PACKET(request, 6); \ request->source = endpoint_address; \ request->destination = address; \ request->payload[0] = tiny_gea3_erd_api_command_write_request; \ @@ -269,7 +269,7 @@ TEST_GROUP(tiny_erd_client) should_be_sent(request); \ } \ else { \ - tiny_gea3_STATIC_ALLOC_PACKET(request, 7); \ + tiny_gea_STATIC_ALLOC_PACKET(request, 7); \ request->source = endpoint_address; \ request->destination = address; \ request->payload[0] = tiny_gea3_erd_api_command_write_request; \ @@ -285,7 +285,7 @@ TEST_GROUP(tiny_erd_client) #define a_subscribe_all_request_should_be_sent(request_id, address, retain) \ do { \ - tiny_gea3_STATIC_ALLOC_PACKET(request, 3); \ + tiny_gea_STATIC_ALLOC_PACKET(request, 3); \ request->source = endpoint_address; \ request->destination = address; \ request->payload[0] = tiny_gea3_erd_api_command_subscribe_all_request; \ @@ -296,7 +296,7 @@ TEST_GROUP(tiny_erd_client) #define a_subscription_publication_acknowledgment_should_be_sent(request_id, address, context) \ do { \ - tiny_gea3_STATIC_ALLOC_PACKET(request, 3); \ + tiny_gea_STATIC_ALLOC_PACKET(request, 3); \ request->source = endpoint_address; \ request->destination = address; \ request->payload[0] = tiny_gea3_erd_api_command_publication_acknowledgment; \ diff --git a/test/tests/tiny_gea2_interface_test.cpp b/test/tests/tiny_gea2_interface_test.cpp index 7dd828e..01721b5 100644 --- a/test/tests/tiny_gea2_interface_test.cpp +++ b/test/tests/tiny_gea2_interface_test.cpp @@ -217,7 +217,7 @@ TEST_GROUP(tiny_gea2_interface) { should_send_bytes_via_uart(tiny_gea_stx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = 0x45; packet->payload[0] = 0xC8; when_packet_is_sent(packet); @@ -236,7 +236,7 @@ TEST_GROUP(tiny_gea2_interface) 0x39, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 0); + tiny_gea_STATIC_ALLOC_PACKET(packet, 0); packet->destination = 0x45; when_packet_is_sent(packet); } @@ -265,7 +265,7 @@ TEST_GROUP(tiny_gea2_interface) 0x07, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 0); + tiny_gea_STATIC_ALLOC_PACKET(packet, 0); packet->destination = 0xFF; when_packet_is_sent(packet); } @@ -287,7 +287,7 @@ TEST_GROUP(tiny_gea2_interface) 0x39, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 0); + tiny_gea_STATIC_ALLOC_PACKET(packet, 0); packet->destination = 0x45; when_packet_is_sent(packet); @@ -306,7 +306,7 @@ TEST_GROUP(tiny_gea2_interface) 0x39, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 0); + tiny_gea_STATIC_ALLOC_PACKET(packet, 0); packet->destination = 0x45; when_packet_is_sent(packet); @@ -316,7 +316,7 @@ TEST_GROUP(tiny_gea2_interface) void should_be_able_to_send_a_message_after_collision_cooldown() { given_uart_echoing_is_enabled(); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 0); + tiny_gea_STATIC_ALLOC_PACKET(packet, 0); packet->destination = 0x45; when_packet_is_sent(packet); @@ -335,7 +335,7 @@ TEST_GROUP(tiny_gea2_interface) void given_the_module_is_in_collision_cooldown() { should_send_bytes_via_uart(tiny_gea_stx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 0); + tiny_gea_STATIC_ALLOC_PACKET(packet, 0); packet->destination = 0x45; when_packet_is_sent(packet); @@ -365,7 +365,7 @@ TEST(tiny_gea2_interface, should_receive_a_packet_with_no_payload_and_send_an_ac 0x8F, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 0); + tiny_gea_STATIC_ALLOC_PACKET(packet, 0); packet->destination = address; packet->source = 0x45; packet_should_be_received(packet); @@ -385,7 +385,7 @@ TEST(tiny_gea2_interface, should_receive_a_packet_with_a_payload) 0x0D, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = address; packet->source = 0x45; packet->payload[0] = 0xBF; @@ -409,7 +409,7 @@ TEST(tiny_gea2_interface, should_receive_a_packet_with_maximum_payload) 0x48, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 4); + tiny_gea_STATIC_ALLOC_PACKET(packet, 4); packet->destination = address; packet->source = 0x45; packet->payload[0] = 0x01; @@ -474,7 +474,7 @@ TEST(tiny_gea2_interface, should_receive_a_packet_with_escapes) 0x3D, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 4); + tiny_gea_STATIC_ALLOC_PACKET(packet, 4); packet->destination = address; packet->source = 0x45; packet->payload[0] = tiny_gea_esc; @@ -497,7 +497,7 @@ TEST(tiny_gea2_interface, should_receive_broadcast_packets) 0x5E, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = 0xFF; packet->source = 0x45; packet->payload[0] = 0xBF; @@ -517,7 +517,7 @@ TEST(tiny_gea2_interface, should_receive_product_line_specific_broadcast_packets 0x6C, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = 0xF3; packet->source = 0x45; packet->payload[0] = 0xBF; @@ -554,7 +554,7 @@ TEST(tiny_gea2_interface, should_receive_multiple_packets) 0x8F, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet1, 0); + tiny_gea_STATIC_ALLOC_PACKET(packet1, 0); packet1->destination = address; packet1->source = 0x45; packet_should_be_received(packet1); @@ -573,7 +573,7 @@ TEST(tiny_gea2_interface, should_receive_multiple_packets) 0x0D, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet2, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet2, 1); packet2->destination = address; packet2->source = 0x45; packet2->payload[0] = 0xBF; @@ -651,7 +651,7 @@ TEST(tiny_gea2_interface, should_drop_packets_received_before_publishing_a_previ 0x5E, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = address; packet->source = 0x45; packet->payload[0] = 0xBF; @@ -675,7 +675,7 @@ TEST(tiny_gea2_interface, should_receive_a_packet_after_a_previous_packet_is_abo 0x0D, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = address; packet->source = 0x45; packet->payload[0] = 0xBF; @@ -697,7 +697,7 @@ TEST(tiny_gea2_interface, should_drop_bytes_received_prior_to_stx) 0x0D, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = address; packet->source = 0x45; packet->payload[0] = 0xBF; @@ -723,7 +723,7 @@ TEST(tiny_gea2_interface, should_not_publish_received_packets_prior_to_receiving ack_should_be_sent(); after_bytes_are_received_via_uart(tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = address; packet->source = 0x45; packet->payload[0] = 0xBF; @@ -817,7 +817,7 @@ TEST(tiny_gea2_interface, should_send_a_packet_with_no_payload) 0x39, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 0); + tiny_gea_STATIC_ALLOC_PACKET(packet, 0); packet->destination = 0x45; when_packet_is_sent(packet); } @@ -836,7 +836,7 @@ TEST(tiny_gea2_interface, should_send_a_packet_with_a_payload) 0xD3, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = 0x45; packet->payload[0] = 0xD5; when_packet_is_sent(packet); @@ -862,7 +862,7 @@ TEST(tiny_gea2_interface, should_send_a_packet_with_max_payload_given_send_buffe 0xD5, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 7); + tiny_gea_STATIC_ALLOC_PACKET(packet, 7); packet->destination = 0x45; packet->payload[0] = 0x00; packet->payload[1] = 0x01; @@ -888,7 +888,7 @@ TEST(tiny_gea2_interface, should_raise_a_packet_sent_event_when_a_packet_is_sent 0xD3, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = 0x45; packet->payload[0] = 0xD5; when_packet_is_sent(packet); @@ -898,7 +898,7 @@ TEST(tiny_gea2_interface, should_not_send_a_packet_that_is_too_large_for_the_sen { given_uart_echoing_is_enabled(); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 8); + tiny_gea_STATIC_ALLOC_PACKET(packet, 8); when_packet_is_sent(packet); } @@ -918,7 +918,7 @@ TEST(tiny_gea2_interface, should_escape_data_bytes_when_sending) 0x04, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = 0x45; packet->payload[0] = 0xE1; when_packet_is_sent(packet); @@ -939,7 +939,7 @@ TEST(tiny_gea2_interface, should_escape_crc_lsb_when_sending) 0xE1, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = 0x45; packet->payload[0] = 0xA0; when_packet_is_sent(packet); @@ -960,7 +960,7 @@ TEST(tiny_gea2_interface, should_escape_crc_msb_when_sending) 0x4F, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = 0x45; packet->payload[0] = 0xC8; when_packet_is_sent(packet); @@ -980,7 +980,7 @@ TEST(tiny_gea2_interface, should_allow_packets_to_be_forwarded) 0x06, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->source = 0x32; packet->destination = 0x45; packet->payload[0] = 0xD5; @@ -1007,7 +1007,7 @@ TEST(tiny_gea2_interface, should_forward_a_packet_with_max_payload_given_send_bu 0xD5, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 7); + tiny_gea_STATIC_ALLOC_PACKET(packet, 7); packet->source = address; packet->destination = 0x45; packet->payload[0] = 0x00; @@ -1024,7 +1024,7 @@ TEST(tiny_gea2_interface, should_not_forward_packets_that_are_too_large_to_be_bu { given_uart_echoing_is_enabled(); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 8); + tiny_gea_STATIC_ALLOC_PACKET(packet, 8); when_packet_is_forwarded(packet); } @@ -1044,7 +1044,7 @@ TEST(tiny_gea2_interface, should_wait_until_the_idle_cool_down_time_has_expired_ given_the_module_is_in_cooldown_after_receiving_a_message(); nothing_should_happen(); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 0); + tiny_gea_STATIC_ALLOC_PACKET(packet, 0); packet->destination = 0x45; when_packet_is_sent(packet); @@ -1054,7 +1054,7 @@ TEST(tiny_gea2_interface, should_wait_until_the_idle_cool_down_time_has_expired_ TEST(tiny_gea2_interface, should_retry_sending_when_the_reflection_timeout_violation_occurs_and_stop_after_retries_are_exhausted) { should_send_bytes_via_uart(tiny_gea_stx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 0); + tiny_gea_STATIC_ALLOC_PACKET(packet, 0); packet->destination = 0x45; when_packet_is_sent(packet); @@ -1087,7 +1087,7 @@ TEST(tiny_gea2_interface, should_retry_sending_when_the_reflection_timeout_viola TEST(tiny_gea2_interface, should_raise_reflection_timed_out_diagnostics_event_when_a_reflection_timeout_retry_sending_when_the_reflection_timeout_violation_occurs_and_stop_after_retrries_are_exhausted) { should_send_bytes_via_uart(tiny_gea_stx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 0); + tiny_gea_STATIC_ALLOC_PACKET(packet, 0); packet->destination = 0x45; when_packet_is_sent(packet); @@ -1097,7 +1097,7 @@ TEST(tiny_gea2_interface, should_raise_reflection_timed_out_diagnostics_event_wh TEST(tiny_gea2_interface, should_retry_sending_when_a_collision_occurs_and_stop_after_retries_are_exhausted) { should_send_bytes_via_uart(tiny_gea_stx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 0); + tiny_gea_STATIC_ALLOC_PACKET(packet, 0); packet->destination = 0x45; when_packet_is_sent(packet); @@ -1127,7 +1127,7 @@ TEST(tiny_gea2_interface, should_retry_sending_when_a_collision_occurs_and_stop_ given_that_retries_have_been_set_to(1); should_send_bytes_via_uart(tiny_gea_stx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 0); + tiny_gea_STATIC_ALLOC_PACKET(packet, 0); packet->destination = 0x45; when_packet_is_sent(packet); @@ -1172,11 +1172,11 @@ TEST(tiny_gea2_interface, should_stop_sending_when_an_unexpected_byte_is_receive TEST(tiny_gea2_interface, should_ignore_send_requests_when_already_sending) { should_send_bytes_via_uart(tiny_gea_stx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 0); + tiny_gea_STATIC_ALLOC_PACKET(packet, 0); packet->destination = 0x45; when_packet_is_sent(packet); - tiny_gea3_STATIC_ALLOC_PACKET(differentPacket, 0); + tiny_gea_STATIC_ALLOC_PACKET(differentPacket, 0); packet->destination = 0x80; when_packet_is_sent(differentPacket); @@ -1196,7 +1196,7 @@ TEST(tiny_gea2_interface, should_retry_a_message_if_no_ack_is_received) 0x39, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 0); + tiny_gea_STATIC_ALLOC_PACKET(packet, 0); packet->destination = 0x45; when_packet_is_sent(packet); @@ -1250,7 +1250,7 @@ TEST(tiny_gea2_interface, should_successfully_receive_a_packet_while_in_collisio 0x8F, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 0); + tiny_gea_STATIC_ALLOC_PACKET(packet, 0); packet->destination = address; packet->source = 0x45; packet_should_be_received(packet); @@ -1280,7 +1280,7 @@ TEST(tiny_gea2_interface, should_restart_idle_timeout_when_byte_traffic_occurs) given_the_module_is_in_idle_cooldown(); nothing_should_happen(); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 0); + tiny_gea_STATIC_ALLOC_PACKET(packet, 0); packet->destination = 0x45; when_packet_is_sent(packet); @@ -1317,7 +1317,7 @@ TEST(tiny_gea2_interface, should_not_start_receiving_a_packet_while_a_received_p 0x4B, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 0); + tiny_gea_STATIC_ALLOC_PACKET(packet, 0); packet->destination = address; packet->source = 0x45; packet_should_be_received(packet); @@ -1330,7 +1330,7 @@ TEST(tiny_gea2_interface, should_handle_a_failure_to_send_during_an_escape) tiny_gea_stx, 0xE0); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 0); + tiny_gea_STATIC_ALLOC_PACKET(packet, 0); packet->destination = 0xE1; when_packet_is_sent(packet); @@ -1361,7 +1361,7 @@ TEST(tiny_gea2_interface, should_enter_idle_cooldown_when_a_non_stx_byte_is_rece after_bytes_are_received_via_uart(tiny_gea_stx - 1); nothing_should_happen(); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 0); + tiny_gea_STATIC_ALLOC_PACKET(packet, 0); packet->destination = 0x45; when_packet_is_sent(packet); @@ -1396,7 +1396,7 @@ TEST(tiny_gea2_interface, should_receive_packets_addressed_to_other_nodes_when_i 0xD1, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = address + 1; packet->source = 0x45; packet->payload[0] = 0xBF; diff --git a/test/tests/tiny_gea3_interface_test.cpp b/test/tests/tiny_gea3_interface_test.cpp index f01c354..8010226 100644 --- a/test/tests/tiny_gea3_interface_test.cpp +++ b/test/tests/tiny_gea3_interface_test.cpp @@ -168,7 +168,7 @@ TEST_GROUP(tiny_gea3_interface) 0x39, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 0); + tiny_gea_STATIC_ALLOC_PACKET(packet, 0); packet->destination = 0x45; when_packet_is_sent(packet); } @@ -184,7 +184,7 @@ TEST_GROUP(tiny_gea3_interface) should_send_bytes_via_uart(tiny_gea_stx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = 0x45; packet->payload[0] = 0xD5; @@ -222,7 +222,7 @@ TEST(tiny_gea3_interface, should_send_a_packet_with_no_payload) 0x39, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 0); + tiny_gea_STATIC_ALLOC_PACKET(packet, 0); packet->destination = 0x45; when_packet_is_sent(packet); } @@ -238,7 +238,7 @@ TEST(tiny_gea3_interface, should_forward_a_packet_without_changing_source_addres 0x5A, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 0); + tiny_gea_STATIC_ALLOC_PACKET(packet, 0); packet->destination = 0x45; packet->source = address + 1; when_packet_is_forwarded(packet); @@ -256,7 +256,7 @@ TEST(tiny_gea3_interface, should_send_a_packet_with_a_payload) 0xD3, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = 0x45; packet->payload[0] = 0xD5; when_packet_is_sent(packet); @@ -280,7 +280,7 @@ TEST(tiny_gea3_interface, should_send_a_packet_with_max_payload_given_send_buffe 0xD5, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 7); + tiny_gea_STATIC_ALLOC_PACKET(packet, 7); packet->destination = 0x45; packet->payload[0] = 0x00; packet->payload[1] = 0x01; @@ -294,7 +294,7 @@ TEST(tiny_gea3_interface, should_send_a_packet_with_max_payload_given_send_buffe TEST(tiny_gea3_interface, should_not_send_a_packet_that_is_too_large_for_the_send_buffer) { - tiny_gea3_STATIC_ALLOC_PACKET(packet, 8); + tiny_gea_STATIC_ALLOC_PACKET(packet, 8); nothing_should_happen(); when_packet_is_sent(packet); @@ -313,7 +313,7 @@ TEST(tiny_gea3_interface, should_escape_data_bytes_when_sending) 0x04, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = 0x45; packet->payload[0] = 0xE1; when_packet_is_sent(packet); @@ -332,7 +332,7 @@ TEST(tiny_gea3_interface, should_escape_crc_lsb_when_sending) 0xE1, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = 0x45; packet->payload[0] = 0xA0; when_packet_is_sent(packet); @@ -351,7 +351,7 @@ TEST(tiny_gea3_interface, should_escape_crc_msb_when_sending) 0x4F, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = 0x45; packet->payload[0] = 0xC8; when_packet_is_sent(packet); @@ -363,7 +363,7 @@ TEST(tiny_gea3_interface, should_queue_sent_packets) should_send_bytes_via_uart(tiny_gea_stx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = 0x45; packet->payload[0] = 0xD5; when_packet_is_sent(packet); @@ -395,7 +395,7 @@ TEST(tiny_gea3_interface, should_report_failure_to_enqueue) { given_that_the_queue_is_full(); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = 0x45; packet->payload[0] = 0xD5; @@ -413,7 +413,7 @@ TEST(tiny_gea3_interface, should_receive_a_packet_with_no_payload) 0x8F, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 0); + tiny_gea_STATIC_ALLOC_PACKET(packet, 0); packet->destination = address; packet->source = 0x45; packet_should_be_received(packet); @@ -446,7 +446,7 @@ TEST(tiny_gea3_interface, should_receive_a_packet_with_a_payload) 0x0D, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = address; packet->source = 0x45; packet->payload[0] = 0xBF; @@ -469,7 +469,7 @@ TEST(tiny_gea3_interface, should_receive_a_packet_with_maximum_payload) 0x48, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 4); + tiny_gea_STATIC_ALLOC_PACKET(packet, 4); packet->destination = address; packet->source = 0x45; packet->payload[0] = 0x01; @@ -519,7 +519,7 @@ TEST(tiny_gea3_interface, should_receive_a_packet_with_escapes) 0x3D, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 4); + tiny_gea_STATIC_ALLOC_PACKET(packet, 4); packet->destination = address; packet->source = 0x45; packet->payload[0] = tiny_gea_esc; @@ -542,7 +542,7 @@ TEST(tiny_gea3_interface, should_receive_broadcast_packets) 0x5E, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = 0xFF; packet->source = 0x45; packet->payload[0] = 0xBF; @@ -580,7 +580,7 @@ TEST(tiny_gea3_interface, should_receive_packets_with_any_address_when_ignoring_ 0xD1, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = address + 1; packet->source = 0x45; packet->payload[0] = 0xBF; @@ -600,7 +600,7 @@ TEST(tiny_gea3_interface, should_receive_multiple_packets) 0x8F, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet1, 0); + tiny_gea_STATIC_ALLOC_PACKET(packet1, 0); packet1->destination = address; packet1->source = 0x45; packet_should_be_received(packet1); @@ -618,7 +618,7 @@ TEST(tiny_gea3_interface, should_receive_multiple_packets) 0x0D, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet2, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet2, 1); packet2->destination = address; packet2->source = 0x45; packet2->payload[0] = 0xBF; @@ -681,7 +681,7 @@ TEST(tiny_gea3_interface, should_drop_packets_received_before_publishing_a_previ 0x5E, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = address; packet->source = 0x45; packet->payload[0] = 0xBF; @@ -704,7 +704,7 @@ TEST(tiny_gea3_interface, should_receive_a_packet_after_a_previous_packet_is_abo 0x0D, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = address; packet->source = 0x45; packet->payload[0] = 0xBF; @@ -725,7 +725,7 @@ TEST(tiny_gea3_interface, should_drop_bytes_received_prior_to_stx) 0x0D, tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = address; packet->source = 0x45; packet->payload[0] = 0xBF; @@ -749,7 +749,7 @@ TEST(tiny_gea3_interface, should_not_publish_received_packets_prior_to_receiving after_bytes_are_received_via_uart(tiny_gea_etx); - tiny_gea3_STATIC_ALLOC_PACKET(packet, 1); + tiny_gea_STATIC_ALLOC_PACKET(packet, 1); packet->destination = address; packet->source = 0x45; packet->payload[0] = 0xBF;