malloc/t/malloc_tests.c

26 lines
428 B
C
Raw Normal View History

2019-04-24 20:59:37 +03:00
#include "t.h"
2019-05-04 20:23:32 +03:00
#include "ft_malloc.h"
#include "ft_malloc_internal.h"
2019-04-24 20:59:37 +03:00
2019-05-04 20:23:32 +03:00
int inital_base_next_point_to_itself(void)
2019-04-24 20:59:37 +03:00
{
2019-05-04 20:23:32 +03:00
_IS(g_base.next == &g_base);
_END("inital_base_next_point_to_itself");
}
int returns_not_null_pointer(void)
{
void *ptr;
ptr = malloc(10);
_IS(ptr != NULL);
_END("returns_not_null_pointer");
2019-04-24 20:59:37 +03:00
}
2019-05-03 00:18:45 +03:00
int main(void)
2019-04-24 20:59:37 +03:00
{
2019-05-04 20:23:32 +03:00
_SHOULD(inital_base_next_point_to_itself);
_SHOULD(returns_not_null_pointer);
2019-04-24 20:59:37 +03:00
return 0;
}