Generate test cases for red black tree

functional-testing, testing

Solution

The tests cases are specific to your implementation but I think a good trick for learning would be to try random insertion and deletion then display your tree using Gui or console printing in debugging mode.(Be careful use good debugger). To check if your answer is correct try the visualisation from this website https://www.cs.usfca.edu/~galles/visualization/RedBlack.html

Problem

How do I generate test cases for my red-black tree implementation in C?

Original source