Skip to content

Commit 0744ec3

Browse files
Fix unit-tests build
1 parent 3c352b8 commit 0744ec3

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

tests/unit/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ target_link_libraries(test_param_token_amount PUBLIC
397397
-Wl,--wrap=value_cleanup
398398
-Wl,--wrap=handle_value_struct
399399
-Wl,--wrap=get_current_tx_info
400-
-Wl,--wrap=get_matching_token_info
400+
-Wl,--wrap=get_matching_token_info_or_dummy
401401
-Wl,--wrap=add_to_field_table
402402
-Wl,--wrap=get_displayable_ticker
403403
)

tests/unit/src/test_param_token_amount.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const s_tx_info *__wrap_get_current_tx_info(void) {
6767
return &g_fake_tx_info;
6868
}
6969

70-
const s_token_info *__wrap_get_matching_token_info(const uint64_t *chain_id, const uint8_t *addr) {
70+
const s_token_info *__wrap_get_matching_token_info_or_dummy(const uint64_t *chain_id, const uint8_t *addr) {
7171
(void) chain_id;
7272
(void) addr;
7373
return (const s_token_info *) mock();
@@ -115,7 +115,7 @@ static uint8_t g_usdc_addr[ADDRESS_LENGTH] = {
115115
0x9D, 0x4a, 0x2e, 0x9E, 0xb0, 0xcE, 0x36, 0x06, 0xeB, 0x48,
116116
};
117117

118-
// Fake USDC extra_info returned by get_matching_token_info
118+
// Fake USDC extra_info returned by get_matching_token_info_or_dummy
119119
static s_token_info g_usdc_info = {
120120
.address =
121121
{
@@ -163,8 +163,8 @@ static void test_token_amount_broadcast_ok(void **state) {
163163
g_fake_tx_info.chain_id = 1;
164164

165165
// token resolution: USDC found (called for each of the 2 iterations)
166-
will_return(__wrap_get_matching_token_info, &g_usdc_info);
167-
will_return(__wrap_get_matching_token_info, &g_usdc_info);
166+
will_return(__wrap_get_matching_token_info_or_dummy, &g_usdc_info);
167+
will_return(__wrap_get_matching_token_info_or_dummy, &g_usdc_info);
168168

169169
// Expected field table entries: "1 USDC" then "2 USDC"
170170
expect_value(__wrap_add_to_field_table, type, PARAM_TYPE_TOKEN_AMOUNT);

0 commit comments

Comments
 (0)