Skip to content

Commit e3225b5

Browse files
committed
[#476] Introduce test feature in iceoryx-bb for bump_allocator
1 parent 4dc37ec commit e3225b5

File tree

4 files changed

+5
-1
lines changed

4 files changed

+5
-1
lines changed

iceoryx2-bb/container/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ serde = { workspace = true }
2323
generic-tests = { workspace = true }
2424
iceoryx2-bb-testing = { workspace = true }
2525
serde_test = { workspace = true }
26+
iceoryx2-bb-elementary = { workspace = true, features = ["testing"]}

iceoryx2-bb/elementary/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ iceoryx2-bb-testing = { workspace = true }
1818

1919
generic-tests = { workspace = true }
2020

21+
[features]
22+
testing = []

iceoryx2-bb/elementary/src/bump_allocator.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ use std::sync::atomic::Ordering;
1616

1717
/// Simple BumpAllocator for testing purposes. Do not use this in production. If you are looking
1818
/// for a production ready BumpAllocator use the one from iceoryx2_bb_memory::bump_allocator
19-
#[doc(hidden)]
2019
pub struct BumpAllocator {
2120
start: usize,
2221
pos: IoxAtomicUsize,

iceoryx2-bb/elementary/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ pub mod enum_gen;
1818
/// A strong type that represents the alignment part of [`std::alloc::Layout`]
1919
pub mod alignment;
2020
pub mod allocator;
21+
22+
#[cfg(feature = "testing")]
2123
pub mod bump_allocator;
2224
pub mod lazy_singleton;
2325
pub mod math;

0 commit comments

Comments
 (0)