From: lokilee73 Date: Fri, 2 Nov 2018 06:38:20 +0000 (+0900) Subject: [TCT][device][NON-ACR][Add exception code to deal with DEVICE_ERROR_NOT_SUPPORTED... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=25721ae794506e8f4f75253104fc926464a8f4ac;p=test%2Ftct%2Fnative%2Fapi.git [TCT][device][NON-ACR][Add exception code to deal with DEVICE_ERROR_NOT_SUPPORTED from APIs] Change-Id: I45463eeb0f55429e7059235bf7b5c7a62e48f11a --- diff --git a/src/itc/device/ITs-device_display.c b/src/itc/device/ITs-device_display.c index 3d199230d..650dabd55 100755 --- a/src/itc/device/ITs-device_display.c +++ b/src/itc/device/ITs-device_display.c @@ -166,6 +166,9 @@ int ITc_device_display_set_get_brightness_p(void) // Target API nRet = device_display_set_brightness(nDisplayIndex, nSetBrightness); + if (nRet == DEVICE_ERROR_NOT_SUPPORTED) + return 0; + else PRINT_RESULT(DEVICE_ERROR_NONE, nRet, "device_display_set_brightness", DeviceGetError(nRet)); // Target API diff --git a/src/utc/device/utc-system-device-display.c b/src/utc/device/utc-system-device-display.c index 8ab0520cc..038fc9450 100755 --- a/src/utc/device/utc-system-device-display.c +++ b/src/utc/device/utc-system-device-display.c @@ -146,7 +146,10 @@ int utc_system_device_display_get_brightness_p(void) for (i = 0; i < cnt; i++) { error = device_display_get_brightness(i, &value); - assert_eq(error, DEVICE_ERROR_NONE); + if (error == DEVICE_ERROR_NOT_SUPPORTED) + return 0; + else + assert_eq(error, DEVICE_ERROR_NONE); } return 0; @@ -198,7 +201,10 @@ int utc_system_device_display_set_brightness_p(void) return -1; error = device_display_set_brightness(i, max); - assert_eq(error, DEVICE_ERROR_NONE); + if (error == DEVICE_ERROR_NOT_SUPPORTED) + return 0; + else + assert_eq(error, DEVICE_ERROR_NONE); } return 0;