From 837a9ffa036439ee49dec18e2fe938b7ce154551 Mon Sep 17 00:00:00 2001 From: Mikael <74481083+Mikaelemmmm@users.noreply.github.com> Date: Tue, 12 Oct 2021 21:57:07 +0800 Subject: [PATCH] =?UTF-8?q?go-zero/core/hash/hash=5Ftest.go=20=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=B5=8B=E8=AF=95=20TestMd5Hex=20(#1128)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/hash/hash_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/hash/hash_test.go b/core/hash/hash_test.go index 02a760ca..5e0962a7 100644 --- a/core/hash/hash_test.go +++ b/core/hash/hash_test.go @@ -20,6 +20,11 @@ func TestMd5(t *testing.T) { assert.Equal(t, md5Digest, actual) } +func TestMd5Hex(t *testing.T) { + actual := Md5Hex([]byte(text)) + assert.Equal(t, md5Digest, actual) +} + func BenchmarkHashFnv(b *testing.B) { for i := 0; i < b.N; i++ { h := fnv.New32()