src/net/third_party/quiche/src/spdy/core/hpack/hpack_static_table_test.cc
// Check that an initialized instance has the right number of entries.
Check that an initialized instance has the right number of entries.
Check that an initialized instance has the right number of entries .
TEST_F(HpackStaticTableTest, Initialize) {
  EXPECT_FALSE(table_.IsInitialized());
  table_.Initialize(HpackStaticTableVector().data(),
                    HpackStaticTableVector().size());
  EXPECT_TRUE(table_.IsInitialized());
  HpackHeaderTable::EntryTable static_entries = table_.GetStaticEntries();
  EXPECT_EQ(HpackStaticTableVector().size(), static_entries.size());
  HpackHeaderTable::UnorderedEntrySet static_index = table_.GetStaticIndex();
  EXPECT_EQ(HpackStaticTableVector().size(), static_index.size());
  HpackHeaderTable::NameToEntryMap static_name_index =
      table_.GetStaticNameIndex();
  std::set<quiche::QuicheStringPiece> names;
  for (auto* entry : static_index) {
    names.insert(entry->name());
  }
  EXPECT_EQ(names.size(), static_name_index.size());
}
TEST_F ( HpackStaticTableTest , Initialize ) { EXPECT_FALSE ( table_ . IsInitialized ( ) ) ; table_ . Initialize ( HpackStaticTableVector ( ) . data ( ) , HpackStaticTableVector ( ) . size ( ) ) ; EXPECT_TRUE ( table_ . IsInitialized ( ) ) ; HpackHeaderTable :: EntryTable static_entries = table_ . GetStaticEntries ( ) ; EXPECT_EQ ( HpackStaticTableVector ( ) . size ( ) , static_entries . size ( ) ) ; HpackHeaderTable :: UnorderedEntrySet static_index = table_ . GetStaticIndex ( ) ; EXPECT_EQ ( HpackStaticTableVector ( ) . size ( ) , static_index . size ( ) ) ; HpackHeaderTable :: NameToEntryMap static_name_index = table_ . GetStaticNameIndex ( ) ; std :: set < quiche :: QuicheStringPiece > names ; for ( auto * entry : static_index ) { names . insert ( entry -> name ( ) ) ; } EXPECT_EQ ( names . size ( ) , static_name_index . size ( ) ) ; }
Check that an initialized instance has the right number of entries.
Check that an initialized instance has the right number of entries .