]> git.lizzy.rs Git - rust.git/commitdiff
Add test for size_of_val::<str>.
authorScott Olson <scott@solson.me>
Tue, 10 May 2016 03:03:53 +0000 (21:03 -0600)
committerScott Olson <scott@solson.me>
Tue, 10 May 2016 03:03:53 +0000 (21:03 -0600)
tests/run-pass/intrinsics.rs

index 5666e191fd3736b01050ca5e0f51b715e3fa40df..ef7fa0d986135e016c2c0ab5f3ca070fa9cb7cc5 100755 (executable)
@@ -10,4 +10,5 @@ fn main() {
     assert_eq!(size_of_val(&42), 4);
     assert_eq!(size_of_val(&[] as &[i32]), 0);
     assert_eq!(size_of_val(&[1, 2, 3] as &[i32]), 12);
+    assert_eq!(size_of_val("foobar"), 6);
 }