On Tue, 2016-07-12 at 15:17 +0200, marxin wrote: Thanks for writing selftests!
FWIW, some spelling nits below (I'm not a reviewer, and not familiar with our fibonacci heap implementation). > gcc/ChangeLog: > > 2016-07-13 Martin Liska <mli...@suse.cz> > > * Makefile.in: Include fibonacci_heap.c > * fibonacci_heap.c: New file. > * fibonacci_heap.h (fibonacci_heap::insert): Use insert_node. > (fibonacci_heap::union_with): Fix deletion of the second heap. > * selftest-run-tests.c (selftest::run_tests): Incroporate Spelling nit: "Incroporate" -> "Incorporate". > fibonacci heap tests. > * selftest.h: Declare fibonacci_heap_c_tests. diff --git a/gcc/fibonacci_heap.c b/gcc/fibonacci_heap.c > new file mode 100644 > index 0000000..db58417 > --- /dev/null > +++ b/gcc/fibonacci_heap.c [...] > +/* Verify that heap can handle duplicite keys. */ Spelling nit: "duplicite" -> "duplicate" > + > +static void > +test_duplicite_keys () and here ^^^^^^^^ > diff --git a/gcc/fibonacci_heap.h b/gcc/fibonacci_heap.h > index c6c2a45..602d5ee 100644 > --- a/gcc/fibonacci_heap.h > +++ b/gcc/fibonacci_heap.h [...] > @@ -230,6 +230,9 @@ private: > /* Insert new NODE given by KEY and DATA associated with the key. > */ > fibonacci_node_t *insert (fibonacci_node_t *node, K key, V *data); > > + /* Insert new NODE that has alredy filled key and value. */ Spelling nit: "alredy" -> "already". > @@ -345,6 +348,15 @@ fibonacci_heap<K,V>::insert (fibonacci_node_t > +/* Insert new NODE that has alredy filled key and value. */ > Likewise: "alredy" -> "already".