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

Unified Diff: remoting/client/audio_player_unittest.cc

Issue 1542203002: Switch to standard integer types in remoting/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@int-remoting-host
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/client/audio_player.cc ('k') | remoting/client/chromoting_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/audio_player_unittest.cc
diff --git a/remoting/client/audio_player_unittest.cc b/remoting/client/audio_player_unittest.cc
index 8084ee515cd29bd00ba60bc0a47b48df7b279412..0e5381ed2817c1e0958517f558e21002971e36de 100644
--- a/remoting/client/audio_player_unittest.cc
+++ b/remoting/client/audio_player_unittest.cc
@@ -4,6 +4,8 @@
#include "remoting/client/audio_player.h"
+#include <stdint.h>
+
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -17,8 +19,8 @@ const int kPaddingBytes = 16;
// TODO(garykac): Generate random audio data in the tests rather than having
// a single constant value.
-const uint8 kDefaultBufferData = 0x5A;
-const uint8 kDummyAudioData = 0x8B;
+const uint8_t kDefaultBufferData = 0x5A;
+const uint8_t kDummyAudioData = 0x8B;
} // namespace
@@ -31,7 +33,7 @@ class FakeAudioPlayer : public AudioPlayer {
bool ResetAudioPlayer(AudioPacket::SamplingRate) override { return true; }
- uint32 GetSamplesPerFrame() override { return kAudioSamplesPerFrame; }
+ uint32_t GetSamplesPerFrame() override { return kAudioSamplesPerFrame; }
};
class AudioPlayerTest : public ::testing::Test {
@@ -44,7 +46,7 @@ class AudioPlayerTest : public ::testing::Test {
void TearDown() override {}
void ConsumeAudioFrame() {
- uint8* buffer = reinterpret_cast<uint8*>(buffer_.get());
+ uint8_t* buffer = reinterpret_cast<uint8_t*>(buffer_.get());
memset(buffer, kDefaultBufferData, kAudioFrameBytes + kPaddingBytes);
AudioPlayer::AudioPlayerCallback(reinterpret_cast<void*>(buffer_.get()),
kAudioFrameBytes,
@@ -57,7 +59,7 @@ class AudioPlayerTest : public ::testing::Test {
// Check that the first |num_bytes| bytes are filled with audio data and
// the rest of the buffer is zero-filled.
void CheckAudioFrameBytes(int num_bytes) {
- uint8* buffer = reinterpret_cast<uint8*>(buffer_.get());
+ uint8_t* buffer = reinterpret_cast<uint8_t*>(buffer_.get());
int i = 0;
for (; i < num_bytes; i++) {
ASSERT_EQ(kDummyAudioData, *(buffer + i));
« no previous file with comments | « remoting/client/audio_player.cc ('k') | remoting/client/chromoting_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698