Improved code quality

This commit is contained in:
Eduard Urbach 2023-08-31 17:03:52 +02:00
parent 3ff7ac9a08
commit acec282709
Signed by: eduard
GPG key ID: 49226B848C78F6C8
16 changed files with 128 additions and 69 deletions

View file

@ -24,7 +24,16 @@ func TestNotContains(t *testing.T) {
assert.NotContains(t, []string{"Hello", "World"}, "hello")
assert.NotContains(t, []int{1, 2, 3}, 4)
assert.NotContains(t, []int{1, 2, 3}, []int{2, 1})
assert.NotContains(t, []int{1, 2, 3}, []int{1, 2, 3, 4})
assert.NotContains(t, []byte{'H', 'e', 'l', 'l', 'o'}, byte('a'))
assert.NotContains(t, []byte{'H', 'e', 'l', 'l', 'o'}, []byte{'l', 'e'})
assert.NotContains(t, map[string]int{"Hello": 1, "World": 2}, "hello")
}
func TestFailContains(t *testing.T) {
assert.Contains(fail(t), "Hello", "h")
}
func TestFailNotContains(t *testing.T) {
assert.NotContains(fail(t), "Hello", "H")
}