Index: webrtc/modules/audio_processing/test/bitexactness_tools.h |
diff --git a/webrtc/modules/audio_processing/test/bitexactness_tools.h b/webrtc/modules/audio_processing/test/bitexactness_tools.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6a3309244735b7ea454ba32ff5bfd3f9448614b1 |
--- /dev/null |
+++ b/webrtc/modules/audio_processing/test/bitexactness_tools.h |
@@ -0,0 +1,40 @@ |
+/* |
+ * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
+ * |
+ * Use of this source code is governed by a BSD-style license |
+ * that can be found in the LICENSE file in the root of the source |
+ * tree. An additional intellectual property rights grant can be found |
+ * in the file PATENTS. All contributing project authors may |
+ * be found in the AUTHORS file in the root of the source tree. |
+ */ |
+ |
+#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_BITEXACTNESS_TOOLS_H_ |
+#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_BITEXACTNESS_TOOLS_H_ |
+ |
+#include <vector> |
+ |
+#include "webrtc/base/array_view.h" |
+#include "testing/gtest/include/gtest/gtest.h" |
+ |
+namespace webrtc { |
+namespace test { |
+ |
+// Gtest PRED_FORMAT test function that compares two floats |
+// and reports any differences. |
+::testing::AssertionResult AssertFloatsNotEqual(const char* m_expr, |
+ const char* n_expr, |
+ const float& output, |
+ const float& reference); |
+ |
+// Gtest EXPECT_PRED_FORMAT test function that compares two array views |
+// and reports any differences. |
+::testing::AssertionResult AssertVectorsNotEqual( |
+ const char* m_expr, |
+ const char* n_expr, |
+ const rtc::ArrayView<const float>& output, |
+ const rtc::ArrayView<const float>& reference); |
+ |
+} // namespace test |
+} // namespace webrtc |
+ |
+#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_BITEXACTNESS_TOOLS_H_ |