Skip to content

Commit

Permalink
go-zero/core/hash/hash_test.go 增加测试 TestMd5Hex (#1128)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikaelemmmm authored Oct 12, 2021
1 parent d28cfe5 commit 837a9ff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/hash/hash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 837a9ff

Please sign in to comment.