Exemplo n.º 1
0
func Test_FilterExtrakeys_Keeping(t *testing.T) {
	m, v := FilterExtrakeys(map[string]string{"foo": "hello", "bib-bar": "bye"})
	testhelpers.AssertStringArray(t, v, []string{"bar"})
	testhelpers.AssertStringMap(t, map[string]string{"bar": "bye"}, m)
}
Exemplo n.º 2
0
func Test_FilterExtrakeys_Empty(t *testing.T) {
	m, v := FilterExtrakeys(map[string]string{})
	testhelpers.AssertStringArray(t, []string{}, v)
	testhelpers.AssertStringMap(t, map[string]string{}, m)
}
Exemplo n.º 3
0
func Test_FilterExtrakeys_Removing(t *testing.T) {
	m, v := FilterExtrakeys(map[string]string{"foo": "hello"})
	testhelpers.AssertStringArray(t, []string{}, v)
	testhelpers.AssertStringMap(t, map[string]string{}, m)
}