Exemplo n.º 1
0
static void writeBytesInMemory_overflowMemory_status(void ** state){
	heap_t * heap1 = heap_new(5);
	memory_t * mem;
	mem = heap_addMemory(heap1);
	memory_writeBytesInMemory(mem, "0123456789");
	assert_true(strlen("0123456789") + memory_getSize(mem) < MAX_AMOUNT_OF_BYTES);
	heap_free(heap1);
	
}
Exemplo n.º 2
0
static void new_sizeMemory_normal(void **state){
    heap_t * newHeap = heap_new(60,30);
    memory_t * newMemory = heap_interactionMemory(newHeap, 10);
    assert_int_equal(memory_getSize(newMemory), 10);
    heap_delete(newHeap);
}