From: Haesu Gwon Date: Tue, 21 Jun 2022 05:24:55 +0000 (+0900) Subject: [ImageUtil] Add heif and webp TCs X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6ba0d8ec0043abab0ee61f1f4cf8b280ed5bd4b6;p=test%2Ftct%2Fcsharp%2Fapi.git [ImageUtil] Add heif and webp TCs Change-Id: I797635a5ff3333f08e77992641b1f7ce7d11eaf7 --- diff --git a/tct-suite-vs/Tizen.MultimediaUtil.Tests/res/test_heic.heic b/tct-suite-vs/Tizen.MultimediaUtil.Tests/res/test_heic.heic new file mode 100755 index 0000000..659078c Binary files /dev/null and b/tct-suite-vs/Tizen.MultimediaUtil.Tests/res/test_heic.heic differ diff --git a/tct-suite-vs/Tizen.MultimediaUtil.Tests/res/test.mp3 b/tct-suite-vs/Tizen.MultimediaUtil.Tests/res/test_mp3.mp3 similarity index 100% rename from tct-suite-vs/Tizen.MultimediaUtil.Tests/res/test.mp3 rename to tct-suite-vs/Tizen.MultimediaUtil.Tests/res/test_mp3.mp3 diff --git a/tct-suite-vs/Tizen.MultimediaUtil.Tests/res/test_webp.webp b/tct-suite-vs/Tizen.MultimediaUtil.Tests/res/test_webp.webp new file mode 100755 index 0000000..f2272c3 Binary files /dev/null and b/tct-suite-vs/Tizen.MultimediaUtil.Tests/res/test_webp.webp differ diff --git a/tct-suite-vs/Tizen.MultimediaUtil.Tests/testcase/ImageUtil/TSImageDecoder.cs b/tct-suite-vs/Tizen.MultimediaUtil.Tests/testcase/ImageUtil/TSImageDecoder.cs index 9905b51..0ac20b3 100755 --- a/tct-suite-vs/Tizen.MultimediaUtil.Tests/testcase/ImageUtil/TSImageDecoder.cs +++ b/tct-suite-vs/Tizen.MultimediaUtil.Tests/testcase/ImageUtil/TSImageDecoder.cs @@ -49,6 +49,8 @@ namespace Tizen.Multimedia.Util.Tests _gifDecoder.Dispose(); _jpegDecoder.Dispose(); _pngDecoder.Dispose(); + _webPDecoder.Dispose(); + _heifDecoder.Dispose(); } [Test] @@ -268,6 +270,66 @@ namespace Tizen.Multimedia.Util.Tests } [Test] + [Category("P1")] + [Description("Decode webp image using input buffer")] + [Property("SPEC", "Tizen.Multimedia.Util.ImageDecoder.DecodeAsync M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + [Property("COVPARAM", "byte[]")] + public async Task DecodeAsync_INPUTBUFFER_WEBP_CHECK_RETURN_VALUE() + { + var frame = (await _webPDecoder.DecodeAsync(File.ReadAllBytes(ImageUtilConstants.WebPPath))).FirstOrDefault(); + + Assert.That(frame.Size.Height, Is.Positive); + } + + [Test] + [Category("P1")] + [Description("Decode webp image using input path")] + [Property("SPEC", "Tizen.Multimedia.Util.ImageDecoder.DecodeAsync M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + [Property("COVPARAM", "string")] + public async Task DecodeAsync_INPUTPATH_WEBP_CHECK_RETURN_VALUE() + { + var frame = (await _webPDecoder.DecodeAsync(ImageUtilConstants.WebPPath)).FirstOrDefault(); + + Assert.That(frame.Size.Height, Is.Positive); + } + + [Test] + [Category("P1")] + [Description("Decode heif image using input buffer")] + [Property("SPEC", "Tizen.Multimedia.Util.ImageDecoder.DecodeAsync M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + [Property("COVPARAM", "byte[]")] + public async Task DecodeAsync_INPUTBUFFER_HEIF_CHECK_RETURN_VALUE() + { + var frame = (await _heifDecoder.DecodeAsync(File.ReadAllBytes(ImageUtilConstants.HeifPath))).FirstOrDefault(); + + Assert.That(frame.Size.Height, Is.Positive); + } + + [Test] + [Category("P1")] + [Description("Decode heif image using input path")] + [Property("SPEC", "Tizen.Multimedia.Util.ImageDecoder.DecodeAsync M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + [Property("COVPARAM", "string")] + public async Task DecodeAsync_INPUTPATH_HEIF_CHECK_RETURN_VALUE() + { + var frame = (await _heifDecoder.DecodeAsync(ImageUtilConstants.HeifPath)).FirstOrDefault(); + + Assert.That(frame.Size.Height, Is.Positive); + } + + [Test] [Category("P2")] [Description("Check if it throws argument exception for setting color space with an invalid color space value")] [Property("SPEC", "Tizen.Multimedia.Util.ImageDecoder.SetColorSpace M")] diff --git a/tct-suite-vs/Tizen.MultimediaUtil.Tests/testcase/support/ImageUtilConstants.cs b/tct-suite-vs/Tizen.MultimediaUtil.Tests/testcase/support/ImageUtilConstants.cs index fc14158..ca31365 100755 --- a/tct-suite-vs/Tizen.MultimediaUtil.Tests/testcase/support/ImageUtilConstants.cs +++ b/tct-suite-vs/Tizen.MultimediaUtil.Tests/testcase/support/ImageUtilConstants.cs @@ -5,5 +5,7 @@ internal static class ImageUtilConstants internal const string BitmapPath = "/opt/usr/home/owner/share/res/test_bmp.bmp"; internal const string GifPath = "/opt/usr/home/owner/share/res/test_gif.gif"; internal const string PngPath = "/opt/usr/home/owner/share/res/test_png.png"; - internal const string Mp3Path = "/opt/usr/home/owner/share/res/test.mp3"; + internal const string WebPPath = "/opt/usr/home/owner/share/res/test_webp.webp"; + internal const string HeifPath = "/opt/usr/home/owner/share/res/test_heic.heic"; + internal const string Mp3Path = "/opt/usr/home/owner/share/res/test_mp3.mp3"; } \ No newline at end of file