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:
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user