From f1f9d18297ad58e0ebe81afb6736dd80fafd1049 Mon Sep 17 00:00:00 2001 From: Samuel Berthe Date: Mon, 4 Jul 2022 00:24:13 +0200 Subject: [PATCH] oops --- func_test.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/func_test.go b/func_test.go index da660f5b..25ab49ba 100644 --- a/func_test.go +++ b/func_test.go @@ -1,16 +1,19 @@ package lo import ( + "strconv" "testing" "github.com/stretchr/testify/assert" ) -func TestBind(t *testing.T) { +func TestPartial(t *testing.T) { is := assert.New(t) - add := func(x, y int) int { return x + y } - f := Bind(add, 5) - is.Equal(15, f(10)) - is.Equal(0, f(-5)) + add := func(x float64, y int) string { + return strconv.Itoa(int(x) + y) + } + f := Partial(add, 5) + is.Equal("15", f(10)) + is.Equal("0", f(-5)) }