test case update follow the regualtor framework
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
This commit is contained in:
parent
bbba2448cd
commit
734baae5a2
@ -446,10 +446,8 @@ static void test_regulator_supply_4(FAR void **state)
|
|||||||
&g_fake_regulator);
|
&g_fake_regulator);
|
||||||
assert_false(NULL == g_fake_regulator.rdev);
|
assert_false(NULL == g_fake_regulator.rdev);
|
||||||
test = regulator_get(REGULATOR_ID);
|
test = regulator_get(REGULATOR_ID);
|
||||||
assert_false(NULL == test);
|
assert_true(NULL == test);
|
||||||
g_fake_regulator_supply.state = 0;
|
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.rdev = regulator_register(
|
||||||
&g_fake_regulator_supply_desc,
|
&g_fake_regulator_supply_desc,
|
||||||
&g_fake_regulator_ops,
|
&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_false(NULL == g_fake_regulator_supply.rdev);
|
||||||
assert_int_equal(g_fake_regulator_supply.state, 0);
|
assert_int_equal(g_fake_regulator_supply.state, 0);
|
||||||
assert_int_equal(g_fake_regulator.state, 0);
|
assert_int_equal(g_fake_regulator.state, 0);
|
||||||
|
test = regulator_get(REGULATOR_ID);
|
||||||
|
assert_false(NULL == test);
|
||||||
while (cnt--)
|
while (cnt--)
|
||||||
{
|
{
|
||||||
ret = regulator_enable(test);
|
ret = regulator_enable(test);
|
||||||
@ -499,6 +498,7 @@ static void test_regulator_mode(FAR void **state)
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
g_fake_regulator.lpmode = 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.rdev = regulator_register(&g_fake_regulator_desc,
|
||||||
&g_fake_regulator_ops,
|
&g_fake_regulator_ops,
|
||||||
&g_fake_regulator);
|
&g_fake_regulator);
|
||||||
|
Loading…
Reference in New Issue
Block a user