From 92db86fea153ed07be6647bff4ac001a8f594b70 Mon Sep 17 00:00:00 2001 From: Samuel Berthe Date: Thu, 27 Jun 2024 15:13:04 +0200 Subject: [PATCH] more tests --- find_test.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/find_test.go b/find_test.go index 35f51799..f4f8aaea 100644 --- a/find_test.go +++ b/find_test.go @@ -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) { @@ -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) {