[chainmaker][#436]add tests test_03Contract_0002InvokeFailureMethodNull
@@ -111,14 +111,26 @@ START_TEST(test_03Contract_0001InvokeFailureTxNull)
BOAT_RESULT result;
BoatHlchainmakerTx tx_ptr;
BoatInvokeReponse invoke_reponse;
- result = test_contrct_invoke_prepara(tx_ptr);
- ck_assert_int_eq(result, BOAT_SUCCESS);
result = BoatHlchainmakerContractInvoke(NULL, "save", "fact", true, &invoke_reponse); ;
ck_assert(result == BOAT_ERROR_INVALID_ARGUMENT);
}
END_TEST
+START_TEST(test_03Contract_0002InvokeFailureMethodNull)
+{
+ BOAT_RESULT result;
+ BoatHlchainmakerTx tx_ptr;
+ BoatInvokeReponse invoke_reponse;
+
+ test_contrct_invoke_prepara(tx_ptr);
+
+ result = BoatHlchainmakerContractInvoke(&tx_ptr, NULL, "fact", true, &invoke_reponse); ;
+ ck_assert(result == BOAT_ERROR_INVALID_ARGUMENT);
+}
+END_TEST
+
+
Suite *make_contract_suite(void)
{
/* Create Suite */
@@ -131,6 +143,7 @@ Suite *make_contract_suite(void)
suite_add_tcase(s_contract, tc_contract_api);
/* Test cases are added to the test set */
tcase_add_test(tc_contract_api, test_03Contract_0001InvokeFailureTxNull);
+ tcase_add_test(tc_contract_api, test_03Contract_0002InvokeFailureMethodNull);
return s_contract;
}
