mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-02 12:49:03 +00:00
test case update follow the regualtor framework
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
This commit is contained in:
parent
cb812cb2da
commit
cd9d8bbfa9
1 changed files with 4 additions and 4 deletions
|
|
@ -446,10 +446,8 @@ static void test_regulator_supply_4(FAR void **state)
|
|||
&g_fake_regulator);
|
||||
assert_false(NULL == g_fake_regulator.rdev);
|
||||
test = regulator_get(REGULATOR_ID);
|
||||
assert_false(NULL == test);
|
||||
assert_true(NULL == test);
|
||||
g_fake_regulator_supply.state = 0;
|
||||
ret = regulator_enable(test);
|
||||
assert_true(ret < 0);
|
||||
g_fake_regulator_supply.rdev = regulator_register(
|
||||
&g_fake_regulator_supply_desc,
|
||||
&g_fake_regulator_ops,
|
||||
|
|
@ -457,7 +455,8 @@ static void test_regulator_supply_4(FAR void **state)
|
|||
assert_false(NULL == g_fake_regulator_supply.rdev);
|
||||
assert_int_equal(g_fake_regulator_supply.state, 0);
|
||||
assert_int_equal(g_fake_regulator.state, 0);
|
||||
|
||||
test = regulator_get(REGULATOR_ID);
|
||||
assert_false(NULL == test);
|
||||
while (cnt--)
|
||||
{
|
||||
ret = regulator_enable(test);
|
||||
|
|
@ -499,6 +498,7 @@ static void test_regulator_mode(FAR void **state)
|
|||
int ret = 0;
|
||||
|
||||
g_fake_regulator.lpmode = 0;
|
||||
g_fake_regulator_desc.supply_name = NULL;
|
||||
g_fake_regulator.rdev = regulator_register(&g_fake_regulator_desc,
|
||||
&g_fake_regulator_ops,
|
||||
&g_fake_regulator);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue