@@ -35,28 +35,28 @@ void test_prev() {
35
35
}
36
36
37
37
// Test the next() method
38
- void test_next () {
38
+ static void test_next () {
39
39
TestNode node (1 );
40
40
SASSERT (node.next () == &node);
41
41
std::cout << " test_next passed." << std::endl;
42
42
}
43
43
44
44
// Test the const prev() method
45
- void test_const_prev () {
45
+ static void test_const_prev () {
46
46
const TestNode node (1 );
47
47
SASSERT (node.prev () == &node);
48
48
std::cout << " test_const_prev passed." << std::endl;
49
49
}
50
50
51
51
// Test the const next() method
52
- void test_const_next () {
52
+ static void test_const_next () {
53
53
const TestNode node (1 );
54
54
SASSERT (node.next () == &node);
55
55
std::cout << " test_const_next passed." << std::endl;
56
56
}
57
57
58
58
// Test the init() method
59
- void test_init () {
59
+ static void test_init () {
60
60
TestNode node (1 );
61
61
node.init (&node);
62
62
SASSERT (node.next () == &node);
@@ -66,7 +66,7 @@ void test_init() {
66
66
}
67
67
68
68
// Test the pop() method
69
- void test_pop () {
69
+ static void test_pop () {
70
70
TestNode* list = nullptr ;
71
71
TestNode node1 (1 );
72
72
TestNode::push_to_front (list, &node1);
@@ -79,7 +79,7 @@ void test_pop() {
79
79
}
80
80
81
81
// Test the insert_after() method
82
- void test_insert_after () {
82
+ static void test_insert_after () {
83
83
TestNode node1 (1 );
84
84
TestNode node2 (2 );
85
85
node1.insert_after (&node2);
@@ -93,7 +93,7 @@ void test_insert_after() {
93
93
}
94
94
95
95
// Test the insert_before() method
96
- void test_insert_before () {
96
+ static void test_insert_before () {
97
97
TestNode node1 (1 );
98
98
TestNode node2 (2 );
99
99
node1.insert_before (&node2);
@@ -107,7 +107,7 @@ void test_insert_before() {
107
107
}
108
108
109
109
// Test the remove_from() method
110
- void test_remove_from () {
110
+ static void test_remove_from () {
111
111
TestNode* list = nullptr ;
112
112
TestNode node1 (1 );
113
113
TestNode node2 (2 );
@@ -123,7 +123,7 @@ void test_remove_from() {
123
123
}
124
124
125
125
// Test the push_to_front() method
126
- void test_push_to_front () {
126
+ static void test_push_to_front () {
127
127
TestNode* list = nullptr ;
128
128
TestNode node1 (1 );
129
129
TestNode::push_to_front (list, &node1);
@@ -134,7 +134,7 @@ void test_push_to_front() {
134
134
}
135
135
136
136
// Test the detach() method
137
- void test_detach () {
137
+ static void test_detach () {
138
138
TestNode node (1 );
139
139
TestNode::detach (&node);
140
140
SASSERT (node.next () == &node);
@@ -144,7 +144,7 @@ void test_detach() {
144
144
}
145
145
146
146
// Test the invariant() method
147
- void test_invariant () {
147
+ static void test_invariant () {
148
148
TestNode node1 (1 );
149
149
SASSERT (node1.invariant ());
150
150
TestNode node2 (2 );
@@ -155,7 +155,7 @@ void test_invariant() {
155
155
}
156
156
157
157
// Test the contains() method
158
- void test_contains () {
158
+ static void test_contains () {
159
159
TestNode* list = nullptr ;
160
160
TestNode node1 (1 );
161
161
TestNode node2 (2 );
0 commit comments