Skip to content

Commit

Permalink
[eclipse-iceoryx#476] Introduce test feature in iceoryx-bb for bump_a…
Browse files Browse the repository at this point in the history
…llocator
  • Loading branch information
xieyuschen committed Oct 22, 2024
1 parent 5f6a0dc commit ee880ea
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions iceoryx2-bb/container/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ serde = { workspace = true }
generic-tests = { workspace = true }
iceoryx2-bb-testing = { workspace = true }
serde_test = { workspace = true }
iceoryx2-bb-elementary = { workspace = true, features = ["testing"]}
2 changes: 2 additions & 0 deletions iceoryx2-bb/elementary/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ iceoryx2-bb-testing = { workspace = true }

generic-tests = { workspace = true }

[features]
testing = []
1 change: 0 additions & 1 deletion iceoryx2-bb/elementary/src/bump_allocator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use std::sync::atomic::Ordering;

/// Simple BumpAllocator for testing purposes. Do not use this in production. If you are looking
/// for a production ready BumpAllocator use the one from iceoryx2_bb_memory::bump_allocator
#[doc(hidden)]
pub struct BumpAllocator {
start: usize,
pos: IoxAtomicUsize,
Expand Down
2 changes: 2 additions & 0 deletions iceoryx2-bb/elementary/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ pub mod enum_gen;
/// A strong type that represents the alignment part of [`std::alloc::Layout`]
pub mod alignment;
pub mod allocator;

#[cfg(feature = "testing")]
pub mod bump_allocator;
pub mod lazy_singleton;
pub mod math;
Expand Down

0 comments on commit ee880ea

Please sign in to comment.