Skip to content

Commit 8712468

Browse files
committed
test: bytes: Use an odd number of bytes.
1 parent 33bc6e6 commit 8712468

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/test.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,8 @@ fn multiple_paths_to_a_sender() {
358358

359359
#[test]
360360
fn bytes() {
361-
let bytes = [1, 2, 3, 4, 5, 6, 7, 8];
361+
// N.B. We're using an odd number of bytes here to expose alignment issues.
362+
let bytes = [1, 2, 3, 4, 5, 6, 7];
362363
let (tx, rx) = ipc::bytes_channel().unwrap();
363364
tx.send(&bytes[..]).unwrap();
364365
let received_bytes = rx.recv().unwrap();
@@ -371,7 +372,7 @@ fn embedded_bytes_receivers() {
371372
let (super_tx, super_rx) = ipc::channel().unwrap();
372373
super_tx.send(sub_tx).unwrap();
373374
let sub_tx = super_rx.recv().unwrap();
374-
let bytes = [1, 2, 3, 4, 5, 6, 7, 8];
375+
let bytes = [1, 2, 3, 4, 5, 6, 7];
375376
sub_tx.send(&bytes[..]).unwrap();
376377
let received_bytes = sub_rx.recv().unwrap();
377378
assert_eq!(&bytes, &received_bytes[..]);

0 commit comments

Comments
 (0)