Index: webrtc/base/basictypes_unittest.cc |
diff --git a/webrtc/base/basictypes_unittest.cc b/webrtc/base/basictypes_unittest.cc |
index 4e243fdcae3584d87bd19f029ee806ae74c77387..dfb6838b5633d4664a6b479472de3313478daf35 100644 |
--- a/webrtc/base/basictypes_unittest.cc |
+++ b/webrtc/base/basictypes_unittest.cc |
@@ -14,18 +14,18 @@ |
namespace rtc { |
-static_assert(sizeof(int8) == 1, "Unexpected size"); |
-static_assert(sizeof(uint8) == 1, "Unexpected size"); |
-static_assert(sizeof(int16) == 2, "Unexpected size"); |
-static_assert(sizeof(uint16) == 2, "Unexpected size"); |
-static_assert(sizeof(int32) == 4, "Unexpected size"); |
-static_assert(sizeof(uint32) == 4, "Unexpected size"); |
-static_assert(sizeof(int64) == 8, "Unexpected size"); |
-static_assert(sizeof(uint64) == 8, "Unexpected size"); |
+static_assert(sizeof(int8_t) == 1, "Unexpected size"); |
Henrik Grunell WebRTC
2015/09/22 10:35:54
Remove these asserts. Size of _t types are guarant
pbos-webrtc
2015/09/22 12:17:42
Done.
|
+static_assert(sizeof(uint8_t) == 1, "Unexpected size"); |
+static_assert(sizeof(int16_t) == 2, "Unexpected size"); |
+static_assert(sizeof(uint16_t) == 2, "Unexpected size"); |
+static_assert(sizeof(int32_t) == 4, "Unexpected size"); |
+static_assert(sizeof(uint32_t) == 4, "Unexpected size"); |
+static_assert(sizeof(int64_t) == 8, "Unexpected size"); |
+static_assert(sizeof(uint64_t) == 8, "Unexpected size"); |
TEST(BasicTypesTest, Endian) { |
- uint16 v16 = 0x1234u; |
- uint8 first_byte = *reinterpret_cast<uint8*>(&v16); |
+ uint16_t v16 = 0x1234u; |
+ uint8_t first_byte = *reinterpret_cast<uint8_t*>(&v16); |
#if defined(RTC_ARCH_CPU_LITTLE_ENDIAN) |
EXPECT_EQ(0x34u, first_byte); |
#elif defined(RTC_ARCH_CPU_BIG_ENDIAN) |
@@ -34,14 +34,14 @@ TEST(BasicTypesTest, Endian) { |
} |
TEST(BasicTypesTest, SizeOfTypes) { |
Henrik Grunell WebRTC
2015/09/22 10:35:54
Same here. Remove test.
pbos-webrtc
2015/09/22 12:17:42
Done.
|
- int8 i8 = -1; |
- uint8 u8 = 1u; |
- int16 i16 = -1; |
- uint16 u16 = 1u; |
- int32 i32 = -1; |
- uint32 u32 = 1u; |
- int64 i64 = -1; |
- uint64 u64 = 1u; |
+ int8_t i8 = -1; |
+ uint8_t u8 = 1u; |
+ int16_t i16 = -1; |
+ uint16_t u16 = 1u; |
+ int32_t i32 = -1; |
+ uint32_t u32 = 1u; |
+ int64_t i64 = -1; |
+ uint64_t u64 = 1u; |
EXPECT_EQ(1u, sizeof(i8)); |
EXPECT_EQ(1u, sizeof(u8)); |
EXPECT_EQ(2u, sizeof(i16)); |