mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-06-11 15:19:02 +02:00
Bump Go version, Generics whoooo
This commit is contained in:
parent
b15ecd785e
commit
bddde5c637
14 changed files with 56 additions and 50 deletions
util
|
@ -26,20 +26,20 @@ func TestFileExists(t *testing.T) {
|
|||
|
||||
func TestInStringList(t *testing.T) {
|
||||
s := []string{"one", "two"}
|
||||
require.True(t, InStringList(s, "two"))
|
||||
require.False(t, InStringList(s, "three"))
|
||||
require.True(t, Contains(s, "two"))
|
||||
require.False(t, Contains(s, "three"))
|
||||
}
|
||||
|
||||
func TestInStringListAll(t *testing.T) {
|
||||
s := []string{"one", "two", "three", "four"}
|
||||
require.True(t, InStringListAll(s, []string{"two", "four"}))
|
||||
require.False(t, InStringListAll(s, []string{"three", "five"}))
|
||||
require.True(t, ContainsAll(s, []string{"two", "four"}))
|
||||
require.False(t, ContainsAll(s, []string{"three", "five"}))
|
||||
}
|
||||
|
||||
func TestInIntList(t *testing.T) {
|
||||
func TestContains(t *testing.T) {
|
||||
s := []int{1, 2}
|
||||
require.True(t, InIntList(s, 2))
|
||||
require.False(t, InIntList(s, 3))
|
||||
require.True(t, Contains(s, 2))
|
||||
require.False(t, Contains(s, 3))
|
||||
}
|
||||
|
||||
func TestSplitNoEmpty(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue