<commit_before>package ttaomae.trees;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import java.util.Arrays;
import java.util.Collection;
import java.util.Random;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;

import ttaomae.lists.List;

@RunWith(Parameterized.class)
public class BinarySearchTreeTest
{
    private static final int ITERATIONS = 10_000;
    private static final long RANDOM_SEED = 0L;

    @Parameters
    public static Collection<Object[]> data()
    {
        return Arrays
                .asList(new Object[][] { { NonBalancingBinarySearchTree.class } });
    }

    private Class<BinarySearchTree<Integer>> treeClass;
    private BinarySearchTree<Integer> tree;

    public BinarySearchTreeTest(Class<BinarySearchTree<Integer>> treeClass)
    {
        this.treeClass = treeClass;
    }

    @Before
    public void init() throws InstantiationException, IllegalAccessException
    {
        tree = treeClass.newInstance();
    }

    @Test
    public void testAdd_null()<commit_msg>update BinarySearchTreeTest to test RedBlackTree<commit_after>package ttaomae.trees;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import java.util.Arrays;
import java.util.Collection;
import java.util.Random;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;

import ttaomae.lists.List;

@RunWith(Parameterized.class)
public class BinarySearchTreeTest
{
    private static final int ITERATIONS = 10_000;
    private static final long RANDOM_SEED = 0L;

    @Parameters
    public static Collection<Object[]> data()
    {
        return Arrays.asList(new Object[][] {
            { NonBalancingBinarySearchTree.class },
            { RedBlackTree.class }
        });
    }

    private Class<BinarySearchTree<Integer>> treeClass;
    private BinarySearchTree<Integer> tree;

    public BinarySearchTreeTest(Class<BinarySearchTree<Integer>> treeClass)
    {
        this.treeClass = treeClass;
    }

    @Before
    public void init() throws InstantiationException, IllegalAccessException
    {
        tree = treeClass.newInstance();
    }

    @Test
    public void testAdd_null()
{'fraction_non_alphanumeric': 0.09126063418406806, 'fraction_numerical': 0.004640371229698376, 'mean_word_length': 3.862781954887218, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '6536556', 'n_tokens_mistral': 771, 'n_tokens_neox': 740, 'n_words': 167}