<commit_before>package filters

import "testing"
import "github.com/stretchr/testify/assert"
import "github.com/appPlant/alpinepass/src/data"

func TestFilterNameExactMatchTrue(t *testing.T) {
	filter := "name=Earth"
	config := data.Config{Name: "Earth", IsValid: true}
	filteredConfig := filterProperty(filter, config)

	assert.Equal(t, true, filteredConfig.IsValid,
		"The Config should match the filter.")
}

func TestFilterNameExactMatchFalse(t *testing.T) {
	filter := "name=Earth"
	config := data.Config{Name: "Mars", IsValid: true}
	filteredConfig := filterProperty(filter, config)

	assert.Equal(t, false, filteredConfig.IsValid,
		"The Config should not match the filter.")
}

//TODO
func TestFilterNameStartsWithMatchTrue(t *testing.T) {
	filter := "name:Ear"
	config := data.Config{Name: "Earth", IsValid: true}
	filteredConfig := filterProperty(filter, config)

	assert.Equal(t, true, filteredConfig.IsValid,
		"The Config should match the filter.")
}

//TODO
func TestFilterNameStartsWithMatchFalse(t *testing.T) {
	filter := "name=Ear"
	config := data.Config{Name: "Mars", IsValid: true}
	filteredConfig := filterProperty(filter, config)

	assert.Equal(t, false, filteredConfig.IsValid,
		"The Config should not match the filter.")
}

func TestFilterLocationTrue(t *testing.T) {
	filter := "location=Earth"
	config := data.Config{Location: []string{"Solar System", "Earth"}, IsValid: true}
	filteredConfig := filterProperty(filter, config)
<commit_msg>Rename tests<commit_after>package filters

import "testing"
import "github.com/stretchr/testify/assert"
import "github.com/appPlant/alpinepass/src/data"

func TestFilterNameExactMatchTrue(t *testing.T) {
	filter := "name=Earth"
	config := data.Config{Name: "Earth", IsValid: true}
	filteredConfig := filterProperty(filter, config)

	assert.Equal(t, true, filteredConfig.IsValid,
		"The Config should match the filter.")
}

func TestFilterNameExactMatchFalse(t *testing.T) {
	filter := "name=Earth"
	config := data.Config{Name: "Mars", IsValid: true}
	filteredConfig := filterProperty(filter, config)

	assert.Equal(t, false, filteredConfig.IsValid,
		"The Config should not match the filter.")
}

//TODO
func TestFilterNameContainsMatchTrue(t *testing.T) {
	filter := "name:Ear"
	config := data.Config{Name: "Earth", IsValid: true}
	filteredConfig := filterProperty(filter, config)

	assert.Equal(t, true, filteredConfig.IsValid,
		"The Config should match the filter.")
}

//TODO
func TestFilterNameContainsMatchFalse(t *testing.T) {
	filter := "name=Ear"
	config := data.Config{Name: "Mars", IsValid: true}
	filteredConfig := filterProperty(filter, config)

	assert.Equal(t, false, filteredConfig.IsValid,
		"The Config should not match the filter.")
}

func TestFilterLocationTrue(t *testing.T) {
	filter := "location=Earth"
	config := data.Config{Location: []string{"Solar System", "Earth"}, IsValid: true}
	filteredConfig := filterProperty(filter, config)

{'fraction_non_alphanumeric': 0.13529210796036897, 'fraction_numerical': 0.0, 'mean_word_length': 5.90566037735849, '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': '109076', 'n_tokens_mistral': 973, 'n_tokens_neox': 936, 'n_words': 231}