<commit_before>package kvflag

import (
	"testing"

	"github.com/google/go-cmp/cmp"
)

func TestStringSlice_Set(t *testing.T) {
	type args struct {
		values []string
	}
	tests := []struct {
		name            string
		s               StringSlice
		args            args
		wantStringSlice StringSlice
	}{
		{"basic", StringSlice{"hey", "yo"}, args{[]string{"how", "are", "you"}},
			StringSlice{"hey", "yo", "how", "are", "you"}},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			for _, value := range tt.args.values {
				tt.s.Set(value)
			}
			if diff := cmp.Diff(tt.s, tt.wantStringSlice); diff != "" {<commit_msg>TestStringSlice_Set: check error even if none is returned<commit_after>package kvflag

import (
	"testing"

	"github.com/google/go-cmp/cmp"
)

func TestStringSlice_Set(t *testing.T) {
	type args struct {
		values []string
	}
	tests := []struct {
		name            string
		s               StringSlice
		args            args
		wantStringSlice StringSlice
	}{
		{"basic", StringSlice{"hey", "yo"}, args{[]string{"how", "are", "you"}},
			StringSlice{"hey", "yo", "how", "are", "you"}},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			for _, value := range tt.args.values {
				err := tt.s.Set(value)
				if err != nil {
					t.Fatal(err)
				}
			}
			if diff := cmp.Diff(tt.s, tt.wantStringSlice); diff != "" {
{'fraction_non_alphanumeric': 0.17359591539022612, 'fraction_numerical': 0.0, 'mean_word_length': 2.8217270194986073, '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': '6941674', 'n_tokens_mistral': 542, 'n_tokens_neox': 488, 'n_words': 114}