Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Homework Number: W10H02 (A Heap of Nodes [Bonusaufgabe])
A short description of the changes proposed in the pull request:
I added some tests on every method we should implement. I equal-checked the heaps with the use of the toString() that we should implement, which means that the whole tests are dependent on toString(), which is not the best implementation but for finding your own fault it should be enough. Otherwise an implementation of another comparison algorithm is of course possible to (for example the toList() method or a recursive method going through all nodes and comparing them).
I even implemented a TestObject to check if the student used the compareTo()-method because most of us only used Integers as the generic type, but other generic types are also possible!
Some info on the testDelMin()-method: I know that some of the students implemented it in another way. I asked which of the implementations are right on Zulip today, but did not get any answer yet: (https://zulip.in.tum.de/#narrow/stream/879-PGdP-W10H02--.20A.20Heap.20of.20Nodes/topic/delMin.28.29/near/431120). So please be uptodate with the zulipstream and if my tests are wrong because my implementation is, I will change it of course and submit it again.
P.S.: It is my first time writting tests for this github repo and even the first time creating a pull request and working with github in general, so if I did something wrong I am very sorry and just tell me.
P.S.2: As i already mentioned the tests are far from being programmed in a nice way, so I am sorry for that too. But i guess they should be fine to cover the basic implementation. I hope that they do not reveal any solutions, because the toString() method should not be part of giving any solutions out. (But I am not quite sure...)