about summary refs log tree commit diff
path: root/src/libcoretest
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcoretest')
-rw-r--r--src/libcoretest/mem.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libcoretest/mem.rs b/src/libcoretest/mem.rs
index 5bc08376d25..01bafe49a7a 100644
--- a/src/libcoretest/mem.rs
+++ b/src/libcoretest/mem.rs
@@ -19,6 +19,13 @@ fn size_of_basic() {
 }
 
 #[test]
+#[cfg(target_pointer_width = "16")]
+fn size_of_16() {
+    assert_eq!(size_of::<usize>(), 2);
+    assert_eq!(size_of::<*const usize>(), 2);
+}
+
+#[test]
 #[cfg(target_pointer_width = "32")]
 fn size_of_32() {
     assert_eq!(size_of::<usize>(), 4);
@@ -48,6 +55,13 @@ fn align_of_basic() {
 }
 
 #[test]
+#[cfg(target_pointer_width = "16")]
+fn align_of_16() {
+    assert_eq!(align_of::<usize>(), 2);
+    assert_eq!(align_of::<*const usize>(), 2);
+}
+
+#[test]
 #[cfg(target_pointer_width = "32")]
 fn align_of_32() {
     assert_eq!(align_of::<usize>(), 4);