2023-06-29 22:35:31 +08:00
|
|
|
package utils
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func Test_Md5(t *testing.T) {
|
2023-06-30 09:45:02 +08:00
|
|
|
result := Md5("go")
|
2023-06-29 22:35:31 +08:00
|
|
|
assert.Equal(t, result, "34d1f91fb2e514b8576fab1a75a89a6b")
|
|
|
|
|
|
2023-06-30 09:45:02 +08:00
|
|
|
result2 := Md5("go")
|
2023-06-29 22:35:31 +08:00
|
|
|
assert.Equal(t, result, result2)
|
|
|
|
|
}
|