This is an automated email from the ASF dual-hosted git repository.

cederom pushed a commit to branch releases/12.7
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit 734baae5a20c510a0f3dc22b569c6a94b5de88ea
Author: dulibo1 <[email protected]>
AuthorDate: Fri Oct 13 16:54:42 2023 +0800

    test case update follow the regualtor framework
    
    Signed-off-by: dulibo1 <[email protected]>
---
 testing/drivertest/drivertest_regulator.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/testing/drivertest/drivertest_regulator.c 
b/testing/drivertest/drivertest_regulator.c
index 4310fdf48..212c6805a 100644
--- a/testing/drivertest/drivertest_regulator.c
+++ b/testing/drivertest/drivertest_regulator.c
@@ -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);

Reply via email to