Rename the packet buffer test suite file

Add a missing declaration
This commit is contained in:
Savanni D'Gerinel 2022-07-29 14:05:11 -04:00
parent bc09a7e411
commit c28d050037
2 changed files with 14 additions and 0 deletions

View File

@ -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 <stdlib.h>
#include <string.h>
size_t circular_next(size_t current, size_t max);

View File

@ -1,3 +1,15 @@
/*
Copyright 2022, Savanni D'Gerinel <savanni@luminescent-dreams.com>
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 <https://www.gnu.org/licenses/>.
*/
#include <criterion/criterion.h>
#include <stdio.h>
#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);