Skip to content

Commit

Permalink
firmware: tests: drivers: Updating tps382x unitary test with mr funct…
Browse files Browse the repository at this point in the history
…ion #330
  • Loading branch information
miguelboing committed Mar 17, 2023
1 parent d6e0337 commit 062bb5e
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions firmware/tests/drivers/tps382x_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,23 @@ static void tps382x_init_test(void **state)

will_return(__wrap_gpio_init, 0);

expect_value(__wrap_gpio_init, pin, TPS382X_MR_PIN);
expect_value(__wrap_gpio_init, config.mode, GPIO_MODE_OUTPUT);

will_return(__wrap_gpio_init, 0);
expect_value(__wrap_gpio_init_mr_pin, mr_pin, TPS382X_MR_PIN);

will_return(__wrap_gpio_init_mr_pin, 0);


expect_value(__wrap_gpio_set_state, pin, TPS382X_MR_PIN);
expect_value(__wrap_gpio_set_state, level, true);

will_return(__wrap_gpio_set_state, 0);


expect_value(__wrap_gpio_set_state, pin, TPS382X_WDI_PIN);
expect_value(__wrap_gpio_set_state, level, true);

will_return(__wrap_gpio_set_state, 0);


assert_return_code(tps382x_init(conf), 0);
}
Expand Down

0 comments on commit 062bb5e

Please sign in to comment.