<commit_before>import org.scalatest.FunSuite
import src.main.com.jce.{gzipPacket}

/**
  * Created by izeidman on 8/4/2016.
  */
class gzipTests extends FunSuite{
  test("packet length") {
    val gzipPacket = new gzipPacket("C104;C101;C108;C108;C111;C44;C32;C104;L4;D7;C33;C0;") //"hello, hello! " L4;D7; = 7 steps backward take 4 characters
    assert(gzipPacket.length.equals(12))
  }

  test("get function"){
    val gzipPacket = new gzipPacket("C104;C101;C108;C108;C111;C44;C32;C104;L4;D7;C33;C0;") //"hello, hello! " L4;D7; = 7 steps backward take 4 characters
    val partialPacket = gzipPacket.get(0,4)
    assert(partialPacket.length.equals(5))
    assert(partialPacket(0).equals("C104"))
    assert(partialPacket(1).equals("C101"))
    assert(partialPacket(2).equals("C108"))
    assert(partialPacket(3).equals("C108"))
    assert(partialPacket(4).equals("C111"))
  }

  test("is pointer"){
    val gzipPacket = new gzipPacket("C104;C101;C108;C108;C111;C44;C32;C104;L4;D7;C33;C0;") //"hello, hello! " L4;D7; = 7 steps backward take 4 characters
    val notPointer = gzipPacket.isPointer(0,7)
    assert(notPointer.equals(false))<commit_msg>fix failed test<commit_after>import org.scalatest.FunSuite
import src.main.com.jce.{gzipPacket}

/**
  * Created by izeidman on 8/4/2016.
  */
class gzipTests extends FunSuite{
  test("packet length") {
    val gzipPacket = new gzipPacket("C104;C101;C108;C108;C111;C44;C32;C104;L4;D7;C33;C0;") //"hello, hello! " L4;D7; = 7 steps backward take 4 characters
    assert(gzipPacket.length.equals(12))
  }

  test("get function"){
    val gzipPacket = new gzipPacket("C104;C101;C108;C108;C111;C44;C32;C104;L4;D7;C33;C0;") //"hello, hello! " L4;D7; = 7 steps backward take 4 characters
    val partialPacket = gzipPacket.get(0,4)
    assert(partialPacket.length.equals(5))
    assert(partialPacket.equals("hello"))
  }

  test("is pointer"){
    val gzipPacket = new gzipPacket("C104;C101;C108;C108;C111;C44;C32;C104;L4;D7;C33;C0;") //"hello, hello! " L4;D7; = 7 steps backward take 4 characters
    val notPointer = gzipPacket.isPointer(0,7)
    assert(notPointer.equals(false))
{'fraction_non_alphanumeric': 0.1591337099811676, 'fraction_numerical': 0.10922787193973635, 'mean_word_length': 5.054131054131054, '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': '3373116', 'n_tokens_mistral': 960, 'n_tokens_neox': 823, 'n_words': 141}