File: 0004-Fix-includes-so-unit-tests-can-be-run-in-autopkgtest.patch

package info (click to toggle)
foonathan-memory 0.7.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 1,644 kB
  • sloc: cpp: 12,425; xml: 139; sh: 48; makefile: 25
file content (453 lines) | stat: -rw-r--r-- 14,362 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
From: =?utf-8?q?Timo_R=C3=B6hling?= <timo@gaussglocke.de>
Date: Wed, 2 Dec 2020 18:06:42 +0100
Subject: Fix includes so unit tests can be run in autopkgtest

Forwarded: not-needed
---
 test/CMakeLists.txt              |  4 ----
 test/aligned_allocator.cpp       |  8 ++++----
 test/allocator_traits.cpp        |  4 ++--
 test/benchmark.hpp               |  2 +-
 test/default_allocator.cpp       |  8 ++++----
 test/detail/align.cpp            |  2 +-
 test/detail/debug_helpers.cpp    |  4 ++--
 test/detail/free_list.cpp        |  8 ++++----
 test/detail/free_list_array.cpp  |  8 ++++----
 test/detail/ilog2.cpp            |  2 +-
 test/detail/memory_stack.cpp     | 10 +++++-----
 test/fallback_allocator.cpp      |  4 ++--
 test/iteration_allocator.cpp     |  4 ++--
 test/joint_allocator.cpp         |  4 ++--
 test/memory_arena.cpp            |  4 ++--
 test/memory_pool.cpp             |  4 ++--
 test/memory_pool_collection.cpp  |  4 ++--
 test/memory_resource_adapter.cpp |  6 +++---
 test/memory_stack.cpp            |  4 ++--
 test/profiling.cpp               | 10 +++++-----
 test/segregator.cpp              |  2 +-
 test/smart_ptr.cpp               |  6 +++---
 22 files changed, 54 insertions(+), 58 deletions(-)

diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index f269cfb..ad3351c 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -5,8 +5,6 @@
 
 add_executable(foonathan_memory_profiling benchmark.hpp profiling.cpp)
 target_link_libraries(foonathan_memory_profiling foonathan_memory)
-target_include_directories(foonathan_memory_profiling PRIVATE
-                            ${FOONATHAN_MEMORY_SOURCE_DIR}/include/foonathan/memory)
 
 find_package(doctest REQUIRED)
 
