diff options
author | Carl Lerche <me@carllerche.com> | 2015-05-21 15:02:12 -0700 |
---|---|---|
committer | Carl Lerche <me@carllerche.com> | 2015-05-21 15:02:12 -0700 |
commit | 74d18318803a9a41632cab15d65305fd414aa198 (patch) | |
tree | 76c8e2733dda6e39f6c50939f70ab984bdd4e099 /test/sys/test_ioctl.rs | |
parent | 075c037f8b85fde33d29ff591958e23cac88139e (diff) | |
download | nix-74d18318803a9a41632cab15d65305fd414aa198.zip |
Test sockopt const values
Diffstat (limited to 'test/sys/test_ioctl.rs')
-rw-r--r-- | test/sys/test_ioctl.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/sys/test_ioctl.rs b/test/sys/test_ioctl.rs index 2654bd81..49f49206 100644 --- a/test/sys/test_ioctl.rs +++ b/test/sys/test_ioctl.rs @@ -13,6 +13,11 @@ fn test_op_none() { fn test_op_write() { assert_eq!(op_write('z' as u8, 10, 1), 0x40017A0A); assert_eq!(op_write('z' as u8, 10, 512), 0x42007A0A); +} + +#[cfg(target_pointer_width = "64")] +#[test] +fn test_op_write_64() { assert_eq!(op_write('z' as u8, 10, 1 << 32), 0x40007A0A); } @@ -20,6 +25,11 @@ fn test_op_write() { fn test_op_read() { assert_eq!(op_read('z' as u8, 10, 1), 0x80017A0A); assert_eq!(op_read('z' as u8, 10, 512), 0x82007A0A); +} + +#[cfg(target_pointer_width = "64")] +#[test] +fn test_op_read_64() { assert_eq!(op_read('z' as u8, 10, 1 << 32), 0x80007A0A); } @@ -27,5 +37,10 @@ fn test_op_read() { fn test_op_read_write() { assert_eq!(op_read_write('z' as u8, 10, 1), 0xC0017A0A); assert_eq!(op_read_write('z' as u8, 10, 512), 0xC2007A0A); +} + +#[cfg(target_pointer_width = "64")] +#[test] +fn test_op_read_write_64() { assert_eq!(op_read_write('z' as u8, 10, 1 << 32), 0xC0007A0A); } |