|
Algorithms_in_C++ 1.0.0
Set of algorithms implemented in C++.
|
Testcases to check Reversal of Binary Tree. More...
Functions | |
| void | test1 () |
| < Use the BinaryTree More... | |
| void | test2 () |
| A Test to check an edge case (NULL root element) More... | |
| void | test3 () |
| A Test to check correct reversal of a Binary Tree. More... | |
| void | test4 () |
| A Test to check correct functionality with duplicate values. More... | |
| void | test5 () |
| A Test to check correct functionality with a harder test case. More... | |
| void | test6 () |
| A Test to check correct functionality with an array sorted using std::sort. More... | |
Testcases to check Reversal of Binary Tree.
Testcases to check Union of Two Arrays.
| void tests::test1 | ( | ) |
< Use the BinaryTree
A Test to check an edge case (two empty arrays)
A Test to check an edge case (single element reversal)
< Check for equal sizes
< Ensure that there is only one element
< Check if both elements are same
< Check if result is empty
< Should only print newline
< Check if result is empty
< Should only print newline
| void tests::test2 | ( | ) |
A Test to check an edge case (NULL root element)
A Test to check an edge case (one empty array)
< Check for equal sizes
< Ensure that there is only one element
< Check if result is equal to b
< Should print 2 3
< Check if result is equal to b
< Should print 2 3
| void tests::test3 | ( | ) |
A Test to check correct reversal of a Binary Tree.
A Test to check correct functionality with a simple test case.
< Check for equality
< Check for equality
< Check if result is correct
< Should print 2 3 4 6
< Check if result is correct
< Should print 2 3 4 6
| void tests::test4 | ( | ) |
A Test to check correct functionality with duplicate values.
< Check if result is correct
< Should print 2 3 4 6 7
| void tests::test5 | ( | ) |
A Test to check correct functionality with a harder test case.
< Check if result is correct
< Should print 1 2 3 4 5 6 7 9
| void tests::test6 | ( | ) |
A Test to check correct functionality with an array sorted using std::sort.
< Sort vector a
< Sort vector b
< Check if result is correct
< Should print 1 2 3 4 5 6 7 8 9 11