mirror of
https://github.com/rust-embedded/heapless.git
synced 2025-10-02 14:54:30 +00:00
Fix cargo test without cargo features enabled
This commit is contained in:
parent
a3f4d8f41e
commit
92cc062a4c
@ -15,12 +15,14 @@ use as_slice::{AsMutSlice, AsSlice};
|
|||||||
use super::{Init, Node, Uninit};
|
use super::{Init, Node, Uninit};
|
||||||
|
|
||||||
/// Instantiates a pool as a global singleton
|
/// Instantiates a pool as a global singleton
|
||||||
|
// NOTE(any(test)) makes testing easier (no need to enable Cargo features for testing)
|
||||||
#[cfg(any(
|
#[cfg(any(
|
||||||
armv7a,
|
armv7a,
|
||||||
armv7r,
|
armv7r,
|
||||||
armv7m,
|
armv7m,
|
||||||
armv8m_main,
|
armv8m_main,
|
||||||
all(target_arch = "x86_64", feature = "x86-sync-pool"),
|
all(target_arch = "x86_64", feature = "x86-sync-pool"),
|
||||||
|
test
|
||||||
))]
|
))]
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! pool {
|
macro_rules! pool {
|
||||||
|
@ -235,6 +235,7 @@ fn iterator_properly_wraps() {
|
|||||||
assert_eq!(expected, actual)
|
assert_eq!(expected, actual)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(all(target_arch = "x86_64", feature = "x86-sync-pool"))]
|
||||||
#[test]
|
#[test]
|
||||||
fn pool() {
|
fn pool() {
|
||||||
use heapless::pool::singleton::Pool as _;
|
use heapless::pool::singleton::Pool as _;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user