@@ -35,8 +33,6 @@ set(tests
 
 add_executable(foonathan_memory_test ${tests})
 target_link_libraries(foonathan_memory_test PRIVATE foonathan_memory doctest::doctest)
-target_include_directories(foonathan_memory_test PRIVATE
-                            ${FOONATHAN_MEMORY_SOURCE_DIR}/include/foonathan/memory)
 
 add_test(NAME test COMMAND foonathan_memory_test)
 
diff --git a/test/aligned_allocator.cpp b/test/aligned_allocator.cpp
index 05ee1f4..5b2fe6d 100644
--- a/test/aligned_allocator.cpp
+++ b/test/aligned_allocator.cpp
@@ -1,13 +1,13 @@
 // Copyright (C) 2015-2025 Jonathan Müller and foonathan/memory contributors
 // SPDX-License-Identifier: Zlib
 
-#include "aligned_allocator.hpp"
+#include <foonathan/memory/aligned_allocator.hpp>
 
 #include <doctest/doctest.h>
 
-#include "detail/align.hpp"
-#include "allocator_storage.hpp"
-#include "memory_stack.hpp"
+#include <foonathan/memory/detail/align.hpp>
+#include <foonathan/memory/allocator_storage.hpp>
+#include <foonathan/memory/memory_stack.hpp>
 
 using namespace foonathan::memory;
 
diff --git a/test/allocator_traits.cpp b/test/allocator_traits.cpp
index 4b253da..258ec40 100644
--- a/test/allocator_traits.cpp
+++ b/test/allocator_traits.cpp
@@ -1,13 +1,13 @@
 // Copyright (C) 2015-2025 Jonathan Müller and foonathan/memory contributors
 // SPDX-License-Identifier: Zlib
 
-#include "allocator_traits.hpp"
+#include <foonathan/memory/allocator_traits.hpp>
 
 #include <doctest/doctest.h>
 
 #include <type_traits>
 
-#include "heap_allocator.hpp"
+#include <foonathan/memory/heap_allocator.hpp>
 
 using namespace foonathan::memory;
 
diff --git a/test/benchmark.hpp b/test/benchmark.hpp
index 969e2d7..d4df5f9 100644
--- a/test/benchmark.hpp
+++ b/test/benchmark.hpp
@@ -11,7 +11,7 @@
 #include <random>
 #include <vector>
 
-#include "allocator_traits.hpp"
+#include "foonathan/memory/allocator_traits.hpp"
 
 using unit = std::chrono::nanoseconds;
 
diff --git a/test/default_allocator.cpp b/test/default_allocator.cpp
index d31e540..727ce07 100644
--- a/test/default_allocator.cpp
+++ b/test/default_allocator.cpp
@@ -1,15 +1,15 @@
-// Copyright (C) 2015-2025 Jonathan Müller and foonathan/memory contributors
+// Copyright (C) 2015-2023 Jonathan Müller and foonathan/memory contributors
 // SPDX-License-Identifier: Zlib
 
 // tests all possible default allocator classes
 
-#include "default_allocator.hpp"
+#include <foonathan/memory/default_allocator.hpp>
 
 #include <doctest/doctest.h>
 #include <vector>
 
-#include "detail/align.hpp"
-#include "memory_arena.hpp"
+#include <foonathan/memory/detail/align.hpp>
+#include <foonathan/memory/memory_arena.hpp>
 
 using namespace foonathan::memory;
 
diff --git a/test/detail/align.cpp b/test/detail/align.cpp
index c60dfcc..d51c270 100644
--- a/test/detail/align.cpp
+++ b/test/detail/align.cpp
@@ -1,7 +1,7 @@
 // Copyright (C) 2015-2025 Jonathan Müller and foonathan/memory contributors
 // SPDX-License-Identifier: Zlib
 
-#include "detail/align.hpp"
+#include <foonathan/memory/detail/align.hpp>
 
 #include <doctest/doctest.h>
 
diff --git a/test/detail/debug_helpers.cpp b/test/detail/debug_helpers.cpp
index a1d7b3c..ed6a597 100644
--- a/test/detail/debug_helpers.cpp
+++ b/test/detail/debug_helpers.cpp
@@ -1,11 +1,11 @@
 // Copyright (C) 2015-2025 Jonathan Müller and foonathan/memory contributors
 // SPDX-License-Identifier: Zlib
 
-#include "detail/debug_helpers.hpp"
+#include <foonathan/memory/detail/debug_helpers.hpp>
 
 #include <doctest/doctest.h>
 
-#include "debugging.hpp"
+#include <foonathan/memory/debugging.hpp>
 
 using namespace foonathan::memory;
 using namespace detail;
diff --git a/test/detail/free_list.cpp b/test/detail/free_list.cpp
index 214b536..69c2942 100644
--- a/test/detail/free_list.cpp
+++ b/test/detail/free_list.cpp
@@ -1,16 +1,16 @@
 // Copyright (C) 2015-2025 Jonathan Müller and foonathan/memory contributors
 // SPDX-License-Identifier: Zlib
 
-#include "detail/free_list.hpp"
-#include "detail/small_free_list.hpp"
+#include <foonathan/memory/detail/free_list.hpp>
+#include <foonathan/memory/detail/small_free_list.hpp>
 
 #include <algorithm>
 #include <doctest/doctest.h>
 #include <random>
 #include <vector>
 
-#include "detail/align.hpp"
-#include "static_allocator.hpp"
+#include <foonathan/memory/detail/align.hpp>
+#include <foonathan/memory/static_allocator.hpp>
 
 using namespace foonathan::memory;
 using namespace detail;
diff --git a/test/detail/free_list_array.cpp b/test/detail/free_list_array.cpp
index b404c82..9dd4cb3 100644
--- a/test/detail/free_list_array.cpp
+++ b/test/detail/free_list_array.cpp
@@ -1,13 +1,13 @@
 // Copyright (C) 2015-2025 Jonathan Müller and foonathan/memory contributors
 // SPDX-License-Identifier: Zlib
 
-#include "detail/free_list_array.hpp"
+#include <foonathan/memory/detail/free_list_array.hpp>
 
 #include <doctest/doctest.h>
 
-#include "detail/free_list.hpp"
-#include "detail/small_free_list.hpp"
-#include "static_allocator.hpp"
+#include <foonathan/memory/detail/free_list.hpp>
+#include <foonathan/memory/detail/small_free_list.hpp>
+#include <foonathan/memory/static_allocator.hpp>
 
 using namespace foonathan::memory;
 using namespace detail;
diff --git a/test/detail/ilog2.cpp b/test/detail/ilog2.cpp
index 83db8ba..2747a36 100644
--- a/test/detail/ilog2.cpp
+++ b/test/detail/ilog2.cpp
@@ -1,7 +1,7 @@
 // Copyright (C) 2015-2025 Jonathan Müller and foonathan/memory contributors
 // SPDX-License-Identifier: Zlib
 
-#include "detail/ilog2.hpp"
+#include <foonathan/memory/detail/ilog2.hpp>
 
 #include <doctest/doctest.h>
 
diff --git a/test/detail/memory_stack.cpp b/test/detail/memory_stack.cpp
index 5d322f5..f3cccac 100644
--- a/test/detail/memory_stack.cpp
+++ b/test/detail/memory_stack.cpp
@@ -1,14 +1,14 @@
 // Copyright (C) 2015-2025 Jonathan Müller and foonathan/memory contributors
 // SPDX-License-Identifier: Zlib
 
-#include "detail/memory_stack.hpp"
+#include <foonathan/memory/detail/memory_stack.hpp>
 
 #include <doctest/doctest.h>
 
-#include "detail/align.hpp"
-#include "detail/debug_helpers.hpp"
-#include "detail/utility.hpp"
-#include "static_allocator.hpp"
+#include <foonathan/memory/detail/align.hpp>
+#include <foonathan/memory/detail/debug_helpers.hpp>
+#include <foonathan/memory/detail/utility.hpp>
+#include <foonathan/memory/static_allocator.hpp>
 
 using namespace foonathan::memory;
 using namespace detail;
diff --git a/test/fallback_allocator.cpp b/test/fallback_allocator.cpp
index 878648b..6e2d07f 100644
--- a/test/fallback_allocator.cpp
+++ b/test/fallback_allocator.cpp
@@ -1,11 +1,11 @@
 // Copyright (C) 2015-2025 Jonathan Müller and foonathan/memory contributors
 // SPDX-License-Identifier: Zlib
 
-#include "fallback_allocator.hpp"
+#include <foonathan/memory/fallback_allocator.hpp>
 
 #include <doctest/doctest.h>
 
-#include "allocator_storage.hpp"
+#include <foonathan/memory/allocator_storage.hpp>
 #include "test_allocator.hpp"
 
 using namespace foonathan::memory;
diff --git a/test/iteration_allocator.cpp b/test/iteration_allocator.cpp
index 50f79aa..fda5e10 100644
--- a/test/iteration_allocator.cpp
+++ b/test/iteration_allocator.cpp
@@ -1,11 +1,11 @@
 // Copyright (C) 2015-2025 Jonathan Müller and foonathan/memory contributors
 // SPDX-License-Identifier: Zlib
 
-#include "iteration_allocator.hpp"
+#include <foonathan/memory/iteration_allocator.hpp>
 
 #include <doctest/doctest.h>
 
-#include "allocator_storage.hpp"
+#include <foonathan/memory/allocator_storage.hpp>
 #include "test_allocator.hpp"
 
 using namespace foonathan::memory;
diff --git a/test/joint_allocator.cpp b/test/joint_allocator.cpp
index 1e33126..0149bfe 100644
--- a/test/joint_allocator.cpp
+++ b/test/joint_allocator.cpp
@@ -1,11 +1,11 @@
 // Copyright (C) 2015-2025 Jonathan Müller and foonathan/memory contributors
 // SPDX-License-Identifier: Zlib
 
-#include "joint_allocator.hpp"
+#include <foonathan/memory/joint_allocator.hpp>
 
 #include <doctest/doctest.h>
 
-#include "container.hpp"
+#include <foonathan/memory/container.hpp>
 #include "test_allocator.hpp"
 
 using namespace foonathan::memory;
diff --git a/test/memory_arena.cpp b/test/memory_arena.cpp
index 41b4b00..fe8647f 100644
--- a/test/memory_arena.cpp
+++ b/test/memory_arena.cpp
@@ -1,11 +1,11 @@
 // Copyright (C) 2015-2025 Jonathan Müller and foonathan/memory contributors
 // SPDX-License-Identifier: Zlib
 
-#include "memory_arena.hpp"
+#include <foonathan/memory/memory_arena.hpp>
 
 #include <doctest/doctest.h>
 
-#include "static_allocator.hpp"
+#include <foonathan/memory/static_allocator.hpp>
 
 using namespace foonathan::memory;
 using namespace detail;
diff --git a/test/memory_pool.cpp b/test/memory_pool.cpp
index 6c980d3..832ddff 100644
--- a/test/memory_pool.cpp
+++ b/test/memory_pool.cpp
@@ -1,14 +1,14 @@
 // Copyright (C) 2015-2025 Jonathan Müller and foonathan/memory contributors
 // SPDX-License-Identifier: Zlib
 
-#include "memory_pool.hpp"
+#include <foonathan/memory/memory_pool.hpp>
 
 #include <algorithm>
 #include <doctest/doctest.h>
 #include <random>
 #include <vector>
 
-#include "allocator_storage.hpp"
+#include <foonathan/memory/allocator_storage.hpp>
 #include "test_allocator.hpp"
 
 using namespace foonathan::memory;
diff --git a/test/memory_pool_collection.cpp b/test/memory_pool_collection.cpp
index ad6e456..f7ed5cb 100644
--- a/test/memory_pool_collection.cpp
+++ b/test/memory_pool_collection.cpp
@@ -1,14 +1,14 @@
 // Copyright (C) 2015-2025 Jonathan Müller and foonathan/memory contributors
 // SPDX-License-Identifier: Zlib
 
-#include "memory_pool_collection.hpp"
+#include <foonathan/memory/memory_pool_collection.hpp>
 
 #include <algorithm>
 #include <doctest/doctest.h>
 #include <random>
 #include <vector>
 
-#include "allocator_storage.hpp"
+#include <foonathan/memory/allocator_storage.hpp>
 #include "test_allocator.hpp"
 
 using namespace foonathan::memory;
diff --git a/test/memory_resource_adapter.cpp b/test/memory_resource_adapter.cpp
index 5a982f1..ad11ddf 100644
--- a/test/memory_resource_adapter.cpp
+++ b/test/memory_resource_adapter.cpp
@@ -1,13 +1,13 @@
 // Copyright (C) 2015-2025 Jonathan Müller and foonathan/memory contributors
 // SPDX-License-Identifier: Zlib
 
-#include "memory_resource_adapter.hpp"
+#include <foonathan/memory/memory_resource_adapter.hpp>
 
 #include <doctest/doctest.h>
 #include <new>
 
-#include "allocator_storage.hpp"
-#include "std_allocator.hpp"
+#include <foonathan/memory/allocator_storage.hpp>
+#include <foonathan/memory/std_allocator.hpp>
 
 using namespace foonathan::memory;
 
diff --git a/test/memory_stack.cpp b/test/memory_stack.cpp
index 35f5534..3368e21 100644
--- a/test/memory_stack.cpp
+++ b/test/memory_stack.cpp
@@ -1,11 +1,11 @@
 // Copyright (C) 2015-2025 Jonathan Müller and foonathan/memory contributors
 // SPDX-License-Identifier: Zlib
 
-#include "memory_stack.hpp"
+#include <foonathan/memory/memory_stack.hpp>
 
 #include <doctest/doctest.h>
 
-#include "allocator_storage.hpp"
+#include <foonathan/memory/allocator_storage.hpp>
 #include "test_allocator.hpp"
 
 using namespace foonathan::memory;
diff --git a/test/profiling.cpp b/test/profiling.cpp
index 823d58d..89e3d78 100644
--- a/test/profiling.cpp
+++ b/test/profiling.cpp
@@ -7,11 +7,11 @@
 #include <iostream>
 #include <locale>
 
-#include "allocator_storage.hpp"
-#include "heap_allocator.hpp"
-#include "new_allocator.hpp"
-#include "memory_pool.hpp"
-#include "memory_stack.hpp"
+#include <foonathan/memory/allocator_storage.hpp>
+#include <foonathan/memory/heap_allocator.hpp>
+#include <foonathan/memory/new_allocator.hpp>
+#include <foonathan/memory/memory_pool.hpp>
+#include <foonathan/memory/memory_stack.hpp>
 
 using namespace foonathan::memory;
 
diff --git a/test/segregator.cpp b/test/segregator.cpp
index 1d9fffe..c8ea5cd 100644
--- a/test/segregator.cpp
+++ b/test/segregator.cpp
@@ -1,7 +1,7 @@
 // Copyright (C) 2015-2025 Jonathan Müller and foonathan/memory contributors
 // SPDX-License-Identifier: Zlib
 
-#include "segregator.hpp"
+#include <foonathan/memory/segregator.hpp>
 
 #include <doctest/doctest.h>
 
diff --git a/test/smart_ptr.cpp b/test/smart_ptr.cpp
index 7c273b3..eb03e1e 100644
--- a/test/smart_ptr.cpp
+++ b/test/smart_ptr.cpp
@@ -1,12 +1,12 @@
 // Copyright (C) 2015-2025 Jonathan Müller and foonathan/memory contributors
 // SPDX-License-Identifier: Zlib
 
-#include "smart_ptr.hpp"
+#include <foonathan/memory/smart_ptr.hpp>
 
 #include <doctest/doctest.h>
 
-#include "container.hpp"
-#include "memory_pool.hpp"
+#include <foonathan/memory/container.hpp>
+#include <foonathan/memory/memory_pool.hpp>
 
 using namespace foonathan::memory;