Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #164, consistent "chunk" test sizes #169

Merged
merged 1 commit into from
Jan 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions unit-test/cf_chunk_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -1910,11 +1910,9 @@ void Test_CF_Chunks_Init_SetGiven_chunks_max_chunks_ToGiven_max_chunks(void)
{
/* Arrange */
CF_ChunkList_t dummy_chunks;
CF_ChunkList_t *arg_chunks = &dummy_chunks;
CF_ChunkIdx_t arg_max_chunks =
Any_uint16() + 2; /* 2-65537, uint8 is used instead of CF_ChunkIdx_t to have a reasonably
decent size for the test without being too large (segfault) */
CF_Chunk_t arg_chunks_mem[arg_max_chunks];
CF_ChunkList_t *arg_chunks = &dummy_chunks;
CF_ChunkIdx_t arg_max_chunks = 14;
CF_Chunk_t arg_chunks_mem[14];

arg_chunks->count = 0;

Expand Down Expand Up @@ -1943,11 +1941,9 @@ void Test_CF_ChunksReset_Set_count_To_0_Keeps_max_chunks_AndMemsets_chunks_ToAll
{
/* Arrange */
CF_ChunkList_t dummy_chunks;
CF_ChunkList_t *arg_chunks = &dummy_chunks;
CF_ChunkIdx_t initial_max_chunks =
Any_uint16() + 2; /* 2-65537, uint8 is used instead of CF_ChunkIdx_t to have a reasonably
decent size for the test without being too large (segfault) */
CF_Chunk_t dummy_chunks_chunks[initial_max_chunks];
CF_ChunkList_t *arg_chunks = &dummy_chunks;
CF_ChunkIdx_t initial_max_chunks = 17;
CF_Chunk_t dummy_chunks_chunks[17];

arg_chunks->count = Any_index_t();
arg_chunks->max_chunks = initial_max_chunks;
Expand Down