QpackStaticTableTest Class — netty Architecture
Architecture documentation for the QpackStaticTableTest class in QpackStaticTableTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 8270dadf_b1e3_06ff_276f_d66f7d7a1bc7["QpackStaticTableTest"] 056ac17d_1e49_a569_9ad6_d396ab265bff["QpackStaticTableTest.java"] 8270dadf_b1e3_06ff_276f_d66f7d7a1bc7 -->|defined in| 056ac17d_1e49_a569_9ad6_d396ab265bff 147fdeef_29ce_3f2a_4f72_56792932c3cb["testFieldNotFound()"] 8270dadf_b1e3_06ff_276f_d66f7d7a1bc7 -->|method| 147fdeef_29ce_3f2a_4f72_56792932c3cb b65aaea5_31aa_8981_930e_73c60233dad5["testFieldNameAndValueMatch()"] 8270dadf_b1e3_06ff_276f_d66f7d7a1bc7 -->|method| b65aaea5_31aa_8981_930e_73c60233dad5 7c8eda71_d4db_ab65_a7d4_65df4a23a79c["testFieldNameRefForEmptyField()"] 8270dadf_b1e3_06ff_276f_d66f7d7a1bc7 -->|method| 7c8eda71_d4db_ab65_a7d4_65df4a23a79c 15d42835_2a5e_0194_ce91_3828a365d262["testFieldNameRefForSingleMatch()"] 8270dadf_b1e3_06ff_276f_d66f7d7a1bc7 -->|method| 15d42835_2a5e_0194_ce91_3828a365d262 91d4232e_417b_42a8_b13e_fc04735c3880["testFieldNameRefForMultipleMatches()"] 8270dadf_b1e3_06ff_276f_d66f7d7a1bc7 -->|method| 91d4232e_417b_42a8_b13e_fc04735c3880
Relationship Graph
Source Code
codec-http3/src/test/java/io/netty/handler/codec/http3/QpackStaticTableTest.java lines 24–68
public class QpackStaticTableTest {
@Test
public void testFieldNotFound() {
assertEquals(QpackStaticTable.NOT_FOUND, QpackStaticTable.findFieldIndex("x-netty-quic", "incubating"));
}
@Test
public void testFieldNameAndValueMatch() {
// first in range
assertEquals(15, QpackStaticTable.findFieldIndex(":method", "CONNECT"));
// last in range
assertEquals(21, QpackStaticTable.findFieldIndex(":method", "PUT"));
// non-consequent range
assertEquals(24, QpackStaticTable.findFieldIndex(":status", "103"));
assertEquals(69, QpackStaticTable.findFieldIndex(":status", "421"));
}
@Test
public void testFieldNameRefForEmptyField() {
int nameIndex1 = QpackStaticTable.findFieldIndex("cookie", "netty.io");
int nameIndex2 = QpackStaticTable.findFieldIndex("cookie", "quic.io");
// should give the same name ref for any values
assertNotEquals(QpackStaticTable.NOT_FOUND, nameIndex1);
assertNotEquals(QpackStaticTable.NOT_FOUND, nameIndex2);
assertEquals(nameIndex1, nameIndex2);
// index should be masked
assertEquals(nameIndex1 & QpackStaticTable.MASK_NAME_REF, QpackStaticTable.MASK_NAME_REF);
assertEquals(5, nameIndex1 ^ QpackStaticTable.MASK_NAME_REF);
}
@Test
public void testFieldNameRefForSingleMatch() {
// note the value differs from static table ("1" rather than "0")
int nameIndex = QpackStaticTable.findFieldIndex("age", "1");
assertEquals(2, nameIndex ^ QpackStaticTable.MASK_NAME_REF);
}
@Test
public void testFieldNameRefForMultipleMatches() {
int nameIndex = QpackStaticTable.findFieldIndex(":method", "ALLTHETHINGS");
assertEquals(15, nameIndex ^ QpackStaticTable.MASK_NAME_REF);
}
}
Source
Frequently Asked Questions
What is the QpackStaticTableTest class?
QpackStaticTableTest is a class in the netty codebase, defined in codec-http3/src/test/java/io/netty/handler/codec/http3/QpackStaticTableTest.java.
Where is QpackStaticTableTest defined?
QpackStaticTableTest is defined in codec-http3/src/test/java/io/netty/handler/codec/http3/QpackStaticTableTest.java at line 24.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free