<commit_before><commit_msg>added parallel selection sort test<commit_after>package sorting

import org.scalatest.FunSuite

import scala.util.Random

object ParallelSelectionSort {
  def sort(input: Array[Int]): Array[Int] = input
}

class ParallelSelectionSortTest extends FunSuite {
  def alreadySorted = (1 to 1000).toArray
  def reversed = alreadySorted.reverse
  def shuffled = Random.shuffle(alreadySorted.toSeq).toArray
  def emptyArray = Array.empty[Int]
  def singleElement = Array(1)

  test("sort") {
    import ParallelSelectionSort._

    assert(sort(alreadySorted).sameElements(alreadySorted), "Failed sorting a pre-sorted array")
    assert(sort(reversed).sameElements(alreadySorted), "Failed sorting a reversed array")
    assert(sort(shuffled).sameElements(alreadySorted), "Failed sorting a shuffled array")
    assert(sort(emptyArray).sameElements(emptyArray), "Failed sorting an empty array")
    assert(sort(singleElement).sameElements(singleElement), "Failed sorting an array of size 1")
    println("Tests passed!")
  }
}
{'fraction_non_alphanumeric': 0.10076775431861804, 'fraction_numerical': 0.0067178502879078695, 'mean_word_length': 5.7727272727272725, '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': '3517939', 'n_tokens_mistral': 318, 'n_tokens_neox': 294, 'n_words': 75}