tests/memarray: allow overridable macros and print them
MAX_NUMBER_BLOCKS and NUMBER_OF_TESTS can be overriden via CFLAGS
This commit is contained in:
parent
7d046b6b8d
commit
60c922df1a
@ -25,9 +25,15 @@
|
|||||||
|
|
||||||
#include "memarray.h"
|
#include "memarray.h"
|
||||||
|
|
||||||
#define MAX_NUMBER_BLOCKS (10)
|
|
||||||
#define MESSAGE_SIZE (8U)
|
#define MESSAGE_SIZE (8U)
|
||||||
|
|
||||||
|
#ifndef MAX_NUMBER_BLOCKS
|
||||||
|
#define MAX_NUMBER_BLOCKS (10)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NUMBER_OF_TESTS
|
||||||
#define NUMBER_OF_TESTS (12)
|
#define NUMBER_OF_TESTS (12)
|
||||||
|
#endif
|
||||||
|
|
||||||
extern int _ps_handler(int argc, char **argv);
|
extern int _ps_handler(int argc, char **argv);
|
||||||
|
|
||||||
@ -94,6 +100,9 @@ void free_memory(struct block_t *head)
|
|||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
|
printf("MAX_NUMBER_BLOCKS: %d\n", MAX_NUMBER_BLOCKS);
|
||||||
|
printf("NUMBER_OF_TESTS: %d\n", NUMBER_OF_TESTS);
|
||||||
|
|
||||||
memory_block_init();
|
memory_block_init();
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user