Skip to content

Commit

Permalink
gh#100: dsVideoPort: Add L1 and L2 Test cases for ALLM APIs
Browse files Browse the repository at this point in the history
Addressed review comments
  • Loading branch information
bhanucbp authored and akhilbhas committed Dec 20, 2024
1 parent 1d07b16 commit 3694270
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ graph TB
Step3 -->|dsERR_NONE|Step4[Call dsGetAllmEnabled API]
Step4 -->|dsERR_NONE|Step5[Compare ALLM Status]
Step5 -->|loop through | Step2
Step5 -- "dsERR_NONE" --> Fail6[Test Case Failed]
Step5 -- "Status doesn't match" --> Fail6[Test Case Failed]
Step2 -->|End of Iteration|Step7[Call dsVideoPortTerm API]
Step7 -->|dsERR_NONE|End[Test Case success]
Step7 -->|Failure|TestcaseFail6[Testcase Fail]
Expand Down
28 changes: 14 additions & 14 deletions src/test_l1_dsVideoPort.c
Original file line number Diff line number Diff line change
Expand Up @@ -4966,11 +4966,11 @@ void test_l1_dsVideoPort_positive_dsGetAllmEnabled(void) {
*/
void test_l1_dsVideoPort_positive_dsGetAllmEnabled(void) {
gTestID = 79;
UT_LOG("\n In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID);
UT_LOG_INFO("\n In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID);

dsError_t status;
intptr_t handle = 0;
bool enabled;
dsError_t status = dsERR_NONE;
intptr_t handle = 0;
bool enabled = false;

// Step 01: Initialize video port system
status = dsVideoPortInit();
Expand Down Expand Up @@ -4999,7 +4999,7 @@ void test_l1_dsVideoPort_positive_dsGetAllmEnabled(void) {
status = dsVideoPortTerm();
UT_ASSERT_EQUAL_FATAL(status, dsERR_NONE);

UT_LOG("\n Out %s\n", __FUNCTION__);
UT_LOG_INFO("\n Out %s\n", __FUNCTION__);
}

/**
Expand Down Expand Up @@ -5030,11 +5030,11 @@ void test_l1_dsVideoPort_positive_dsGetAllmEnabled(void) {
*/
void test_l1_dsVideoPort_negative_dsGetAllmEnabled(void) {
gTestID = 80;
UT_LOG("\n In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID);
UT_LOG_INFO("\n In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID);

dsError_t status;
dsError_t status = dsERR_NONE;
intptr_t handle = 0, valid_handle = 0;
bool enabled;
bool enabled = false;

// Step 01: Attempt to get ALLM Status without initialization
status = dsGetAllmEnabled(-1, &enabled );
Expand Down Expand Up @@ -5075,7 +5075,7 @@ void test_l1_dsVideoPort_negative_dsGetAllmEnabled(void) {
status = dsGetAllmEnabled(valid_handle, &enabled );
CHECK_FOR_EXTENDED_ERROR_CODE(status, dsERR_NOT_INITIALIZED, dsERR_INVALID_PARAM);

UT_LOG("\n Out %s\n", __FUNCTION__);
UT_LOG_INFO("\n Out %s\n", __FUNCTION__);
}

/**
Expand Down Expand Up @@ -5104,7 +5104,7 @@ void test_l1_dsVideoPort_positive_dsSetAllmEnabled(void) {
gTestID = 81;
UT_LOG("\n In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID);

dsError_t status;
dsError_t status = dsERR_NONE;
intptr_t handle = 0;

// Step 01: Initialize video port system
Expand Down Expand Up @@ -5146,7 +5146,7 @@ void test_l1_dsVideoPort_positive_dsSetAllmEnabled(void) {
status = dsVideoPortTerm();
UT_ASSERT_EQUAL_FATAL(status, dsERR_NONE);

UT_LOG("\n Out %s\n", __FUNCTION__);
UT_LOG("\n Out %s\n", __FUNCTION__);
}

/**
Expand Down Expand Up @@ -5178,9 +5178,9 @@ void test_l1_dsVideoPort_negative_dsSetAllmEnabled(void) {
gTestID = 82;
UT_LOG("\n In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID);

dsError_t status;
dsError_t status = dsERR_NONE;
intptr_t handle = 0, valid_handle = 0;
bool enabled;
bool enabled = false;

// Step 01: Attempt to Enable ALLM without initialization
status = dsSetAllmEnabled(-1, true );
Expand Down Expand Up @@ -5213,7 +5213,7 @@ void test_l1_dsVideoPort_negative_dsSetAllmEnabled(void) {
status = dsSetAllmEnabled(valid_handle, true );
CHECK_FOR_EXTENDED_ERROR_CODE(status, dsERR_NOT_INITIALIZED, dsERR_INVALID_PARAM);

UT_LOG("\n Out %s\n", __FUNCTION__);
UT_LOG("\n Out %s\n", __FUNCTION__);
}

static UT_test_suite_t * pSuite = NULL;
Expand Down

0 comments on commit 3694270

Please sign in to comment.