#define WRONG_PATH ""
+#define INVALID_IMAGE_TYPE sizeof(image_util_type_e) + 1 /* +1 margin due to new type */
+
static image_util_decode_h jpeg_decode_h = NULL;
static image_util_encode_h jpeg_encode_h = NULL;
static image_util_decode_h jpeg_decoded_h = NULL;
*/
int utc_image_util_foreach_supported_colorspace_n2(void)
{
- int ret = image_util_foreach_supported_colorspace(sizeof(image_util_type_e), _image_util_supported_colorspace_cb, NULL);
+ int ret = image_util_foreach_supported_colorspace(-1, _image_util_supported_colorspace_cb, NULL);
+ assert_eq(ret, IMAGE_UTIL_ERROR_INVALID_PARAMETER);
+
+ ret = image_util_foreach_supported_colorspace(INVALID_IMAGE_TYPE, _image_util_supported_colorspace_cb, NULL);
assert_eq(ret, IMAGE_UTIL_ERROR_INVALID_PARAMETER);
+
return 0;
}
ret = image_util_encode_destroy(png_encode_h);
assert_eq(ret, IMAGE_UTIL_ERROR_NONE);
png_encode_h = NULL;
+
ret = image_util_encode_create(-1, &png_encode_h);
assert_eq(ret, IMAGE_UTIL_ERROR_INVALID_PARAMETER);
+ ret = image_util_encode_create(INVALID_IMAGE_TYPE, &png_encode_h);
+ assert_eq(ret, IMAGE_UTIL_ERROR_INVALID_PARAMETER);
+
return 0;
}