forked from Green-Sky/tomato
Squashed 'external/toxcore/c-toxcore/' content from commit 67badf69
git-subtree-dir: external/toxcore/c-toxcore git-subtree-split: 67badf69416a74e74f6d7eb51dd96f37282b8455
This commit is contained in:
30
toxcore/list_test.cc
Normal file
30
toxcore/list_test.cc
Normal file
@ -0,0 +1,30 @@
|
||||
#include "list.h"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
namespace {
|
||||
|
||||
TEST(List, CreateAndDestroyWithNonZeroSize)
|
||||
{
|
||||
BS_List list;
|
||||
bs_list_init(&list, sizeof(int), 10);
|
||||
bs_list_free(&list);
|
||||
}
|
||||
|
||||
TEST(List, CreateAndDestroyWithZeroSize)
|
||||
{
|
||||
BS_List list;
|
||||
bs_list_init(&list, sizeof(int), 0);
|
||||
bs_list_free(&list);
|
||||
}
|
||||
|
||||
TEST(List, DeleteFromEmptyList)
|
||||
{
|
||||
BS_List list;
|
||||
bs_list_init(&list, sizeof(int), 0);
|
||||
const uint8_t data[sizeof(int)] = {0};
|
||||
bs_list_remove(&list, data, 0);
|
||||
bs_list_free(&list);
|
||||
}
|
||||
|
||||
} // namespace
|
Reference in New Issue
Block a user