refactor: clarify C++ declarations across 13 Sonar rules (#5934)

This commit is contained in:
Dave Lane authored and GitHub committed 2026-10-14 23:22:57 -04:00
1 parent 2e4d4f5ac0
commit a36b9f8a9c
44 files changed
+342 -162

No files matched your search

+11
View File
@@ -21,6 +21,17 @@ TEST(NetworkClassificationTest, DeducedNetworkListsPreserveAddressScopes) {
EXPECT_EQ(net::from_address("2001:4860:4860::8888"), net::WAN);
}
/**
* @brief Loopback and documentation addresses retain their classification when mapped to IPv6.
*/
TEST(NetworkClassificationTest, ClassifiesMappedIpv4AddressesWithoutChangingSubsequentLookups) {
for (const auto *address : {"127.0.0.1", "192.0.2.1", "198.51.100.2", "203.0.113.3"}) {
const auto expected = net::from_address(address);
EXPECT_EQ(net::from_address(std::string {"::ffff:"} + address), expected);
EXPECT_EQ(net::from_address(address), expected);
}
}
struct MdnsInstanceNameTest: BaseTest, testing::WithParamInterface<std::tuple<std::string, std::string>> {};
TEST_P(MdnsInstanceNameTest, Run) {