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

Unified Diff: remoting/host/audio_silence_detector_unittest.cc

Issue 1547473005: Switch to standard integer types in remoting/host/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/audio_silence_detector.cc ('k') | remoting/host/backoff_timer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/audio_silence_detector_unittest.cc
diff --git a/remoting/host/audio_silence_detector_unittest.cc b/remoting/host/audio_silence_detector_unittest.cc
index 93a8309f0583d747d14d27efd9f2685dd700d1d7..f1173f1fd2b624446948cc3b9f6d539f11c563ea 100644
--- a/remoting/host/audio_silence_detector_unittest.cc
+++ b/remoting/host/audio_silence_detector_unittest.cc
@@ -4,7 +4,9 @@
#include "remoting/host/audio_silence_detector.h"
-#include "base/basictypes.h"
+#include <stdint.h>
+
+#include "base/macros.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace remoting {
@@ -14,7 +16,8 @@ namespace {
const int kSamplingRate = 1000;
void TestSilenceDetector(AudioSilenceDetector* target,
- const int16* samples, int samples_count,
+ const int16_t* samples,
+ int samples_count,
bool silence_expected) {
target->Reset(kSamplingRate, 1);
bool silence_started = false;
@@ -42,21 +45,21 @@ void TestSilenceDetector(AudioSilenceDetector* target,
} // namespace
TEST(AudioSilenceDetectorTest, Silence) {
- const int16 kSamples[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+ const int16_t kSamples[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
AudioSilenceDetector target(0);
TestSilenceDetector(&target, kSamples, arraysize(kSamples), true);
}
TEST(AudioSilenceDetectorTest, Sound) {
- const int16 kSamples[] = {65, 73, 83, 89, 92, -1, 5, 9, 123, 0};
+ const int16_t kSamples[] = {65, 73, 83, 89, 92, -1, 5, 9, 123, 0};
AudioSilenceDetector target(0);
TestSilenceDetector(&target, kSamples, arraysize(kSamples), false);
}
TEST(AudioSilenceDetectorTest, Threshold) {
- const int16 kSamples[] = {0, 0, 0, 0, 1, 0, 0, -1, 0, 0};
+ const int16_t kSamples[] = {0, 0, 0, 0, 1, 0, 0, -1, 0, 0};
AudioSilenceDetector target1(0);
TestSilenceDetector(&target1, kSamples, arraysize(kSamples), false);
« no previous file with comments | « remoting/host/audio_silence_detector.cc ('k') | remoting/host/backoff_timer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698