Lines Matching refs:key
214 ASSERT_STREQ(expected_key, reinterpret_cast<char*>(e->key)); in AssertEntry()
223 e = hsearch(ENTRY{.key = const_cast<char*>("a"), .data = const_cast<char*>("A")}, ENTER); in TEST()
225 e = hsearch(ENTRY{.key = const_cast<char*>("aa"), .data = const_cast<char*>("B")}, ENTER); in TEST()
227 e = hsearch(ENTRY{.key = const_cast<char*>("aaa"), .data = const_cast<char*>("C")}, ENTER); in TEST()
231 e = hsearch(ENTRY{.key = const_cast<char*>("aaaa"), .data = nullptr}, FIND); in TEST()
235 e = hsearch(ENTRY{.key = const_cast<char*>("aa"), .data = nullptr}, FIND); in TEST()
239 e = hsearch(ENTRY{.key = const_cast<char*>("aa"), .data = const_cast<char*>("X")}, ENTER); in TEST()
244 e = hsearch(ENTRY{.key = const_cast<char*>("aa"), .data = nullptr}, FIND); in TEST()
247 e = hsearch(ENTRY{.key = const_cast<char*>("a"), .data = nullptr}, FIND); in TEST()
249 e = hsearch(ENTRY{.key = const_cast<char*>("aaa"), .data = nullptr}, FIND); in TEST()
264 ASSERT_EQ(1, hsearch_r(ENTRY{.key = const_cast<char*>("a"), .data = const_cast<char*>("A")}, in TEST()
267 ASSERT_EQ(1, hsearch_r(ENTRY{.key = const_cast<char*>("a"), .data = const_cast<char*>("B")}, in TEST()
273 ASSERT_EQ(0, hsearch_r(ENTRY{.key = const_cast<char*>("b"), .data = nullptr}, FIND, &e, &h1)); in TEST()
277 ASSERT_EQ(1, hsearch_r(ENTRY{.key = const_cast<char*>("a"), .data = nullptr}, FIND, &e, &h1)); in TEST()
279 ASSERT_EQ(1, hsearch_r(ENTRY{.key = const_cast<char*>("a"), .data = nullptr}, FIND, &e, &h2)); in TEST()
284 ASSERT_EQ(1, hsearch_r(ENTRY{.key = const_cast<char*>("a"), .data = nullptr}, FIND, &e, &h2)); in TEST()