[AudioIO][TCSACR-178] Add new enum for sample type 80/188380/4
authorHaesu Gwon <haesu.gwon@samsung.com>
Tue, 4 Sep 2018 10:01:31 +0000 (19:01 +0900)
committerHaesu Gwon <haesu.gwon@samsung.com>
Thu, 6 Sep 2018 03:06:56 +0000 (12:06 +0900)
Change-Id: Ie303aca381cf53521cef6aef7104c90b56f7aab3

tct-suite-vs/Tizen.AudioIO.Tests/testcase/AudioIO/TSAsyncAudioCapture.cs [changed mode: 0755->0644]
tct-suite-vs/Tizen.AudioIO.Tests/testcase/AudioIO/TSAudioCapture.cs [changed mode: 0755->0644]
tct-suite-vs/Tizen.AudioIO.Tests/testcase/AudioIO/TSAudioCaptureBase.cs [changed mode: 0755->0644]
tct-suite-vs/Tizen.AudioIO.Tests/testcase/AudioIO/TSAudioPlayback.cs [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 69c0611..401e800
@@ -17,7 +17,7 @@ namespace Tizen.Multimedia.Tests
         public void OneTimeSetup()
         {
             Information.TryGetValue<bool>("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<ArgumentOutOfRangeException>(() =>
+                new AsyncAudioCapture(AudioCaptureBase.MinSampleRate - 1, AudioChannel.Stereo, AudioSampleType.S16Le));
+
+            Assert.Throws<ArgumentOutOfRangeException>(() =>
+                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<ArgumentException>(() =>
+                new AsyncAudioCapture(AudioCaptureBase.MinSampleRate, AudioChannel.Mono - 1, AudioSampleType.U8));
+
+            Assert.Throws<ArgumentException>(() =>
+                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<ArgumentException>(() =>
+                new AsyncAudioCapture(AudioCaptureBase.MinSampleRate, AudioChannel.Mono, AudioSampleType.U8 - 1));
+
+            Assert.Throws<ArgumentException>(() =>
+                new AsyncAudioCapture(AudioCaptureBase.MaxSampleRate, AudioChannel.Stereo, AudioSampleType.S24LePacked + 1));
         }
 
         [Test]
old mode 100755 (executable)
new mode 100644 (file)
index 5ef3e06..259cd67
@@ -17,7 +17,7 @@ namespace Tizen.Multimedia.Tests
         public void OneTimeSetup()
         {
             Information.TryGetValue<bool>("tizen.org/feature/microphone", out _isMicrophoneAvail);
-            Tizen.Log.Info(LogTag, "Microphone available : " + _isMicrophoneAvail);
+            Log.Info(LogTag, "Microphone available : " + _isMicrophoneAvail);
         }
 
         [SetUp]
@@ -65,6 +65,36 @@ namespace Tizen.Multimedia.Tests
 
         [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")]
         [Property("SPEC", "Tizen.Multimedia.AudioCapture.AudioCapture C")]
         [Property("SPEC_URL", "-")]
@@ -94,11 +124,41 @@ namespace Tizen.Multimedia.Tests
         }
 
         [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<ArgumentException>(() =>
-                new AudioCapture(AudioCaptureBase.MaxSampleRate, AudioChannel.Stereo, AudioSampleType.S16Le + 1));
+                new AudioCapture(AudioCaptureBase.MaxSampleRate, AudioChannel.Stereo, AudioSampleType.S24LePacked + 1));
         }
 
         [Test]
old mode 100755 (executable)
new mode 100644 (file)
index 3883f1a..bfcdde2
@@ -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]
old mode 100755 (executable)
new mode 100644 (file)
index fd8e83b..615e722
@@ -109,6 +109,30 @@ namespace Tizen.Multimedia.Tests
 
         [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")]
         [Property("SPEC", "Tizen.Multimedia.AudioPlayback.AudioPlayback C")]
         [Property("SPEC_URL", "-")]
@@ -132,11 +156,35 @@ namespace Tizen.Multimedia.Tests
         }
 
         [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<ArgumentException>(() =>
-                new AudioPlayback(AudioPlayback.MaxSampleRate, AudioChannel.Stereo, AudioSampleType.S16Le + 1));
+                new AudioPlayback(AudioPlayback.MaxSampleRate, AudioChannel.Stereo, AudioSampleType.S24LePacked + 1));
         }
 
         [Test]