Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TEST_CASE with arrays as arguments (generate_test_runner) #752

Open
kuch3n opened this issue Sep 16, 2024 · 0 comments
Open

TEST_CASE with arrays as arguments (generate_test_runner) #752

kuch3n opened this issue Sep 16, 2024 · 0 comments

Comments

@kuch3n
Copy link

kuch3n commented Sep 16, 2024

Is it possible to use arrays with a TEST_CASE macro? This is possible for "strings" but i can't see a way to pass other array types

TEST_CASE((uint8_t[]){0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, 0, 0, 0, 0)
void test_with_array(uint8_t const * const data, uint16_t a, uint16_t b, uint16_t c, uint16_t d)

should be equivalent to

static void runner_args1_test_with_array(void)
{
    test_with_array((uint8_t[]){0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, 0, 0, 0, 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant