Index: webrtc/base/basictypes_unittest.cc |
diff --git a/webrtc/base/basictypes_unittest.cc b/webrtc/base/basictypes_unittest.cc |
index 4e243fdcae3584d87bd19f029ee806ae74c77387..df5ed5e7e5b4a56aec1e3e336c071f9745329944 100644 |
--- a/webrtc/base/basictypes_unittest.cc |
+++ b/webrtc/base/basictypes_unittest.cc |
@@ -14,18 +14,9 @@ |
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"); |
- |
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) |
@@ -33,33 +24,6 @@ TEST(BasicTypesTest, Endian) { |
#endif |
} |
-TEST(BasicTypesTest, SizeOfTypes) { |
- int8 i8 = -1; |
- uint8 u8 = 1u; |
- int16 i16 = -1; |
- uint16 u16 = 1u; |
- int32 i32 = -1; |
- uint32 u32 = 1u; |
- int64 i64 = -1; |
- uint64 u64 = 1u; |
- EXPECT_EQ(1u, sizeof(i8)); |
- EXPECT_EQ(1u, sizeof(u8)); |
- EXPECT_EQ(2u, sizeof(i16)); |
- EXPECT_EQ(2u, sizeof(u16)); |
- EXPECT_EQ(4u, sizeof(i32)); |
- EXPECT_EQ(4u, sizeof(u32)); |
- EXPECT_EQ(8u, sizeof(i64)); |
- EXPECT_EQ(8u, sizeof(u64)); |
- EXPECT_GT(0, i8); |
- EXPECT_LT(0u, u8); |
- EXPECT_GT(0, i16); |
- EXPECT_LT(0u, u16); |
- EXPECT_GT(0, i32); |
- EXPECT_LT(0u, u32); |
- EXPECT_GT(0, i64); |
- EXPECT_LT(0u, u64); |
-} |
- |
TEST(BasicTypesTest, SizeOfConstants) { |
EXPECT_EQ(8u, sizeof(INT64_C(0))); |
EXPECT_EQ(8u, sizeof(UINT64_C(0))); |