Index: webrtc/base/win32regkey_unittest.cc |
diff --git a/webrtc/base/win32regkey_unittest.cc b/webrtc/base/win32regkey_unittest.cc |
index d26305147f4bac57bbc45f438de3ed996269b14c..389c3a243c5b7778a837c58893bf48db178a834e 100644 |
--- a/webrtc/base/win32regkey_unittest.cc |
+++ b/webrtc/base/win32regkey_unittest.cc |
@@ -150,18 +150,18 @@ void RegKeyHelperFunctionsTest() { |
std::vector<std::wstring> result; |
EXPECT_SUCCEEDED(RegKey::MultiSZBytesToStringArray( |
- reinterpret_cast<const uint8*>(kMultiSZ), sizeof(kMultiSZ), &result)); |
+ reinterpret_cast<const uint8_t*>(kMultiSZ), sizeof(kMultiSZ), &result)); |
EXPECT_EQ(result.size(), 3); |
EXPECT_STREQ(result[0].c_str(), L"abc"); |
EXPECT_STREQ(result[1].c_str(), L"def"); |
EXPECT_STREQ(result[2].c_str(), L"P12345"); |
EXPECT_SUCCEEDED(RegKey::MultiSZBytesToStringArray( |
- reinterpret_cast<const uint8*>(kEmptyMultiSZ), |
- sizeof(kEmptyMultiSZ), &result)); |
+ reinterpret_cast<const uint8_t*>(kEmptyMultiSZ), sizeof(kEmptyMultiSZ), |
+ &result)); |
EXPECT_EQ(result.size(), 0); |
EXPECT_FALSE(SUCCEEDED(RegKey::MultiSZBytesToStringArray( |
- reinterpret_cast<const uint8*>(kInvalidMultiSZ), |
+ reinterpret_cast<const uint8_t*>(kInvalidMultiSZ), |
sizeof(kInvalidMultiSZ), &result))); |
} |
@@ -173,7 +173,7 @@ void RegKeyNonStaticFunctionsTest() { |
DWORD int_val = 0; |
DWORD64 int64_val = 0; |
wchar_t* str_val = NULL; |
- uint8* binary_val = NULL; |
+ uint8_t* binary_val = NULL; |
DWORD uint8_count = 0; |
// Just in case... |
@@ -265,7 +265,8 @@ void RegKeyNonStaticFunctionsTest() { |
// set a binary value |
EXPECT_SUCCEEDED(r_key.SetValue(kValNameBinary, |
- reinterpret_cast<const uint8*>(kBinaryVal), sizeof(kBinaryVal) - 1)); |
+ reinterpret_cast<const uint8_t*>(kBinaryVal), |
+ sizeof(kBinaryVal) - 1)); |
// check that the value exists |
EXPECT_TRUE(r_key.HasValue(kValNameBinary)); |
@@ -277,7 +278,8 @@ void RegKeyNonStaticFunctionsTest() { |
// set it again |
EXPECT_SUCCEEDED(r_key.SetValue(kValNameBinary, |
- reinterpret_cast<const uint8*>(kBinaryVal2), sizeof(kBinaryVal) - 1)); |
+ reinterpret_cast<const uint8_t*>(kBinaryVal2), |
+ sizeof(kBinaryVal) - 1)); |
// read it again |
EXPECT_SUCCEEDED(r_key.GetValue(kValNameBinary, &binary_val, &uint8_count)); |
@@ -303,10 +305,11 @@ void RegKeyNonStaticFunctionsTest() { |
// set a binary value |
EXPECT_SUCCEEDED(r_key.SetValue(kValNameBinary, |
- reinterpret_cast<const uint8*>(kBinaryVal), sizeof(kBinaryVal) - 1)); |
+ reinterpret_cast<const uint8_t*>(kBinaryVal), |
+ sizeof(kBinaryVal) - 1)); |
// get the value count |
- uint32 value_count = r_key.GetValueCount(); |
+ uint32_t value_count = r_key.GetValueCount(); |
EXPECT_EQ(value_count, 4); |
// check the value names |
@@ -332,7 +335,7 @@ void RegKeyNonStaticFunctionsTest() { |
// check that there are no more values |
EXPECT_FAILED(r_key.GetValueNameAt(4, &value_name, &type)); |
- uint32 subkey_count = r_key.GetSubkeyCount(); |
+ uint32_t subkey_count = r_key.GetSubkeyCount(); |
EXPECT_EQ(subkey_count, 0); |
// now create a subkey and make sure we can get the name |
@@ -366,7 +369,7 @@ void RegKeyStaticFunctionsTest() { |
double double_val = 0; |
wchar_t* str_val = NULL; |
std::wstring wstr_val; |
- uint8* binary_val = NULL; |
+ uint8_t* binary_val = NULL; |
DWORD uint8_count = 0; |
// Just in case... |
@@ -377,7 +380,7 @@ void RegKeyStaticFunctionsTest() { |
EXPECT_EQ(RegKey::GetValue(kFullRkey1, kValNameInt, &int_val), |
HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)); |
- // set int32 |
+ // set int32_t |
EXPECT_SUCCEEDED(RegKey::SetValue(kFullRkey1, kValNameInt, kIntVal)); |
// check that the value exists |
@@ -397,7 +400,7 @@ void RegKeyStaticFunctionsTest() { |
// check that the value is gone |
EXPECT_FALSE(RegKey::HasValue(kFullRkey1, kValNameInt)); |
- // set int64 |
+ // set int64_t |
EXPECT_SUCCEEDED(RegKey::SetValue(kFullRkey1, kValNameInt64, kIntVal64)); |
// check that the value exists |
@@ -473,8 +476,9 @@ void RegKeyStaticFunctionsTest() { |
EXPECT_FALSE(RegKey::HasValue(kFullRkey1, kValNameStr)); |
// set binary |
- EXPECT_SUCCEEDED(RegKey::SetValue(kFullRkey1, kValNameBinary, |
- reinterpret_cast<const uint8*>(kBinaryVal), sizeof(kBinaryVal)-1)); |
+ EXPECT_SUCCEEDED(RegKey::SetValue( |
+ kFullRkey1, kValNameBinary, reinterpret_cast<const uint8_t*>(kBinaryVal), |
+ sizeof(kBinaryVal) - 1)); |
// check that the value exists |
EXPECT_TRUE(RegKey::HasValue(kFullRkey1, kValNameBinary)); |
@@ -492,8 +496,9 @@ void RegKeyStaticFunctionsTest() { |
EXPECT_FALSE(RegKey::HasValue(kFullRkey1, kValNameBinary)); |
// special case - set a binary value with length 0 |
- EXPECT_SUCCEEDED(RegKey::SetValue(kFullRkey1, kValNameBinary, |
- reinterpret_cast<const uint8*>(kBinaryVal), 0)); |
+ EXPECT_SUCCEEDED( |
+ RegKey::SetValue(kFullRkey1, kValNameBinary, |
+ reinterpret_cast<const uint8_t*>(kBinaryVal), 0)); |
// check that the value exists |
EXPECT_TRUE(RegKey::HasValue(kFullRkey1, kValNameBinary)); |
@@ -532,20 +537,24 @@ void RegKeyStaticFunctionsTest() { |
// test read/write REG_MULTI_SZ value |
std::vector<std::wstring> result; |
- EXPECT_SUCCEEDED(RegKey::SetValueMultiSZ(kFullRkey1, kValNameMultiStr, |
- reinterpret_cast<const uint8*>(kMultiSZ), sizeof(kMultiSZ))); |
+ EXPECT_SUCCEEDED(RegKey::SetValueMultiSZ( |
+ kFullRkey1, kValNameMultiStr, reinterpret_cast<const uint8_t*>(kMultiSZ), |
+ sizeof(kMultiSZ))); |
EXPECT_SUCCEEDED(RegKey::GetValue(kFullRkey1, kValNameMultiStr, &result)); |
EXPECT_EQ(result.size(), 3); |
EXPECT_STREQ(result[0].c_str(), L"abc"); |
EXPECT_STREQ(result[1].c_str(), L"def"); |
EXPECT_STREQ(result[2].c_str(), L"P12345"); |
- EXPECT_SUCCEEDED(RegKey::SetValueMultiSZ(kFullRkey1, kValNameMultiStr, |
- reinterpret_cast<const uint8*>(kEmptyMultiSZ), sizeof(kEmptyMultiSZ))); |
+ EXPECT_SUCCEEDED(RegKey::SetValueMultiSZ( |
+ kFullRkey1, kValNameMultiStr, |
+ reinterpret_cast<const uint8_t*>(kEmptyMultiSZ), sizeof(kEmptyMultiSZ))); |
EXPECT_SUCCEEDED(RegKey::GetValue(kFullRkey1, kValNameMultiStr, &result)); |
EXPECT_EQ(result.size(), 0); |
// writing REG_MULTI_SZ value will automatically add ending null characters |
- EXPECT_SUCCEEDED(RegKey::SetValueMultiSZ(kFullRkey1, kValNameMultiStr, |
- reinterpret_cast<const uint8*>(kInvalidMultiSZ), sizeof(kInvalidMultiSZ))); |
+ EXPECT_SUCCEEDED( |
+ RegKey::SetValueMultiSZ(kFullRkey1, kValNameMultiStr, |
+ reinterpret_cast<const uint8_t*>(kInvalidMultiSZ), |
+ sizeof(kInvalidMultiSZ))); |
EXPECT_SUCCEEDED(RegKey::GetValue(kFullRkey1, kValNameMultiStr, &result)); |
EXPECT_EQ(result.size(), 1); |
EXPECT_STREQ(result[0].c_str(), L"678"); |