Skip to content

Commit

Permalink
Add test for box_pool with CamelCase types
Browse files Browse the repository at this point in the history
  • Loading branch information
newAM committed Nov 17, 2023
1 parent fa67f35 commit 02ec3f3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/pool/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ macro_rules! box_pool {
type Data = $data_type;

fn singleton() -> &'static $crate::pool::boxed::BoxPoolImpl<$data_type> {
#[allow(non_upper_case_globals)]
static $name: $crate::pool::boxed::BoxPoolImpl<$data_type> =
$crate::pool::boxed::BoxPoolImpl::new();

Expand Down Expand Up @@ -557,4 +558,10 @@ mod tests {
assert!(once.is_ok());
assert!(twice.is_ok());
}

#[test]
fn box_pool_case() {
// https://github.com/rust-embedded/heapless/issues/411
box_pool!(CamelCaseType: u128);
}
}

0 comments on commit 02ec3f3

Please sign in to comment.