Skip to content

Commit

Permalink
Merge pull request nasa#169 from jphickey/fix-164-chunk-test-size-not…
Browse files Browse the repository at this point in the history
…random

Fix nasa#164, consistent "chunk" test sizes
  • Loading branch information
astrogeco authored Jan 18, 2022
2 parents d597c45 + bc1b4c9 commit 3b8e512
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions unit-test/cf_chunk_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -1901,11 +1901,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 @@ -1934,11 +1932,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

0 comments on commit 3b8e512

Please sign in to comment.