From c28d0500371e6c32b44c34d9a2275022dacc28b4 Mon Sep 17 00:00:00 2001 From: Savanni D'Gerinel Date: Fri, 29 Jul 2022 14:05:11 -0400 Subject: [PATCH] Rename the packet buffer test suite file Add a missing declaration --- packet-radio/src/packet_buffer.c | 1 + .../tests/{packet-buffer.c => packet_buffer.c} | 13 +++++++++++++ 2 files changed, 14 insertions(+) rename packet-radio/tests/{packet-buffer.c => packet_buffer.c} (87%) diff --git a/packet-radio/src/packet_buffer.c b/packet-radio/src/packet_buffer.c index 64cda9f..bee394e 100644 --- a/packet-radio/src/packet_buffer.c +++ b/packet-radio/src/packet_buffer.c @@ -13,6 +13,7 @@ You should have received a copy of the GNU General Public License along with thi #include "radio.h" #include "packet.h" #include "packet_buffer.h" +#include #include size_t circular_next(size_t current, size_t max); diff --git a/packet-radio/tests/packet-buffer.c b/packet-radio/tests/packet_buffer.c similarity index 87% rename from packet-radio/tests/packet-buffer.c rename to packet-radio/tests/packet_buffer.c index 1d15768..446d094 100644 --- a/packet-radio/tests/packet-buffer.c +++ b/packet-radio/tests/packet_buffer.c @@ -1,3 +1,15 @@ +/* +Copyright 2022, Savanni D'Gerinel + +This file is part of Savanni's AVR library. + +This AVR library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + +This AVR library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with this AVR library. If not, see . +*/ + #include #include #include "packet_buffer.h" @@ -138,6 +150,7 @@ Test(packet_buffer, circular_buffer) { memcpy(packet->message, (char [2]){ 25, 24 }, 2); packet = packet_buffer_head(buffer, &status); + printf("packet-type: %d\n", packet->type); cr_assert(status == packet_buffer_status_ok); cr_assert(packet->type == packet_type_data); cr_assert(packet->count == 0);