mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-25 08:12:30 +00:00
hal-internal: fix failing test due to not initializing ringbuf.
This commit is contained in:
parent
f30b298b0e
commit
43d51884e2
@ -478,8 +478,12 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn zero_len() {
|
fn zero_len() {
|
||||||
|
let mut b = [0; 0];
|
||||||
|
|
||||||
let rb = RingBuffer::new();
|
let rb = RingBuffer::new();
|
||||||
unsafe {
|
unsafe {
|
||||||
|
rb.init(b.as_mut_ptr(), b.len());
|
||||||
|
|
||||||
assert_eq!(rb.is_empty(), true);
|
assert_eq!(rb.is_empty(), true);
|
||||||
assert_eq!(rb.is_full(), true);
|
assert_eq!(rb.is_full(), true);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user