Skip to content

Commit ea9fa17

Browse files
add static
Signed-off-by: Nikolaj Bjorner <[email protected]>
1 parent 23e7dc0 commit ea9fa17

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/test/dlist.cpp

+12-12
Original file line numberDiff line numberDiff line change
@@ -35,28 +35,28 @@ void test_prev() {
3535
}
3636

3737
// Test the next() method
38-
void test_next() {
38+
static void test_next() {
3939
TestNode node(1);
4040
SASSERT(node.next() == &node);
4141
std::cout << "test_next passed." << std::endl;
4242
}
4343

4444
// Test the const prev() method
45-
void test_const_prev() {
45+
static void test_const_prev() {
4646
const TestNode node(1);
4747
SASSERT(node.prev() == &node);
4848
std::cout << "test_const_prev passed." << std::endl;
4949
}
5050

5151
// Test the const next() method
52-
void test_const_next() {
52+
static void test_const_next() {
5353
const TestNode node(1);
5454
SASSERT(node.next() == &node);
5555
std::cout << "test_const_next passed." << std::endl;
5656
}
5757

5858
// Test the init() method
59-
void test_init() {
59+
static void test_init() {
6060
TestNode node(1);
6161
node.init(&node);
6262
SASSERT(node.next() == &node);
@@ -66,7 +66,7 @@ void test_init() {
6666
}
6767

6868
// Test the pop() method
69-
void test_pop() {
69+
static void test_pop() {
7070
TestNode* list = nullptr;
7171
TestNode node1(1);
7272
TestNode::push_to_front(list, &node1);
@@ -79,7 +79,7 @@ void test_pop() {
7979
}
8080

8181
// Test the insert_after() method
82-
void test_insert_after() {
82+
static void test_insert_after() {
8383
TestNode node1(1);
8484
TestNode node2(2);
8585
node1.insert_after(&node2);
@@ -93,7 +93,7 @@ void test_insert_after() {
9393
}
9494

9595
// Test the insert_before() method
96-
void test_insert_before() {
96+
static void test_insert_before() {
9797
TestNode node1(1);
9898
TestNode node2(2);
9999
node1.insert_before(&node2);
@@ -107,7 +107,7 @@ void test_insert_before() {
107107
}
108108

109109
// Test the remove_from() method
110-
void test_remove_from() {
110+
static void test_remove_from() {
111111
TestNode* list = nullptr;
112112
TestNode node1(1);
113113
TestNode node2(2);
@@ -123,7 +123,7 @@ void test_remove_from() {
123123
}
124124

125125
// Test the push_to_front() method
126-
void test_push_to_front() {
126+
static void test_push_to_front() {
127127
TestNode* list = nullptr;
128128
TestNode node1(1);
129129
TestNode::push_to_front(list, &node1);
@@ -134,7 +134,7 @@ void test_push_to_front() {
134134
}
135135

136136
// Test the detach() method
137-
void test_detach() {
137+
static void test_detach() {
138138
TestNode node(1);
139139
TestNode::detach(&node);
140140
SASSERT(node.next() == &node);
@@ -144,7 +144,7 @@ void test_detach() {
144144
}
145145

146146
// Test the invariant() method
147-
void test_invariant() {
147+
static void test_invariant() {
148148
TestNode node1(1);
149149
SASSERT(node1.invariant());
150150
TestNode node2(2);
@@ -155,7 +155,7 @@ void test_invariant() {
155155
}
156156

157157
// Test the contains() method
158-
void test_contains() {
158+
static void test_contains() {
159159
TestNode* list = nullptr;
160160
TestNode node1(1);
161161
TestNode node2(2);

0 commit comments

Comments
 (0)