diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/sbs_charging_v2.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/sbs_charging_v2.c b/test/sbs_charging_v2.c index 7bf467d2be..5e11c722fe 100644 --- a/test/sbs_charging_v2.c +++ b/test/sbs_charging_v2.c @@ -454,7 +454,10 @@ static int test_hc_charge_state(void) ¶ms, sizeof(params), &resp, sizeof(resp)); TEST_ASSERT(rv == EC_RES_SUCCESS); - TEST_ASSERT(resp.get_param.value); + if (i != CS_PARAM_LIMIT_POWER) + TEST_ASSERT(resp.get_param.value); + else + TEST_ASSERT(!resp.get_param.value); /* Bump it up a bit */ tmp = resp.get_param.value; @@ -465,7 +468,8 @@ static int test_hc_charge_state(void) tmp -= 128; /* Should be valid delta */ break; case CS_PARAM_CHG_STATUS: - /* This one can't be set */ + case CS_PARAM_LIMIT_POWER: + /* These ones can't be set */ break; case CS_PARAM_CHG_OPTION: tmp = CHG_OPT2; @@ -477,7 +481,7 @@ static int test_hc_charge_state(void) rv = test_send_host_command(EC_CMD_CHARGE_STATE, 0, ¶ms, sizeof(params), &resp, sizeof(resp)); - if (i == CS_PARAM_CHG_STATUS) + if (i == CS_PARAM_CHG_STATUS || i == CS_PARAM_LIMIT_POWER) TEST_ASSERT(rv == EC_RES_ACCESS_DENIED); else TEST_ASSERT(rv == EC_RES_SUCCESS); |