Reformat the WebRTC code base
Running clang-format with chromium's style guide. The goal is n-fold: * providing consistency and readability (that's what code guidelines are for) * preventing noise with presubmit checks and git cl format * building on the previous point: making it easier to automatically fix format issues * you name it Please consider using git-hyper-blame to ignore this commit. Bug: webrtc:9340 Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87 Reviewed-on: https://webrtc-review.googlesource.com/81185 Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23660}
This commit is contained in:
@ -18,14 +18,12 @@
|
||||
|
||||
namespace rtc {
|
||||
|
||||
const in6_addr kTestV6Addr = { { {0x20, 0x01, 0x0d, 0xb8,
|
||||
0x10, 0x20, 0x30, 0x40,
|
||||
0x50, 0x60, 0x70, 0x80,
|
||||
0x90, 0xA0, 0xB0, 0xC0} } };
|
||||
const in6_addr kMappedV4Addr = { { {0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF,
|
||||
0x01, 0x02, 0x03, 0x04} } };
|
||||
const in6_addr kTestV6Addr = {
|
||||
{{0x20, 0x01, 0x0d, 0xb8, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80,
|
||||
0x90, 0xA0, 0xB0, 0xC0}}};
|
||||
const in6_addr kMappedV4Addr = {
|
||||
{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
|
||||
0x01, 0x02, 0x03, 0x04}}};
|
||||
const std::string kTestV6AddrString = "2001:db8:1020:3040:5060:7080:90a0:b0c0";
|
||||
const std::string kTestV6AddrAnonymizedString = "2001:db8:1020:x:x:x:x:x";
|
||||
const std::string kTestV6AddrFullString =
|
||||
@ -240,16 +238,14 @@ TEST(SocketAddressTest, TestToFromSockAddrStorage) {
|
||||
EXPECT_FALSE(SocketAddressFromSockAddrStorage(addr_storage, nullptr));
|
||||
}
|
||||
|
||||
bool AreEqual(const SocketAddress& addr1,
|
||||
const SocketAddress& addr2) {
|
||||
return addr1 == addr2 && addr2 == addr1 &&
|
||||
!(addr1 != addr2) && !(addr2 != addr1);
|
||||
bool AreEqual(const SocketAddress& addr1, const SocketAddress& addr2) {
|
||||
return addr1 == addr2 && addr2 == addr1 && !(addr1 != addr2) &&
|
||||
!(addr2 != addr1);
|
||||
}
|
||||
|
||||
bool AreUnequal(const SocketAddress& addr1,
|
||||
const SocketAddress& addr2) {
|
||||
return !(addr1 == addr2) && !(addr2 == addr1) &&
|
||||
addr1 != addr2 && addr2 != addr1;
|
||||
bool AreUnequal(const SocketAddress& addr1, const SocketAddress& addr2) {
|
||||
return !(addr1 == addr2) && !(addr2 == addr1) && addr1 != addr2 &&
|
||||
addr2 != addr1;
|
||||
}
|
||||
|
||||
TEST(SocketAddressTest, TestEqualityOperators) {
|
||||
@ -286,9 +282,7 @@ TEST(SocketAddressTest, TestEqualityOperators) {
|
||||
}
|
||||
|
||||
bool IsLessThan(const SocketAddress& addr1, const SocketAddress& addr2) {
|
||||
return addr1 < addr2 &&
|
||||
!(addr2 < addr1) &&
|
||||
!(addr1 == addr2);
|
||||
return addr1 < addr2 && !(addr2 < addr1) && !(addr1 == addr2);
|
||||
}
|
||||
|
||||
TEST(SocketAddressTest, TestComparisonOperator) {
|
||||
|
||||
Reference in New Issue
Block a user