Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
samber committed Jun 27, 2024
1 parent 7bbea54 commit 92db86f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions find_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,13 @@ func TestMin(t *testing.T) {

result1 := Min([]int{1, 2, 3})
result2 := Min([]int{3, 2, 1})
result3 := Min([]int{})
result3 := Min([]time.Duration{time.Second, time.Minute, time.Hour})
result4 := Min([]int{})

is.Equal(result1, 1)
is.Equal(result2, 1)
is.Equal(result3, 0)
is.Equal(result3, time.Second)
is.Equal(result4, 0)
}

func TestMinBy(t *testing.T) {
Expand Down Expand Up @@ -303,11 +305,13 @@ func TestMax(t *testing.T) {

result1 := Max([]int{1, 2, 3})
result2 := Max([]int{3, 2, 1})
result3 := Max([]int{})
result3 := Max([]time.Duration{time.Second, time.Minute, time.Hour})
result4 := Max([]int{})

is.Equal(result1, 3)
is.Equal(result2, 3)
is.Equal(result3, 0)
is.Equal(result3, time.Hour)
is.Equal(result4, 0)
}

func TestMaxBy(t *testing.T) {
Expand Down

0 comments on commit 92db86f

Please sign in to comment.