<commit_before>package checker

import(
	t "testing"
)

func TestCleanChecker(t *t.T) {
	result := CheckFile("scripts/clean.ts", nil)
	if len(result.Warnings) > 0 {
		t.Error("Shouldn't of had any warnings")
	}
}

func TestSelectTextChecker(t *t.T) {
	result := CheckFile("scripts/select_text.ts", nil)
	count := 18
	if len(result.Warnings) != count {
		t.Errorf("Should have thrown %v warnings only gave %d\n", count, len(result.Warnings))
		for _, warn := range(result.Warnings) {
			t.Error(warn.String())
		}
	}
	//println(result.Warnings[0].String())
}

func TestWithNot(t *t.T) {
	result := CheckFile("scripts/with_not.ts", nil)
	if len(result.Warnings) != 2 {
		t.Error("Should have thrown two warnings")
	}
}<commit_msg>fixed checker test cases.<commit_after>package checker

import (
	t "testing"
)

func TestCleanChecker(t *t.T) {
	result := CheckFile("scripts/clean.ts")
	if len(result.Warnings) > 0 {
		t.Error("Shouldn't of had any warnings")
	}
}

func TestSelectTextChecker(t *t.T) {
	result := CheckFile("scripts/select_text.ts")
	count := 18
	if len(result.Warnings) != count {
		t.Errorf("Should have thrown %v warnings only gave %d\n", count, len(result.Warnings))
		for _, warn := range result.Warnings {
			t.Error(warn.String())
		}
	}
	//println(result.Warnings[0].String())
}

func TestWithNot(t *t.T) {
	result := CheckFile("scripts/with_not.ts")
	if len(result.Warnings) != 2 {
		t.Error("Should have thrown two warnings")
	}
}
{'fraction_non_alphanumeric': 0.16517549896765313, 'fraction_numerical': 0.006882312456985547, 'mean_word_length': 4.306569343065694, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2095719', 'n_tokens_mistral': 547, 'n_tokens_neox': 537, 'n_words': 119}