1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-15 10:12:29 +08:00

refactor: rewrite all unit test functions with assert

This commit is contained in:
dudaodong
2022-01-09 14:31:31 +08:00
parent 31e08197d4
commit e4cd7dad35
4 changed files with 46 additions and 110 deletions

View File

@@ -12,8 +12,6 @@ func TestRsaEncrypt(t *testing.T) {
encrypted := RsaEncrypt(data, "rsa_public.pem")
decrypted := RsaDecrypt(encrypted, "rsa_private.pem")
if string(data) != string(decrypted) {
internal.LogFailedTestInfo(t, "RsaEncrypt/RsaDecrypt", string(data), string(data), string(decrypted))
t.FailNow()
}
assert := internal.NewAssert(t, "TestRsaEncrypt")
assert.Equal(string(data), string(decrypted))
}