<commit_before>package com.brazilianbytes.ctci.algorithm.sort;

import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;

public class SortFixedTest {

	private static final Integer[] ORIGINAL = { -1, 7, 0, -2, 1, 3, 4, 5, 10, 9, 8, -3, 11, 14, 17, 15, 18, 19, 20,
			-6 };
	private static final Integer[] SOLUTION = { -6, -3, -2, -1, 0, 1, 3, 4, 5, 7, 8, 9, 10, 11, 14, 15, 17, 18, 19,
			20 };

	@Ignore
	@Test
	public void bubbleTest() {

		Integer[] input = ORIGINAL.clone();

		Sort.algorithm().bubble().sort(input, (x, y) -> Integer.compare(x, y));
		
		Assert.assertArrayEquals(SOLUTION, input);
	}

	@Ignore
	@Test
	public void selectionTest() {

		Integer[] input = ORIGINAL.clone();

		Sort.algorithm().selection().sort(input, (x, y) -> Integer.compare(x, y));
		
		Assert.assertArrayEquals(SOLUTION, input);
	}

	@Test
	public void insertionTest() {

		Integer[] input = new Integer[] { 5,3,4,7,2,8,6,9,1 };

		Sort.algorithm().insertion().sort(input, (x, y) -> Integer.compare(x, y));
		
		Assert.assertArrayEquals(SOLUTION, input);
	}

}<commit_msg>Correcting a mistake about input for Insertion Sort Test<commit_after>package com.brazilianbytes.ctci.algorithm.sort;

import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;

public class SortFixedTest {

	private static final Integer[] ORIGINAL = { -1, 7, 0, -2, 1, 3, 4, 5, 10, 9, 8, -3, 11, 14, 17, 15, 18, 19, 20,
			-6 };
	private static final Integer[] SOLUTION = { -6, -3, -2, -1, 0, 1, 3, 4, 5, 7, 8, 9, 10, 11, 14, 15, 17, 18, 19,
			20 };

	@Test
	public void bubbleTest() {

		final Integer[] input = ORIGINAL.clone();

		Sort.algorithm().bubble().sort(input, (x, y) -> Integer.compare(x, y));

		Assert.assertArrayEquals(SOLUTION, input);
	}

	@Test
	public void selectionTest() {

		final Integer[] input = ORIGINAL.clone();

		Sort.algorithm().selection().sort(input, (x, y) -> Integer.compare(x, y));

		Assert.assertArrayEquals(SOLUTION, input);
	}

	@Test
	public void insertionTest() {

		final Integer[] input = ORIGINAL.clone();

		Sort.algorithm().insertion().sort(input, (x, y) -> Integer.compare(x, y));

		Assert.assertArrayEquals(SOLUTION, input);
	}

}
{'fraction_non_alphanumeric': 0.1780128794848206, 'fraction_numerical': 0.05565777368905244, 'mean_word_length': 3.844097995545657, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3408170', 'n_tokens_mistral': 967, 'n_tokens_neox': 791, 'n_words': 221}