<commit_before>/*
 Copyright 2010 <NAME> (<EMAIL>)
 Use of this source code is governed by the Artistic License 2.0.
 That License is included in the LICENSE file.
*/
package transform

import (
	"testing"
)

func assertTagType(t *testing.T, sel *Selector, typ string, msg string) {
	if sel.TagType != typ {
		t.Errorf(msg)
		t.Logf("TagType: [%s]", sel.TagType)
	}
}

func assertTagTypeAny(t *testing.T, sel *Selector) {
	assertTagType(t, sel, "*", "selector tagType not ANY")
}

func assertType(t *testing.T, sel *Selector, typ byte, msg string) {
	if sel.Type != typ {
		t.Errorf(msg)
		t.Logf("Type: [%s]", sel.Type)
	}
}

func assertKey(t *testing.T, sel *Selector, val string, msg string) {
	if sel.Key != val {
		t.Errorf(msg)
		t.Logf("Key: [%s]", sel.Val)
	}<commit_msg>Using bitmasks for the selector types now.<commit_after>/*
 Copyright 2010 <NAME> (<EMAIL>)
 Use of this source code is governed by the Artistic License 2.0.
 That License is included in the LICENSE file.
*/
package transform

import (
	"testing"
)

func assertTagType(t *testing.T, sel *Selector, typ string, msg string) {
	if sel.TagType != typ {
		t.Errorf(msg)
		t.Logf("TagType: [%s]", sel.TagType)
	}
}

func assertTagTypeAny(t *testing.T, sel *Selector) {
	assertTagType(t, sel, "*", "selector tagType not ANY")
}

func assertType(t *testing.T, sel *Selector, typ byte, msg string) {
	if (sel.Type | typ) != typ {
		result := sel.Type | typ != typ
		t.Errorf(msg)
		t.Logf("%s MaskResult: [%s], Type: [%s]", result,
			sel.Type & typ, typ)
	}
}

func assertKey(t *testing.T, sel *Selector, val string, msg string) {
	if sel.Key != val {
		t.Errorf(msg)
		t.Logf("Key: [%s]", sel.Val)
	}
{'fraction_non_alphanumeric': 0.159688995215311, 'fraction_numerical': 0.007177033492822967, 'mean_word_length': 3.891812865497076, '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': '5507585', 'n_tokens_mistral': 647, 'n_tokens_neox': 618, 'n_words': 193}