[TCT][device][NON-ACR][Add exception code to deal with DEVICE_ERROR_NOT_SUPPORTED...
authorlokilee73 <changjoo.lee@samsung.com>
Fri, 2 Nov 2018 06:38:20 +0000 (15:38 +0900)
committerlokilee73 <changjoo.lee@samsung.com>
Fri, 2 Nov 2018 06:38:20 +0000 (15:38 +0900)
Change-Id: I45463eeb0f55429e7059235bf7b5c7a62e48f11a

src/itc/device/ITs-device_display.c
src/utc/device/utc-system-device-display.c

index 3d199230d469e18e14b2b1e79e058b4e9f10e4c6..650dabd558ddb54163649824e5ab5ed320a2bffc 100755 (executable)
@@ -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
index 8ab0520cca9aaad0baa1dab1795bf07f9f426c1a..038fc9450e037f9b0761e5a8304c5febc681baba 100755 (executable)
@@ -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;