25 lines
391 B
C
25 lines
391 B
C
|
#include "../src/Scratchpad/Scratchpad.h"
|
||
|
|
||
|
#include <assert.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
void test_reserve(void)
|
||
|
{
|
||
|
Scratchpad pad;
|
||
|
|
||
|
assert(Scratchpad_Create(&pad, 16, NULL) == EXIT_SUCCESS);
|
||
|
assert(Scratchpad_Reserve(&pad, 16) != NULL);
|
||
|
assert(Scratchpad_Reserve(&pad, 16) != NULL);
|
||
|
|
||
|
Scratchpad_Reset(&pad);
|
||
|
Scratchpad_Destroy(&pad);
|
||
|
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
test_reserve();
|
||
|
return 0;
|
||
|
}
|