From c8a3dc8c185ffe3961f977e6de503b910493ec96 Mon Sep 17 00:00:00 2001 From: Yuce Tekol Date: Tue, 28 May 2019 14:25:46 +0300 Subject: [PATCH] fix int min max test for 32bit --- server/handler_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/handler_test.go b/server/handler_test.go index c830c94d7..c4e98d7f3 100644 --- a/server/handler_test.go +++ b/server/handler_test.go @@ -565,10 +565,10 @@ func TestHandler_Endpoints(t *testing.T) { t.Fatalf("field not found: %s", fieldName) } if math.MinInt64 != field.Options.Min { - t.Fatalf("field min %d != %d", math.MinInt64, field.Options.Min) + t.Fatalf("field min %d != %d", int64(math.MinInt64), field.Options.Min) } if math.MaxInt64 != field.Options.Max { - t.Fatalf("field max %d != %d", math.MaxInt64, field.Options.Max) + t.Fatalf("field max %d != %d", int64(math.MaxInt64), field.Options.Max) } }) @@ -594,7 +594,7 @@ func TestHandler_Endpoints(t *testing.T) { t.Fatalf("field not found: %s", fieldName) } if math.MinInt64 != field.Options.Min { - t.Fatalf("field min %d != %d", math.MinInt64, field.Options.Min) + t.Fatalf("field min %d != %d", int64(math.MinInt64), field.Options.Min) } if 10 != field.Options.Max { t.Fatalf("field max %d != %d", 10, field.Options.Max) @@ -626,7 +626,7 @@ func TestHandler_Endpoints(t *testing.T) { t.Fatalf("field min %d != %d", 10, field.Options.Min) } if math.MaxInt64 != field.Options.Max { - t.Fatalf("field max %d != %d", math.MaxInt64, field.Options.Max) + t.Fatalf("field max %d != %d", int64(math.MaxInt64), field.Options.Max) } })