<commit_before>package binary_search_tree;

import java.util.NoSuchElementException;
import binary_search_tree.Bst;	// My implementation of Binary Search Tree in package binary_search_tree

/*
	Class to test class Bst. (Binary Search Tree)
*/

class TestBst{

			

	// Tests Insertion and traversals
	public static void testInsertion(){

		// Create a bst object
		Bst bst = new Bst();

		// Test Pre Order when tree is empty. Should throw exception
		try{
			bst.inOrder();
		}
		catch(NoSuchElementException e){
			System.out.println(e);
		}


		// Test Pre Order when tree is empty. Should throw exception
		try{
			bst.preOrder();
		}
		catch(NoSuchElementException e){
			System.out.println(e);
		}


		// Create array of integers to insert
		int[] values = {10, 7, 9, 8, 2, 15, 13, 17};
		

		// Insert values into bst
		for(int v: values){
			bst.insert(v);
		}

		// Print In Order traversal
		System.out.print("Inorder Traversal:\t ");
		bst.inOrder();

		System.out.println();
		System.out.println("Should be:\t\t 2 7 8 9 10 13 15 17");


		// Print Pre Order traversal
		System.out.print("Pre order Traversal:\t ");
		bst.preOrder();

		System.out.println();
		System.out.println("Should be:\t\t 10 7 2 9 8 15 13 17");

	}




	public static void main(String args[]){

		// Test Insertion
		testInsertion();
	}

}<commit_msg>Add test case for post order traversal<commit_after>package binary_search_tree;

import java.util.NoSuchElementException;
import binary_search_tree.Bst;	// My implementation of Binary Search Tree in package binary_search_tree

/*
	Class to test class Bst. (Binary Search Tree)
*/

class TestBst{

			

	// Tests Insertion and traversals
	public static void testInsertion(){

		// Create a bst object
		Bst bst = new Bst();

		// Test Pre Order when tree is empty. Should throw exception
		try{
			bst.inOrder();
		}
		catch(NoSuchElementException e){
			System.out.println(e);
		}


		// Test Pre Order when tree is empty. Should throw exception
		try{
			bst.preOrder();
		}
		catch(NoSuchElementException e){
			System.out.println(e);
		}


		// Test Post Order when tree is empty. Should throw exception
		try{
			bst.postOrder();
		}
		catch(NoSuchElementException e){
			System.out.println(e);
		}


		// Create array of integers to insert
		int[] values = {10, 7, 9, 8, 2, 15, 13, 17};
		

		// Insert values into bst
		for(int v: values){
			bst.insert(v);
		}

		// Print In Order traversal
		System.out.print("In order Traversal:\t ");
		bst.inOrder();

		System.out.println();
		System.out.println("Should be:\t\t 2 7 8 9 10 13 15 17");


		// Print Pre Order traversal
		System.out.print("Pre order Traversal:\t ");
		bst.preOrder();

		System.out.println();
		System.out.println("Should be:\t\t 10 7 2 9 8 15 13 17");


		// Print Post Order traversal
		System.out.print("Post order Traversal:\t ");
		bst.postOrder();

		System.out.println();
		System.out.println("Should be:\t\t 2 8 9 7 13 17 15 10");

	}




	public static void main(String args[]){

		// Test Insertion
		testInsertion();
	}

}
{'fraction_non_alphanumeric': 0.12409717662508207, 'fraction_numerical': 0.02757715036112935, 'mean_word_length': 3.0518617021276597, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2862618', 'n_tokens_mistral': 1226, 'n_tokens_neox': 994, 'n_words': 321}