Skip to content

Commit

Permalink
Add test that creates an in6_addr as a const
Browse files Browse the repository at this point in the history
  • Loading branch information
faern committed Jul 29, 2018
1 parent 2819634 commit b594bf2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libc-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ name = "linux-fcntl"
path = "test/linux_fcntl.rs"
harness = false

[[test]]
name = "no-private-align"
path = "test/no_private_align.rs"
harness = false
9 changes: 9 additions & 0 deletions libc-test/test/no_private_align.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extern crate libc;

fn main() {
#[cfg(feature = "align")]
const ADDR: libc::in6_addr = libc::in6_addr {
s6_addr: [0; 16],
};
println!("PASSED all tests");
}

0 comments on commit b594bf2

Please sign in to comment.