<commit_before>import leon._
import leon.lang._
import leon.annotation._
import leon.collection._
import leon.collection.ListOps._

/*
 * Implementation of Catenable List based on "Purely Functionnal Data Structure, Okasaki, P93+" - test file
 * @author <NAME>
 * @author <NAME>
 */

 // TODO: check if it would be nice to have intermediate parameterized tests.
object CatenableListSpec {

  def testSnocCons {
      val l0 = CEmpty[BigInt]()
      val l1 = l0.snoc(4).snoc(5)
      val l2 = l0.snoc(5).cons(4)
      assert(l1 == l2)
  }

  def testMergeAndHead {
  	  val l1 = CEmpty[BigInt]().cons(1).cons(2).cons(3)
  	  val l2 = CEmpty[BigInt]().cons(4).cons(5).cons(6)
  	  val lt1 = l1 ++ l2
      assert(lt1.content == l1.content ++ l2.content)
  	  
  	  val l3 = CEmpty[BigInt]().cons(7).cons(8).cons(9)
  	  val lt2 = lt1 ++ l3
      assert(lt2.content == l1.content ++ l2.content ++ l3.content)
  	  
  	  val lt3 = lt1.snoc(0)
      assert(lt3.head == 0)
      assert(lt3.size == 10)
  }

  // TODO: check why this is unkown, it does not take any parameter and should therefore be
  // executed.
  def testHeadAndTail {
  	val l1 = CEmpty[BigInt]().cons(3).cons(4).snoc(2).cons(5).cons(6).snoc(1)
  	val l2 = l1 ++ CEmpty[BigInt]().cons(8).snoc(7)
  	val l3 = CEmpty[BigInt]().cons(0).snoc(-1) ++ l2

  	assert(l3.size == 10)<commit_msg>BF: fixing CatenableList Spec with scalac.<commit_after>import leon._
import leon.lang._
import leon.annotation._
import leon.collection._
import leon.collection.ListOps._

/*
 * Implementation of Catenable List based on "Purely Functionnal Data Structure, Okasaki, P93+" - test file
 * @author <NAME>
 * @author <NAME>
 */

 // TODO: check if it would be nice to have intermediate parameterized tests.
object CatenableListSpec {

  def testSnocCons {
      val l0 = CEmpty[BigInt]()
      val l1 = l0.snoc(4).snoc(5)
      val l2 = l0.snoc(5).cons(4)
      assert(l1 == l2)
  }

  def testMergeAndHead {
  	  val l1 = CEmpty[BigInt]().snoc(1).snoc(2).snoc(3)
  	  val l2 = CEmpty[BigInt]().snoc(4).snoc(5).snoc(6)
  	  val lt1 = l1 ++ l2
      assert(lt1.content == l1.content ++ l2.content)
  	  
  	  val l3 = CEmpty[BigInt]().snoc(7).snoc(8).snoc(9)
  	  val lt2 = lt1 ++ l3
      assert(lt2.content == l1.content ++ l2.content ++ l3.content)
  	  
  	  val lt3 = lt2.cons(0)
      assert(lt3.head == 0)
      assert(lt3.size == 10)
  }

  // TODO: check why this is unkown, it does not take any parameter and should therefore be
  // executed.
  def testHeadAndTail {
  	val l1 = CEmpty[BigInt]().snoc(3).snoc(4).cons(2).snoc(5).snoc(6).cons(1)
  	val l2 = l1 ++ CEmpty[BigInt]().snoc(8).cons(7)
  	val l3 = CEmpty[BigInt]().snoc(0).cons(-1) ++ l2

  	assert(l3.size == 10)
{'fraction_non_alphanumeric': 0.15474880821415474, 'fraction_numerical': 0.04693802713604694, 'mean_word_length': 2.9479015918958034, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3104006', 'n_tokens_mistral': 1127, 'n_tokens_neox': 1082, 'n_words': 244}