diff --git a/lib/cgo/tests/check_cipher.crypto.c b/lib/cgo/tests/check_cipher.crypto.c index caf28f002..9e91cfd21 100644 --- a/lib/cgo/tests/check_cipher.crypto.c +++ b/lib/cgo/tests/check_cipher.crypto.c @@ -9,24 +9,6 @@ // TestSuite(cipher_crypto, .init = setup, .fini = teardown); - - - - -START_TEST(TestPubKeyVerifyNil) -{ - cipher__PubKey p = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0}; - unsigned int errorcode; - - errorcode = SKY_cipher_PubKey_Verify(&p); - ck_assert(errorcode == SKY_ErrInvalidPubKey); -} -END_TEST - START_TEST(TestPubKeyVerifyDefault1) { cipher__PubKey p; @@ -726,7 +708,6 @@ Suite* cipher_crypto(void) tc = tcase_create("cipher.crypto"); tcase_add_checked_fixture(tc, setup, teardown); - tcase_add_test(tc, TestPubKeyVerifyNil); tcase_add_test(tc, TestPubKeyVerifyDefault1); tcase_add_test(tc, TestPubKeyRipemd160); tcase_add_test(tc, TestPubKeyToAddress2); diff --git a/lib/cgo/tests/check_cipher.crypto.common.c b/lib/cgo/tests/check_cipher.crypto.common.c index d0518a1c8..b1bddd570 100644 --- a/lib/cgo/tests/check_cipher.crypto.common.c +++ b/lib/cgo/tests/check_cipher.crypto.common.c @@ -144,6 +144,20 @@ START_TEST(TestPubKeyVerify) } END_TEST +START_TEST(TestPubKeyVerifyNil) +{ + cipher__PubKey p = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0}; + unsigned int errorcode; + + errorcode = SKY_cipher_PubKey_Verify(&p); + ck_assert(errorcode == SKY_ErrInvalidPubKey); +} +END_TEST + // define test suite and cases Suite *common_check_cipher_crypto(void) { @@ -155,6 +169,7 @@ Suite *common_check_cipher_crypto(void) tcase_add_test(tc, TestPubKeyFromHex); tcase_add_test(tc, TestPubKeyHex); tcase_add_test(tc, TestPubKeyVerify); + tcase_add_test(tc, TestPubKeyVerifyNil); suite_add_tcase(s, tc); tcase_set_timeout(tc, 150);