From: Haesu Gwon Date: Tue, 4 Sep 2018 10:01:31 +0000 (+0900) Subject: [AudioIO][TCSACR-178] Add new enum for sample type X-Git-Tag: tct5.0_m2~73^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F80%2F188380%2F4;p=test%2Ftct%2Fcsharp%2Fapi.git [AudioIO][TCSACR-178] Add new enum for sample type Change-Id: Ie303aca381cf53521cef6aef7104c90b56f7aab3 --- diff --git a/tct-suite-vs/Tizen.AudioIO.Tests/testcase/AudioIO/TSAsyncAudioCapture.cs b/tct-suite-vs/Tizen.AudioIO.Tests/testcase/AudioIO/TSAsyncAudioCapture.cs old mode 100755 new mode 100644 index 69c0611de..401e800c8 --- a/tct-suite-vs/Tizen.AudioIO.Tests/testcase/AudioIO/TSAsyncAudioCapture.cs +++ b/tct-suite-vs/Tizen.AudioIO.Tests/testcase/AudioIO/TSAsyncAudioCapture.cs @@ -17,7 +17,7 @@ namespace Tizen.Multimedia.Tests public void OneTimeSetup() { Information.TryGetValue("tizen.org/feature/microphone", out _isMicrophoneAvail); - Tizen.Log.Info(LogTag, "Microphone available : " + _isMicrophoneAvail); + Log.Info(LogTag, "Microphone available : " + _isMicrophoneAvail); } [SetUp] @@ -35,16 +35,101 @@ namespace Tizen.Multimedia.Tests [Test] [Category("P1")] - [Description("AsyncAudioCapture test")] + [Description("Create AsyncAudioCapture object with Mono channel")] [Property("SPEC", "Tizen.Multimedia.AsyncAudioCapture.AsyncAudioCapture C")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] - public void AsyncAudioCapture_CHECK() + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void AsyncAudioCapture_CREATE_MONO_CHANNEL() { if (_isMicrophoneAvail == false) return; + Assert.DoesNotThrow(() => new AsyncAudioCapture(44100, AudioChannel.Mono, AudioSampleType.U8)); Assert.DoesNotThrow(() => new AsyncAudioCapture(44100, AudioChannel.Mono, AudioSampleType.S16Le)); + Assert.DoesNotThrow(() => new AsyncAudioCapture(44100, AudioChannel.Mono, AudioSampleType.S24Le)); + Assert.DoesNotThrow(() => new AsyncAudioCapture(44100, AudioChannel.Mono, AudioSampleType.S24LePacked)); + } + + [Test] + [Category("P1")] + [Description("Create AsyncAudioCapture object with Stereo channel")] + [Property("SPEC", "Tizen.Multimedia.AsyncAudioCapture.AsyncAudioCapture C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void AsyncAudioCapture_CREATE_STEREO_CHANNEL() + { + if (_isMicrophoneAvail == false) + return; + + Assert.DoesNotThrow(() => new AsyncAudioCapture(44100, AudioChannel.Stereo, AudioSampleType.U8)); + Assert.DoesNotThrow(() => new AsyncAudioCapture(44100, AudioChannel.Stereo, AudioSampleType.S16Le)); + Assert.DoesNotThrow(() => new AsyncAudioCapture(44100, AudioChannel.Stereo, AudioSampleType.S24Le)); + Assert.DoesNotThrow(() => new AsyncAudioCapture(44100, AudioChannel.Stereo, AudioSampleType.S24LePacked)); + } + + [Test] + [Category("P2")] + [Description("AsyncAudioCapture constructor throws ArgumentOutOfRangeException when invalid sample rate is given.")] + [Property("SPEC", "Tizen.Multimedia.AsyncAudioCapture.AsyncAudioCapture C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTX")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void AsyncAudioCapture_THROWS_IF_SAMPLE_RATE_INVALID() + { + if (_isMicrophoneAvail == false) + return; + + Assert.DoesNotThrow(() => + new AsyncAudioCapture(AudioCaptureBase.MinSampleRate, AudioChannel.Stereo, AudioSampleType.S16Le)); + + Assert.DoesNotThrow(() => + new AsyncAudioCapture(AudioCaptureBase.MaxSampleRate, AudioChannel.Stereo, AudioSampleType.S16Le)); + + Assert.Throws(() => + new AsyncAudioCapture(AudioCaptureBase.MinSampleRate - 1, AudioChannel.Stereo, AudioSampleType.S16Le)); + + Assert.Throws(() => + new AsyncAudioCapture(AudioCaptureBase.MaxSampleRate + 1, AudioChannel.Stereo, AudioSampleType.S16Le)); + } + + [Test] + [Category("P2")] + [Description("AsyncAudioCapture constructor throws ArgumentException when invalid channel is given.")] + [Property("SPEC", "Tizen.Multimedia.AsyncAudioCapture.AsyncAudioCapture C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTX")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void AsyncAudioCapture_THROWS_IF_CHANNEL_INVALID() + { + if (_isMicrophoneAvail == false) + return; + + Assert.Throws(() => + new AsyncAudioCapture(AudioCaptureBase.MinSampleRate, AudioChannel.Mono - 1, AudioSampleType.U8)); + + Assert.Throws(() => + new AsyncAudioCapture(AudioCaptureBase.MaxSampleRate, AudioChannel.Stereo + 1, AudioSampleType.S16Le)); + } + + [Test] + [Category("P2")] + [Description("AsyncAudioCapture constructor throws ArgumentException when invalid sample type is given.")] + [Property("SPEC", "Tizen.Multimedia.AsyncAudioCapture.AsyncAudioCapture C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTX")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void AsyncAudioCapture_THROWS_IF_SAMPLE_TYPE_INVALID() + { + if (_isMicrophoneAvail == false) + return; + + Assert.Throws(() => + new AsyncAudioCapture(AudioCaptureBase.MinSampleRate, AudioChannel.Mono, AudioSampleType.U8 - 1)); + + Assert.Throws(() => + new AsyncAudioCapture(AudioCaptureBase.MaxSampleRate, AudioChannel.Stereo, AudioSampleType.S24LePacked + 1)); } [Test] diff --git a/tct-suite-vs/Tizen.AudioIO.Tests/testcase/AudioIO/TSAudioCapture.cs b/tct-suite-vs/Tizen.AudioIO.Tests/testcase/AudioIO/TSAudioCapture.cs old mode 100755 new mode 100644 index 5ef3e067b..259cd67c1 --- a/tct-suite-vs/Tizen.AudioIO.Tests/testcase/AudioIO/TSAudioCapture.cs +++ b/tct-suite-vs/Tizen.AudioIO.Tests/testcase/AudioIO/TSAudioCapture.cs @@ -17,7 +17,7 @@ namespace Tizen.Multimedia.Tests public void OneTimeSetup() { Information.TryGetValue("tizen.org/feature/microphone", out _isMicrophoneAvail); - Tizen.Log.Info(LogTag, "Microphone available : " + _isMicrophoneAvail); + Log.Info(LogTag, "Microphone available : " + _isMicrophoneAvail); } [SetUp] @@ -63,6 +63,36 @@ namespace Tizen.Multimedia.Tests Assert.DoesNotThrow(() => new AudioCapture(44100, AudioChannel.Mono, AudioSampleType.S16Le)); } + [Test] + [Category("P1")] + [Description("Create AudioCapture object with Mono and S24Le value and verify")] + [Property("SPEC", "Tizen.Multimedia.AudioCapture.AudioCapture C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void AudioCapture_CREATE_MONO_S24Le() + { + if (_isMicrophoneAvail == false) + return; + + Assert.DoesNotThrow(() => new AudioCapture(44100, AudioChannel.Mono, AudioSampleType.S24Le)); + } + + [Test] + [Category("P1")] + [Description("Create AudioCapture object with Mono and S24LePacked value and verify")] + [Property("SPEC", "Tizen.Multimedia.AudioCapture.AudioCapture C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void AudioCapture_CREATE_MONO_S24LePacked() + { + if (_isMicrophoneAvail == false) + return; + + Assert.DoesNotThrow(() => new AudioCapture(44100, AudioChannel.Mono, AudioSampleType.S24LePacked)); + } + [Test] [Category("P1")] [Description("Create AudioCapture object with Stereo and U8 value and verify")] @@ -93,12 +123,42 @@ namespace Tizen.Multimedia.Tests Assert.DoesNotThrow(() => new AudioCapture(44100, AudioChannel.Stereo, AudioSampleType.S16Le)); } + [Test] + [Category("P1")] + [Description("Create AudioCapture object with Stereo and S24Le value and verify")] + [Property("SPEC", "Tizen.Multimedia.AudioCapture.AudioCapture C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void AudioCapture_CREATE_STEREO_S24Le() + { + if (_isMicrophoneAvail == false) + return; + + Assert.DoesNotThrow(() => new AudioCapture(44100, AudioChannel.Stereo, AudioSampleType.S24Le)); + } + + [Test] + [Category("P1")] + [Description("Create AudioCapture object with Stereo and S24LePacked value and verify")] + [Property("SPEC", "Tizen.Multimedia.AudioCapture.AudioCapture C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void AudioCapture_CREATE_STEREO_S24LePacked() + { + if (_isMicrophoneAvail == false) + return; + + Assert.DoesNotThrow(() => new AudioCapture(44100, AudioChannel.Stereo, AudioSampleType.S24LePacked)); + } + [Test] [Category("P2")] [Description("AudioCapture constructor throws ArgumentOutOfRangeException when invalid sample rate is given.")] [Property("SPEC", "Tizen.Multimedia.AudioCapture.AudioCapture C")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MEX")] + [Property("CRITERIA", "CONSTX")] [Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")] public void AudioCapture_THROWS_IF_SAMPLE_RATE_INVALID() { @@ -123,7 +183,7 @@ namespace Tizen.Multimedia.Tests [Description("AudioCapture constructor throws ArgumentException when invalid channel is given.")] [Property("SPEC", "Tizen.Multimedia.AudioCapture.AudioCapture C")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MEX")] + [Property("CRITERIA", "CONSTX")] [Property("AUTHOR", "Seungbae Shin, seungbae.shin@samsung.com")] public void AudioCapture_THROWS_IF_CHANNEL_INVALID() { @@ -142,7 +202,7 @@ namespace Tizen.Multimedia.Tests [Description("AudioCapture constructor throws ArgumentException when invalid sample type is given.")] [Property("SPEC", "Tizen.Multimedia.AudioCapture.AudioCapture C")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MEX")] + [Property("CRITERIA", "CONSTX")] [Property("AUTHOR", "Seungbae Shin, seungbae.shin@samsung.com")] public void AudioCapture_THROWS_IF_SAMPLE_TYPE_INVALID() { @@ -153,7 +213,7 @@ namespace Tizen.Multimedia.Tests new AudioCapture(AudioCaptureBase.MinSampleRate, AudioChannel.Mono, AudioSampleType.U8 - 1)); Assert.Throws(() => - new AudioCapture(AudioCaptureBase.MaxSampleRate, AudioChannel.Stereo, AudioSampleType.S16Le + 1)); + new AudioCapture(AudioCaptureBase.MaxSampleRate, AudioChannel.Stereo, AudioSampleType.S24LePacked + 1)); } [Test] diff --git a/tct-suite-vs/Tizen.AudioIO.Tests/testcase/AudioIO/TSAudioCaptureBase.cs b/tct-suite-vs/Tizen.AudioIO.Tests/testcase/AudioIO/TSAudioCaptureBase.cs old mode 100755 new mode 100644 index 3883f1a3b..bfcdde22c --- a/tct-suite-vs/Tizen.AudioIO.Tests/testcase/AudioIO/TSAudioCaptureBase.cs +++ b/tct-suite-vs/Tizen.AudioIO.Tests/testcase/AudioIO/TSAudioCaptureBase.cs @@ -17,7 +17,7 @@ namespace Tizen.Multimedia.Tests public void OneTimeSetup() { Information.TryGetValue("tizen.org/feature/microphone", out _isMicrophoneAvail); - Tizen.Log.Info(LogTag, "Microphone available : " + _isMicrophoneAvail); + Log.Info(LogTag, "Microphone available : " + _isMicrophoneAvail); } [SetUp] diff --git a/tct-suite-vs/Tizen.AudioIO.Tests/testcase/AudioIO/TSAudioPlayback.cs b/tct-suite-vs/Tizen.AudioIO.Tests/testcase/AudioIO/TSAudioPlayback.cs old mode 100755 new mode 100644 index fd8e83b6c..615e72244 --- a/tct-suite-vs/Tizen.AudioIO.Tests/testcase/AudioIO/TSAudioPlayback.cs +++ b/tct-suite-vs/Tizen.AudioIO.Tests/testcase/AudioIO/TSAudioPlayback.cs @@ -107,6 +107,30 @@ namespace Tizen.Multimedia.Tests Assert.DoesNotThrow(() => new AudioPlayback(44100, AudioChannel.Mono, AudioSampleType.S16Le)); } + [Test] + [Category("P1")] + [Description("Create AudioPlayback object with Mono and S24Le value and verify")] + [Property("SPEC", "Tizen.Multimedia.AudioPlayback.AudioPlayback C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void AudioPlayback_CREATE_MONO_S24Le() + { + Assert.DoesNotThrow(() => new AudioPlayback(44100, AudioChannel.Mono, AudioSampleType.S24Le)); + } + + [Test] + [Category("P1")] + [Description("Create AudioPlayback object with Mono and S24LePacked value and verify")] + [Property("SPEC", "Tizen.Multimedia.AudioPlayback.AudioPlayback C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void AudioPlayback_CREATE_MONO_S24LePacked() + { + Assert.DoesNotThrow(() => new AudioPlayback(44100, AudioChannel.Mono, AudioSampleType.S24LePacked)); + } + [Test] [Category("P1")] [Description("Create AudioPlayback object with Stereo and U8 value and verify")] @@ -131,12 +155,36 @@ namespace Tizen.Multimedia.Tests Assert.DoesNotThrow(() => new AudioPlayback(44100, AudioChannel.Stereo, AudioSampleType.S16Le)); } + [Test] + [Category("P1")] + [Description("Create AudioPlayback object with Stereo and S24Le value and verify")] + [Property("SPEC", "Tizen.Multimedia.AudioPlayback.AudioPlayback C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void AudioPlayback_CREATE_STEREO_S24Le() + { + Assert.DoesNotThrow(() => new AudioPlayback(44100, AudioChannel.Stereo, AudioSampleType.S24Le)); + } + + [Test] + [Category("P1")] + [Description("Create AudioPlayback object with Stereo and S24LePacked value and verify")] + [Property("SPEC", "Tizen.Multimedia.AudioPlayback.AudioPlayback C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void AudioPlayback_CREATE_STEREO_S24LePacked() + { + Assert.DoesNotThrow(() => new AudioPlayback(44100, AudioChannel.Stereo, AudioSampleType.S24LePacked)); + } + [Test] [Category("P2")] [Description("AudioPlayback constructor throws ArgumentOutOfRangeException when invalid sample rate is given.")] [Property("SPEC", "Tizen.Multimedia.AudioPlayback.AudioPlayback C")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MEX")] + [Property("CRITERIA", "CONSTX")] [Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")] public void AudioPlayback_THROWS_IF_SAMPLE_RATE_INVALID() { @@ -158,7 +206,7 @@ namespace Tizen.Multimedia.Tests [Description("AudioPlayback constructor throws ArgumentOutOfRangeException when invalid channel is given")] [Property("SPEC", "Tizen.Multimedia.AudioPlayback.AudioPlayback C")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MEX")] + [Property("CRITERIA", "CONSTX")] [Property("AUTHOR", "Seungbae Shin, seungbae.shin@samsung.com")] public void AudioPlayback_THROWS_IF_CHANNEL_INVALID() { @@ -174,7 +222,7 @@ namespace Tizen.Multimedia.Tests [Description("AudioPlayback constructor throws ArgumentOutOfRangeException when invalid sample type is given")] [Property("SPEC", "Tizen.Multimedia.AudioPlayback.AudioPlayback C")] [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MEX")] + [Property("CRITERIA", "CONSTX")] [Property("AUTHOR", "Seungbae Shin, seungbae.shin@samsung.com")] public void AudioPlayback_THROWS_IF_SAMPLE_TYPE_INVALID() { @@ -182,7 +230,7 @@ namespace Tizen.Multimedia.Tests new AudioPlayback(AudioPlayback.MinSampleRate, AudioChannel.Mono, AudioSampleType.U8 - 1)); Assert.Throws(() => - new AudioPlayback(AudioPlayback.MaxSampleRate, AudioChannel.Stereo, AudioSampleType.S16Le + 1)); + new AudioPlayback(AudioPlayback.MaxSampleRate, AudioChannel.Stereo, AudioSampleType.S24LePacked + 1)); } [Test]