Lines Matching refs:idx
35 size_t idx;
56 router.add_route(p.pattern, p.idx);
59 ssize_t idx;
61 idx = router.match(StringRef::from_lit("nghttp2.org"),
64 CU_ASSERT(0 == idx);
66 idx = router.match(StringRef::from_lit("nghttp2.org"),
69 CU_ASSERT(1 == idx);
71 idx = router.match(StringRef::from_lit("nghttp2.org"),
74 CU_ASSERT(2 == idx);
76 idx = router.match(StringRef::from_lit("nghttp2.org"),
79 CU_ASSERT(2 == idx);
81 idx = router.match(StringRef::from_lit("nghttp2.org"),
84 CU_ASSERT(3 == idx);
87 idx = router.match(StringRef::from_lit("nghttp2.org"),
90 CU_ASSERT(3 == idx);
92 idx = router.match(StringRef::from_lit("www2.nghttp2.org"),
95 CU_ASSERT(8 == idx);
97 idx = router.match(StringRef{}, StringRef::from_lit("/alpha"));
99 CU_ASSERT(5 == idx);
115 router.add_route(p.pattern, p.idx, p.wildcard);
157 router.add_route(p.pattern, p.idx);
160 ssize_t idx;
166 idx = router.match_prefix(&nread, &node,
169 CU_ASSERT(0 == idx);
172 idx = router.match_prefix(&nread, &node,
175 CU_ASSERT(2 == idx);
178 idx = router.match_prefix(&nread, &node, StringRef::from_lit("ahpla.ovarb"));
180 CU_ASSERT(3 == idx);