Lines Matching refs:router
53 Router router; in test_shrpx_router_match() local
56 router.add_route(p.pattern, p.idx); in test_shrpx_router_match()
61 idx = router.match(StringRef::from_lit("nghttp2.org"), in test_shrpx_router_match()
66 idx = router.match(StringRef::from_lit("nghttp2.org"), in test_shrpx_router_match()
71 idx = router.match(StringRef::from_lit("nghttp2.org"), in test_shrpx_router_match()
76 idx = router.match(StringRef::from_lit("nghttp2.org"), in test_shrpx_router_match()
81 idx = router.match(StringRef::from_lit("nghttp2.org"), in test_shrpx_router_match()
87 idx = router.match(StringRef::from_lit("nghttp2.org"), in test_shrpx_router_match()
92 idx = router.match(StringRef::from_lit("www2.nghttp2.org"), in test_shrpx_router_match()
97 idx = router.match(StringRef{}, StringRef::from_lit("/alpha")); in test_shrpx_router_match()
112 Router router; in test_shrpx_router_match_wildcard() local
115 router.add_route(p.pattern, p.idx, p.wildcard); in test_shrpx_router_match_wildcard()
118 CU_ASSERT(0 == router.match(StringRef::from_lit("nghttp2.org"), in test_shrpx_router_match_wildcard()
121 CU_ASSERT(1 == router.match(StringRef::from_lit("nghttp2.org"), in test_shrpx_router_match_wildcard()
124 CU_ASSERT(1 == router.match(StringRef::from_lit("nghttp2.org"), in test_shrpx_router_match_wildcard()
127 CU_ASSERT(2 == router.match(StringRef::from_lit("nghttp2.org"), in test_shrpx_router_match_wildcard()
130 CU_ASSERT(2 == router.match(StringRef::from_lit("nghttp2.org"), in test_shrpx_router_match_wildcard()
133 CU_ASSERT(3 == router.match(StringRef::from_lit("nghttp2.org"), in test_shrpx_router_match_wildcard()
136 CU_ASSERT(4 == router.match(StringRef::from_lit("nghttp2.org"), in test_shrpx_router_match_wildcard()
139 CU_ASSERT(5 == router.match(StringRef::from_lit("nghttp2.org"), in test_shrpx_router_match_wildcard()
142 CU_ASSERT(5 == router.match(StringRef::from_lit("nghttp2.org"), in test_shrpx_router_match_wildcard()
154 Router router; in test_shrpx_router_match_prefix() local
157 router.add_route(p.pattern, p.idx); in test_shrpx_router_match_prefix()
166 idx = router.match_prefix(&nread, &node, in test_shrpx_router_match_prefix()
172 idx = router.match_prefix(&nread, &node, in test_shrpx_router_match_prefix()
178 idx = router.match_prefix(&nread, &node, StringRef::from_lit("ahpla.ovarb")); in test_shrpx_router_match_prefix()