diff options
Diffstat (limited to 'src/test.cc')
-rw-r--r-- | src/test.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/test.cc b/src/test.cc index fec7131..c5be9b8 100644 --- a/src/test.cc +++ b/src/test.cc @@ -20,7 +20,7 @@ void exception(int e, char *msg) PriorityList *newlist(void) { - return new BHeap; + return new FHeap; } void DoCombTest(int number) @@ -33,7 +33,9 @@ void DoCombTest(int number) cerr << _("Creation of a priority list and adding ") << number << _(" random entrie(s)..."); T = newlist(); for (i = 1; i <= number; i++) { - T->Insert(rand() % P_INFINITY, NULL); +// T->Insert(rand() % P_INFINITY, NULL); +// T->Insert(rand() % 100, NULL); + T->Insert(1, NULL); } cerr << _("Ok.\nDeleting the list..."); oK = P_INFINITY; @@ -73,7 +75,7 @@ void FullTest(void) cerr << _("Size of a BinHeap cell : ") << sizeof(binheap_t) << endl; DoCombTest(0); - DoCombTest(10); + DoCombTest(30); DoCombTest(70); DoCombTest(1000); // DoCombTest(10000); @@ -89,10 +91,12 @@ void FullTest(void) for (i = 0; i < 30; i++) { fprintf(stderr, "%i ", N[i]); C1 = T->Insert(N[i], NULL); - if (N[i] == 30) C3 = C1; + if (N[i] == 30) + C3 = C1; } - - if (!C3) exit(-1); + + if (!C3) + exit(-1); fprintf(stderr, "59 54 -10\n"); C1 = T->Insert(59, NULL); |