Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix dlist tests #7323

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions src/test/dlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,21 +106,6 @@ void test_insert_before() {
std::cout << "test_insert_before passed." << std::endl;
}

// Test the remove_from() method
void test_remove_from() {
TestNode* list = nullptr;
TestNode node1(1);
TestNode node2(2);
TestNode::push_to_front(list, &node1);
TestNode::push_to_front(list, &node2);
TestNode::remove_from(list, &node1);
assert(list == &node2);
assert(node2.next() == &node2);
assert(node2.prev() == &node2);
assert(node1.next() == &node1);
assert(node1.prev() == &node1);
std::cout << "test_remove_from passed." << std::endl;
}

// Test the push_to_front() method
void test_push_to_front() {
Expand Down Expand Up @@ -177,12 +162,9 @@ void tst_dlist() {
test_pop();
test_insert_after();
test_insert_before();
#if 0
test_remove_from();
test_push_to_front();
test_detach();
test_invariant();
test_contains();
#endif
std::cout << "All tests passed." << std::endl;
}
Loading