Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(899)

Side by Side Diff: webrtc/common_audio/signal_processing/signal_processing_unittest.cc

Issue 3009123002: Move UBSan warnings from a blacklist to the source (Closed)
Patch Set: Address review comments Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 23 matching lines...) Expand all
34 int a = -3; 34 int a = -3;
35 int b = WEBRTC_SPL_WORD32_MAX; 35 int b = WEBRTC_SPL_WORD32_MAX;
36 36
37 EXPECT_EQ(10, WEBRTC_SPL_MIN(A, B)); 37 EXPECT_EQ(10, WEBRTC_SPL_MIN(A, B));
38 EXPECT_EQ(21, WEBRTC_SPL_MAX(A, B)); 38 EXPECT_EQ(21, WEBRTC_SPL_MAX(A, B));
39 39
40 EXPECT_EQ(3, WEBRTC_SPL_ABS_W16(a)); 40 EXPECT_EQ(3, WEBRTC_SPL_ABS_W16(a));
41 EXPECT_EQ(3, WEBRTC_SPL_ABS_W32(a)); 41 EXPECT_EQ(3, WEBRTC_SPL_ABS_W32(a));
42 42
43 EXPECT_EQ(-63, WEBRTC_SPL_MUL(a, B)); 43 EXPECT_EQ(-63, WEBRTC_SPL_MUL(a, B));
44 EXPECT_EQ(-2147483645, WEBRTC_SPL_MUL(a, b));
45 EXPECT_EQ(2147483651u, WEBRTC_SPL_UMUL(a, b)); 44 EXPECT_EQ(2147483651u, WEBRTC_SPL_UMUL(a, b));
46 b = WEBRTC_SPL_WORD16_MAX >> 1; 45 b = WEBRTC_SPL_WORD16_MAX >> 1;
47 EXPECT_EQ(4294918147u, WEBRTC_SPL_UMUL_32_16(a, b)); 46 EXPECT_EQ(4294918147u, WEBRTC_SPL_UMUL_32_16(a, b));
48 EXPECT_EQ(-49149, WEBRTC_SPL_MUL_16_U16(a, b)); 47 EXPECT_EQ(-49149, WEBRTC_SPL_MUL_16_U16(a, b));
49 48
50 a = b; 49 a = b;
51 b = -3; 50 b = -3;
52 51
53 EXPECT_EQ(-1, WEBRTC_SPL_MUL_16_32_RSFT16(a, b)); 52 EXPECT_EQ(-1, WEBRTC_SPL_MUL_16_32_RSFT16(a, b));
54 EXPECT_EQ(-1, WEBRTC_SPL_MUL_16_32_RSFT15(a, b)); 53 EXPECT_EQ(-1, WEBRTC_SPL_MUL_16_32_RSFT15(a, b));
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 // 12-15 are skipped to account for the filter lag. 599 // 12-15 are skipped to account for the filter lag.
601 for (size_t i = 0; i < 12; ++i) { 600 for (size_t i = 0; i < 12; ++i) {
602 EXPECT_EQ(kRefValue32kHz1, out_vector[i]); 601 EXPECT_EQ(kRefValue32kHz1, out_vector[i]);
603 EXPECT_EQ(kRefValue16kHz1, out_vector_w16[i]); 602 EXPECT_EQ(kRefValue16kHz1, out_vector_w16[i]);
604 } 603 }
605 for (size_t i = 16; i < 2 * kBlockSize; ++i) { 604 for (size_t i = 16; i < 2 * kBlockSize; ++i) {
606 EXPECT_EQ(kRefValue32kHz2, out_vector[i]); 605 EXPECT_EQ(kRefValue32kHz2, out_vector[i]);
607 EXPECT_EQ(kRefValue16kHz2, out_vector_w16[i]); 606 EXPECT_EQ(kRefValue16kHz2, out_vector_w16[i]);
608 } 607 }
609 } 608 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698