Skip to content

Commit fe59461

Browse files
authored
fix dlist tests (#7323)
1 parent 6ba25b8 commit fe59461

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/test/dlist.cpp

-18
Original file line numberDiff line numberDiff line change
@@ -106,21 +106,6 @@ void test_insert_before() {
106106
std::cout << "test_insert_before passed." << std::endl;
107107
}
108108

109-
// Test the remove_from() method
110-
void test_remove_from() {
111-
TestNode* list = nullptr;
112-
TestNode node1(1);
113-
TestNode node2(2);
114-
TestNode::push_to_front(list, &node1);
115-
TestNode::push_to_front(list, &node2);
116-
TestNode::remove_from(list, &node1);
117-
assert(list == &node2);
118-
assert(node2.next() == &node2);
119-
assert(node2.prev() == &node2);
120-
assert(node1.next() == &node1);
121-
assert(node1.prev() == &node1);
122-
std::cout << "test_remove_from passed." << std::endl;
123-
}
124109

125110
// Test the push_to_front() method
126111
void test_push_to_front() {
@@ -177,12 +162,9 @@ void tst_dlist() {
177162
test_pop();
178163
test_insert_after();
179164
test_insert_before();
180-
#if 0
181-
test_remove_from();
182165
test_push_to_front();
183166
test_detach();
184167
test_invariant();
185168
test_contains();
186-
#endif
187169
std::cout << "All tests passed." << std::endl;
188170
}

0 commit comments

Comments
 (0)