Skip to content

Commit

Permalink
Add test of iter layout
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jul 3, 2023
1 parent b84d1df commit 4e08353
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
use std::mem;

struct Thing(usize);

#[test]
fn test_iter() {
assert_eq!(0, mem::size_of::<inventory::iter<Thing>>());
assert_eq!(1, mem::align_of::<inventory::iter<Thing>>());
}

0 comments on commit 4e08353

Please sign in to comment.