func TestAnyString(t *testing.T) {
	t.Parallel()
	var tests = []struct {
		s        []string
		expected bool
	}{
		{[]string{"foo", "bar", "baz"}, true},
		{[]string{"foo", "\u0062\u0061\u0072", "baz"}, true},
		{[]string{"foo", "bar", "buz"}, true},
		{[]string{"foo", "bur", "buz"}, false},
	}
	for _, test := range tests {
		actual := AnyString(test.s, func(s string) bool {
			return strings.HasPrefix(s, "ba")
		})
		if actual != test.expected {
			t.Errorf("Expected AnyString(%q, fn) to be %v, got %v", test.s, test.expected, actual)
		}
	}
}
TestAnyString tests the AnyString function
package gosc
import (
	"strings"
	"testing"
)
func TestMapString(t *testing.T) {
	t.Parallel()
	var tests = []struct {
		s        []string
		expected []string
	}{
		{[]string{"foo", "bar", "baz"}, []string{"FOO", "BAR", "BAZ"}},
		{[]string{"foo", "\u0062\u0061\u0072", "baz"}, []string{"FOO", "BAR", "BAZ"}},
		{[]string{}, []string{}},
	}
	for _, test := range tests {
		actual := MapString(test.s, strings.ToUpper)
		if !EqSlices(&actual, &test.expected) {
			t.Errorf("Expected MapString(%q, fn) to be %q, got %v", test.s, test.expected, actual)
		}
	}
}
func TestMapInt(t *testing.T) {
	t.Parallel()
	var tests = []struct {
		s        []int
		expected []int
	}{
		{[]int{0, 2, 4}, []int{0, 4, 8}},
		{[]int{}, []int{}},
		{[]int{2, 4, 5}, []int{4, 8, 10}},
		{[]int{-2}, []int{-4}},
	}
	for _, test := range tests {
		actual := MapInt(test.s, func(i int) int {
			return i * 2
		})
		if !EqSlices(&actual, &test.expected) {
			t.Errorf("Expected MapInt(%q, fn) to be %q, got %v", test.s, test.expected, actual)
		}
	}
}
func TestFilterString(t *testing.T) {
	t.Parallel()
	var tests = []struct {
		s        []string
		expected []string
	}{
		{[]string{"foo", "bar", "baz"}, []string{"bar", "baz"}},
		{[]string{"foo", "\u0062\u0061\u0072", "baz"}, []string{"bar", "baz"}},
		{[]string{"foo", "far", "faz"}, []string{}},
		{[]string{}, []string{}},
	}
	for _, test := range tests {
		actual := FilterString(test.s, func(s string) bool {
			return strings.HasPrefix(s, "b")
		})
		if !EqSlices(&actual, &test.expected) {
			t.Errorf("Expected FilterString(%q, fn) to be %q, got %v", test.s, test.expected, actual)
		}
	}
}
func TestFilterInt(t *testing.T) {
	t.Parallel()
	var tests = []struct {
		s        []int
		expected []int
	}{
		{[]int{0, 2, 4}, []int{0, 2, 4}},
		{[]int{}, []int{}},
		{[]int{2, 4, 5}, []int{2, 4}},
		{[]int{5}, []int{}},
		{[]int{-2, 4}, []int{-2, 4}},
	}
	for _, test := range tests {
		actual := FilterInt(test.s, func(i int) bool {
			return i%2 == 0
		})
		if !EqSlices(&actual, &test.expected) {
			t.Errorf("Expected FilterString(%q, fn) to be %q, got %v", test.s, test.expected, actual)
		}
	}
}
func TestAllString(t *testing.T) {
	t.Parallel()
	var tests = []struct {
		s        []string
		expected bool
	}{
		{[]string{"boo", "bar", "baz"}, true},
		{[]string{"boo", "\u0062\u0061\u0072", "baz"}, true},
		{[]string{"foo", "bar", "baz"}, false},
		{[]string{}, true},
	}
	for _, test := range tests {
		actual := AllString(test.s, func(s string) bool {
			return strings.HasPrefix(s, "b")
		})
		if actual != test.expected {
			t.Errorf("Expected AllString(%q, fn) to be %v, got %v", test.s, test.expected, actual)
		}
	}
}
func TestAllInt(t *testing.T) {
	t.Parallel()
	var tests = []struct {
		s        []int
		expected bool
	}{
		{[]int{0, 2, 4}, true},
		{[]int{}, true},
		{[]int{2, 4, 5}, false},
		{[]int{5}, false},
		{[]int{-2, 4}, true},
	}
	for _, test := range tests {
		actual := AllInt(test.s, func(i int) bool {
			return i%2 == 0
		})
		if actual != test.expected {
			t.Errorf("Expected AllInt(%q, fn) to be %v, got %v", test.s, test.expected, actual)
		}
	}
}