All pastes #918524 Raw Edit

test case

public c v1 · immutable
#918524 ·published 2008-02-26 04:09 UTC
rendered paste body
#include <stdio.h>#include <stdlib.h>#include "minheap.h"int main(void){	heap_t blah;	blah.size = 0;		heapitem_t test1,test2,test3,test4,test5;		strcpy(test1.name, "bingo");	strcpy(test2.name, "bongo");	strcpy(test3.name, "bilbo");	strcpy(test4.name, "banjo");	strcpy(test5.name, "bajingo");		test1.dist = 33.4;	test2.dist = 234.4;	test3.dist = 13.46;	test4.dist = 2.3;	test5.dist = 2.4;		test1.index = 1;	test2.index = 2;	test3.index = 3;	test4.index = 4;	test5.index = 5;		heap_addItem(&blah, test1);	heap_addItem(&blah, test2);	heap_addItem(&blah, test3);	heap_addItem(&blah, test4);	heap_addItem(&blah, test5);			printf("blah.heap[0].name: %s\n", blah.heap[0].name);	printf("blah.size: %d\n", blah.size);		return 0;}