OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 1829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1840 EXPECT_NE(0, feof(out_file)); | 1840 EXPECT_NE(0, feof(out_file)); |
1841 EXPECT_NE(0, feof(limited_file)); | 1841 EXPECT_NE(0, feof(limited_file)); |
1842 ASSERT_EQ(0, fclose(ref_file)); | 1842 ASSERT_EQ(0, fclose(ref_file)); |
1843 ASSERT_EQ(0, fclose(out_file)); | 1843 ASSERT_EQ(0, fclose(out_file)); |
1844 ASSERT_EQ(0, fclose(limited_file)); | 1844 ASSERT_EQ(0, fclose(limited_file)); |
1845 remove(ref_filename.c_str()); | 1845 remove(ref_filename.c_str()); |
1846 remove(out_filename.c_str()); | 1846 remove(out_filename.c_str()); |
1847 remove(limited_filename.c_str()); | 1847 remove(limited_filename.c_str()); |
1848 } | 1848 } |
1849 | 1849 |
1850 // Disabled for UBSan: https://bugs.chromium.org/p/webrtc/issues/detail?id=5820 | 1850 TEST_F(ApmTest, VerifyDebugDumpInt) { |
1851 #ifdef UNDEFINED_SANITIZER | |
1852 #define MAYBE_VerifyDebugDumpInt DISABLED_VerifyDebugDumpInt | |
1853 #else | |
1854 #define MAYBE_VerifyDebugDumpInt VerifyDebugDumpInt | |
1855 #endif | |
1856 TEST_F(ApmTest, MAYBE_VerifyDebugDumpInt) { | |
1857 VerifyDebugDumpTest(kIntFormat); | 1851 VerifyDebugDumpTest(kIntFormat); |
1858 } | 1852 } |
1859 | 1853 |
1860 // Disabled for UBSan: https://bugs.chromium.org/p/webrtc/issues/detail?id=5820 | 1854 TEST_F(ApmTest, VerifyDebugDumpFloat) { |
1861 #ifdef UNDEFINED_SANITIZER | |
1862 #define MAYBE_VerifyDebugDumpFloat DISABLED_VerifyDebugDumpFloat | |
1863 #else | |
1864 #define MAYBE_VerifyDebugDumpFloat VerifyDebugDumpFloat | |
1865 #endif | |
1866 TEST_F(ApmTest, MAYBE_VerifyDebugDumpFloat) { | |
1867 VerifyDebugDumpTest(kFloatFormat); | 1855 VerifyDebugDumpTest(kFloatFormat); |
1868 } | 1856 } |
1869 #endif | 1857 #endif |
1870 | 1858 |
1871 // TODO(andrew): expand test to verify output. | 1859 // TODO(andrew): expand test to verify output. |
1872 // Disabled for UBSan: https://bugs.chromium.org/p/webrtc/issues/detail?id=5820 | 1860 TEST_F(ApmTest, DebugDump) { |
1873 #ifdef UNDEFINED_SANITIZER | |
1874 #define MAYBE_DebugDump DISABLED_DebugDump | |
1875 #else | |
1876 #define MAYBE_DebugDump DebugDump | |
1877 #endif | |
1878 TEST_F(ApmTest, MAYBE_DebugDump) { | |
1879 const std::string filename = | 1861 const std::string filename = |
1880 test::TempFilename(test::OutputPath(), "debug_aec"); | 1862 test::TempFilename(test::OutputPath(), "debug_aec"); |
1881 EXPECT_EQ(apm_->kNullPointerError, | 1863 EXPECT_EQ(apm_->kNullPointerError, |
1882 apm_->StartDebugRecording(static_cast<const char*>(NULL), -1)); | 1864 apm_->StartDebugRecording(static_cast<const char*>(NULL), -1)); |
1883 | 1865 |
1884 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP | 1866 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP |
1885 // Stopping without having started should be OK. | 1867 // Stopping without having started should be OK. |
1886 EXPECT_EQ(apm_->kNoError, apm_->StopDebugRecording()); | 1868 EXPECT_EQ(apm_->kNoError, apm_->StopDebugRecording()); |
1887 | 1869 |
1888 EXPECT_EQ(apm_->kNoError, apm_->StartDebugRecording(filename.c_str(), -1)); | 1870 EXPECT_EQ(apm_->kNoError, apm_->StartDebugRecording(filename.c_str(), -1)); |
(...skipping 12 matching lines...) Expand all Loading... |
1901 EXPECT_EQ(apm_->kUnsupportedFunctionError, | 1883 EXPECT_EQ(apm_->kUnsupportedFunctionError, |
1902 apm_->StartDebugRecording(filename.c_str(), -1)); | 1884 apm_->StartDebugRecording(filename.c_str(), -1)); |
1903 EXPECT_EQ(apm_->kUnsupportedFunctionError, apm_->StopDebugRecording()); | 1885 EXPECT_EQ(apm_->kUnsupportedFunctionError, apm_->StopDebugRecording()); |
1904 | 1886 |
1905 // Verify the file has NOT been written. | 1887 // Verify the file has NOT been written. |
1906 ASSERT_TRUE(fopen(filename.c_str(), "r") == NULL); | 1888 ASSERT_TRUE(fopen(filename.c_str(), "r") == NULL); |
1907 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP | 1889 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP |
1908 } | 1890 } |
1909 | 1891 |
1910 // TODO(andrew): expand test to verify output. | 1892 // TODO(andrew): expand test to verify output. |
1911 // Disabled for UBSan: https://bugs.chromium.org/p/webrtc/issues/detail?id=5820 | 1893 TEST_F(ApmTest, DebugDumpFromFileHandle) { |
1912 #ifdef UNDEFINED_SANITIZER | |
1913 #define MAYBE_DebugDumpFromFileHandle DISABLED_DebugDumpFromFileHandle | |
1914 #else | |
1915 #define MAYBE_DebugDumpFromFileHandle DebugDumpFromFileHandle | |
1916 #endif | |
1917 TEST_F(ApmTest, MAYBE_DebugDumpFromFileHandle) { | |
1918 FILE* fid = NULL; | 1894 FILE* fid = NULL; |
1919 EXPECT_EQ(apm_->kNullPointerError, apm_->StartDebugRecording(fid, -1)); | 1895 EXPECT_EQ(apm_->kNullPointerError, apm_->StartDebugRecording(fid, -1)); |
1920 const std::string filename = | 1896 const std::string filename = |
1921 test::TempFilename(test::OutputPath(), "debug_aec"); | 1897 test::TempFilename(test::OutputPath(), "debug_aec"); |
1922 fid = fopen(filename.c_str(), "w"); | 1898 fid = fopen(filename.c_str(), "w"); |
1923 ASSERT_TRUE(fid); | 1899 ASSERT_TRUE(fid); |
1924 | 1900 |
1925 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP | 1901 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP |
1926 // Stopping without having started should be OK. | 1902 // Stopping without having started should be OK. |
1927 EXPECT_EQ(apm_->kNoError, apm_->StopDebugRecording()); | 1903 EXPECT_EQ(apm_->kNoError, apm_->StopDebugRecording()); |
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2776 std::tr1::make_tuple(16000, 32000, 48000, 32000, 25, 35), | 2752 std::tr1::make_tuple(16000, 32000, 48000, 32000, 25, 35), |
2777 std::tr1::make_tuple(16000, 32000, 32000, 32000, 25, 0), | 2753 std::tr1::make_tuple(16000, 32000, 32000, 32000, 25, 0), |
2778 std::tr1::make_tuple(16000, 32000, 16000, 32000, 25, 20), | 2754 std::tr1::make_tuple(16000, 32000, 16000, 32000, 25, 20), |
2779 std::tr1::make_tuple(16000, 16000, 48000, 16000, 35, 20), | 2755 std::tr1::make_tuple(16000, 16000, 48000, 16000, 35, 20), |
2780 std::tr1::make_tuple(16000, 16000, 32000, 16000, 35, 20), | 2756 std::tr1::make_tuple(16000, 16000, 32000, 16000, 35, 20), |
2781 std::tr1::make_tuple(16000, 16000, 16000, 16000, 0, 0))); | 2757 std::tr1::make_tuple(16000, 16000, 16000, 16000, 0, 0))); |
2782 #endif | 2758 #endif |
2783 | 2759 |
2784 } // namespace | 2760 } // namespace |
2785 } // namespace webrtc | 2761 } // namespace webrtc |
OLD | NEW |