feat: initial version, incomplete but functional

This commit is contained in:
2026-01-11 11:24:16 +02:00
parent 6e49342638
commit 8dd24e5a5f
6 changed files with 124 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
#define NILEAKDETECTOR_VERBOSE true
#include "../nileakdetector.h"
#include <stdio.h>
void
test_malloc()
{
int *x = malloc(sizeof(int));
*x = 10;
printf("X = %d\n", *x); // Should print the right value of X
printf("\nAt this point the summary should indicate leaks...\n");
nileakdetector_print_summary();
printf("\nAfter this free it should be all good...\n");
free(x);
nileakdetector_print_summary();
}
int
main()
{
test_malloc();
printf("== TESTS SUCCESSFUL ==\n");
return 0;
}