test: add ethereum test case
test_005ParametersSet_0005SetValueFailureNullTx
@@ -364,6 +364,27 @@ START_TEST(test_005ParametersSet_0004SetValueSuccess)
}
END_TEST
+START_TEST(test_005ParametersSet_0005SetValueFailureNullTx)
+{
+ BSINT32 rtnVal;
+ BoatEthTx tx_ptr;
+ rtnVal = ethereumWalletPrepare();
+ ck_assert_int_eq(rtnVal, BOAT_SUCCESS);
+
+ rtnVal = BoatEthTxInit(g_ethereum_wallet_ptr, &tx_ptr, TEST_IS_SYNC_TX, TEST_GAS_PRICE,
+ TEST_GAS_LIMIT, TEST_RECIPIENT_ADDRESS);
+ ck_assert(rtnVal == BOAT_SUCCESS);
+
+ BoatFieldMax32B value;
+ value.field_len = UtilityHexToBin(value.field, 32, "0x2386F26FC10000",
+ TRIMBIN_LEFTTRIM, BOAT_TRUE);
+ rtnVal = BoatEthTxSetValue(NULL, &value);
+ ck_assert(rtnVal == BOAT_ERROR_COMMON_INVALID_ARGUMENT);
+
+ BoatIotSdkDeInit();
+}
+END_TEST
+
Suite *make_parameters_suite(void)
{
/* Create Suite */
@@ -391,6 +412,7 @@ Suite *make_parameters_suite(void)
tcase_add_test(tc_param_api, test_005ParametersSet_0002SetNonceSuccess);
tcase_add_test(tc_param_api, test_005ParametersSet_0003SetNonceFailureNullTx);
tcase_add_test(tc_param_api, test_005ParametersSet_0004SetValueSuccess);
+ tcase_add_test(tc_param_api, test_005ParametersSet_0005SetValueFailureNullTx);
return s_param;
}
