]> git.lizzy.rs Git - rust.git/commitdiff
Update test for packed structs to also test being placed in statics.
authorLuqman Aden <laden@csclub.uwaterloo.ca>
Sun, 13 Oct 2013 01:52:14 +0000 (21:52 -0400)
committerLuqman Aden <laden@csclub.uwaterloo.ca>
Sun, 13 Oct 2013 01:52:14 +0000 (21:52 -0400)
src/test/run-pass/packed-struct-size.rs

index f0175da9cbad1acbe695c22214de4bb49ec60909..b94b4db5f601de88848862b9c6f0d2814abc3c6c 100644 (file)
@@ -50,6 +50,11 @@ struct S7_Option {
     d: Option<@mut f64>
 }
 
+// Placing packed structs in statics should work
+static TEST_S4: S4 = S4 { a: 1, b: [2, 3, 4] };
+static TEST_S5: S5 = S5 { a: 3, b: 67 };
+static TEST_S3_Foo: S3_Foo = S3_Foo { a: 1, b: 2, c: Baz };
+
 
 pub fn main() {
     assert_eq!(sys::size_of::<S4>(), 4);