src/net/dns/esni_content_unittest.cc
// Make sure we can add key-address pairs.
Make sure we can add key-address pairs.
Make sure we can add key - address pairs .
TEST(EsniContentTest, AddKeyForAddress) {
  EsniContent c1;
  auto address = MakeIPAddress();
  c1.AddKeyForAddress(address, "a");
  EXPECT_THAT(c1.keys(), ::testing::UnorderedElementsAre("a"));
  EXPECT_THAT(c1.keys_for_addresses(),
              ::testing::UnorderedElementsAre(::testing::Pair(
                  address, ::testing::UnorderedElementsAre("a"))));
}
TEST ( EsniContentTest , AddKeyForAddress ) { EsniContent c1 ; auto address = MakeIPAddress ( ) ; c1 . AddKeyForAddress ( address , " " ) ; EXPECT_THAT ( c1 . keys ( ) , :: testing :: UnorderedElementsAre ( " " ) ) ; EXPECT_THAT ( c1 . keys_for_addresses ( ) , :: testing :: UnorderedElementsAre ( :: testing :: Pair ( address , :: testing :: UnorderedElementsAre ( " " ) ) ) ) ; }
Make sure we can add key-address pairs.
Make sure we can add key - address pairs .