Skip to content

Commit

Permalink
corrected test
Browse files Browse the repository at this point in the history
  • Loading branch information
aodinokov committed Aug 17, 2024
1 parent 08d276a commit 54bce98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions examples/c_ffi_call/value_ffi.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,7 @@ int _call(metac_value_t * p_param_storage_val, void (*fn)(void), metac_value_t *
#if __linux__
values[i] = &p_val_list_entries[va_list_number_cur].va_list_c.parameters;
#else
va_list * x = &p_val_list_entries[va_list_number_cur].va_list_c;
values[i] = x;
values[i] = &p_val_list_entries[va_list_number_cur].va_list_c.parameters;
#endif
++va_list_number_cur;
// // simple approach (without recursion)
Expand Down
4 changes: 2 additions & 2 deletions examples/c_ffi_call/value_ffi_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -806,10 +806,10 @@ METAC_START_TEST(test_variadic_list) {

fail_unless(res == 0, "Call wasn't successful, expected successful");

expected_called = "test_function_with_va_list 777";
expected_called = "test_function_with_va_list 1 2 3 4 5 6";
fail_unless(strcmp(called, expected_called) == 0, "called: got %s, expected %s", called, expected_called);

expected = "30";
expected = "38";
s = metac_value_string_ex(p_res_val, METAC_WMODE_deep, NULL);
fail_unless(s != NULL);
fail_unless(strcmp(s, expected) == 0, "got %s, expected %s", s, expected);
Expand Down

0 comments on commit 54bce98

Please sign in to comment.