Skip to content
Snippets Groups Projects
Commit 14231bad authored by Haley Glavina's avatar Haley Glavina
Browse files

Adding more jUnit

parent 7ccfceca
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ public class RedBlackTree<Key, Value> {
private Field<Key, Value> field;
// Main method only used for testing
/*
public static void main(String[] args) {
GeneralCompare<Integer> b1;
b1 = (a1, a2) -> (Integer) a1 - (Integer) a2;
......@@ -21,11 +21,13 @@ public class RedBlackTree<Key, Value> {
}
Node h = myTree.root();
System.out.println(h.key());
while (h.left() != null) {
System.out.println(h.left().key());
h = h.left();
while (h.right() != null) {
System.out.println(h.right().key());
h = h.right();
}
}
*/
/**
......@@ -122,7 +124,6 @@ public class RedBlackTree<Key, Value> {
* @return New root of the rotated segment
*/
public Node<Key, Value> rotateLeft(Node<Key, Value> h){
System.out.println("Rotate left!");
Node<Key, Value> x = h.right();
h.right(x.left());
x.left(h);
......
package sort;
public class MergeSort{
/*// Main Function for Testing Purposes Only
public static void main(String[] args) {
GeneralCompare<Integer> b1;
b1 = (a1, a2) -> (Integer) a1 - (Integer) a2;
Integer[] test = {3, 4, 2, 1, 5, 7, 9, 10, 11};
//Integer[] test = {2, 1};
sort(test, 0, test.length - 1, b1);
for (int i = 0 ; i < (test.length) ; i++) {
System.out.println(test[i]);
}
}*/
/**
* Wrapper function for the MergeSort implementation
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment