mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-07 02:28:53 +08:00
Remove nghttp2_pq_increase_key
This commit is contained in:
@@ -68,7 +68,6 @@ int main(int argc _U_, char *argv[] _U_) {
|
||||
if (!CU_add_test(pSuite, "pq", test_nghttp2_pq) ||
|
||||
!CU_add_test(pSuite, "pq_update", test_nghttp2_pq_update) ||
|
||||
!CU_add_test(pSuite, "pq_remove", test_nghttp2_pq_remove) ||
|
||||
!CU_add_test(pSuite, "pq_increase_key", test_nghttp2_pq_increase_key) ||
|
||||
!CU_add_test(pSuite, "map", test_nghttp2_map) ||
|
||||
!CU_add_test(pSuite, "map_functional", test_nghttp2_map_functional) ||
|
||||
!CU_add_test(pSuite, "map_each_free", test_nghttp2_map_each_free) ||
|
||||
|
||||
@@ -224,34 +224,3 @@ void test_nghttp2_pq_remove(void) {
|
||||
|
||||
nghttp2_pq_free(&pq);
|
||||
}
|
||||
|
||||
void test_nghttp2_pq_increase_key(void) {
|
||||
nghttp2_pq pq;
|
||||
node nodes[10];
|
||||
int ans_key1[] = {1, 2, 3, 3, 4, 5};
|
||||
int ans_val1[] = {1, 2, 0, 3, 4, 5};
|
||||
int ans_key2[] = {0, 1, 2, 3, 4, 6};
|
||||
int ans_val2[] = {0, 1, 2, 3, 4, 5};
|
||||
|
||||
nghttp2_pq_init(&pq, node_less, nghttp2_mem_default());
|
||||
|
||||
push_nodes(&pq, nodes, 6);
|
||||
|
||||
nodes[0].key = 3;
|
||||
nghttp2_pq_increase_key(&pq, &nodes[0].ent);
|
||||
|
||||
check_nodes(&pq, 6, ans_key1, ans_val1);
|
||||
|
||||
nghttp2_pq_free(&pq);
|
||||
|
||||
nghttp2_pq_init(&pq, node_less, nghttp2_mem_default());
|
||||
|
||||
push_nodes(&pq, nodes, 6);
|
||||
|
||||
nodes[5].key = 6;
|
||||
nghttp2_pq_increase_key(&pq, &nodes[5].ent);
|
||||
|
||||
check_nodes(&pq, 6, ans_key2, ans_val2);
|
||||
|
||||
nghttp2_pq_free(&pq);
|
||||
}
|
||||
|
||||
@@ -28,6 +28,5 @@
|
||||
void test_nghttp2_pq(void);
|
||||
void test_nghttp2_pq_update(void);
|
||||
void test_nghttp2_pq_remove(void);
|
||||
void test_nghttp2_pq_increase_key(void);
|
||||
|
||||
#endif /* NGHTTP2_PQ_TEST_H */
|
||||
|
||||
Reference in New Issue
Block a user