test: add ethereum test case
test_004ParametersInit_0008TxInitFailureRecipientErrorHexFormat
@@ -256,6 +256,19 @@ START_TEST(test_004ParametersInit_0007TxInitSuccessGasLimitHexNullOx)
}
END_TEST
+START_TEST(test_004ParametersInit_0008TxInitFailureRecipientErrorHexFormat)
+{
+ 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, "0xABCDG");
+ ck_assert(rtnVal == BOAT_ERROR_COMMON_INVALID_ARGUMENT);
+}
+END_TEST
+
START_TEST(test_005ParametersSet_0001GetNonceFromNetworkSuccess)
{
BSINT32 rtnVal;
@@ -307,6 +320,7 @@ START_TEST(test_005ParametersSet_0003SetNonceFailureNullTx)
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);
+
rtnVal = BoatEthTxSetNonce(NULL, 0xA1);
ck_assert(rtnVal == BOAT_ERROR_COMMON_INVALID_ARGUMENT);
}
@@ -333,6 +347,7 @@ Suite *make_parameters_suite(void)
tcase_add_test(tc_param_api, test_004ParametersInit_0005TxInitSuccessGasPriceHexNullOx);
tcase_add_test(tc_param_api, test_004ParametersInit_0006TxInitFailureGasLimitErrorHexFormat);
tcase_add_test(tc_param_api, test_004ParametersInit_0007TxInitSuccessGasLimitHexNullOx);
+ tcase_add_test(tc_param_api, test_004ParametersInit_0008TxInitFailureRecipientErrorHexFormat);
tcase_add_test(tc_param_api, test_005ParametersSet_0001GetNonceFromNetworkSuccess);
tcase_add_test(tc_param_api, test_005ParametersSet_0002SetNonceSuccess);
tcase_add_test(tc_param_api, test_005ParametersSet_0003SetNonceFailureNullTx);
