From 95609699e3796f4911dc433e5a6edbe17847b0e1 Mon Sep 17 00:00:00 2001 From: Luqman Aden Date: Sat, 12 Oct 2013 21:52:14 -0400 Subject: [PATCH] Update test for packed structs to also test being placed in statics. --- src/test/run-pass/packed-struct-size.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/test/run-pass/packed-struct-size.rs b/src/test/run-pass/packed-struct-size.rs index f0175da9cba..b94b4db5f60 100644 --- a/src/test/run-pass/packed-struct-size.rs +++ b/src/test/run-pass/packed-struct-size.rs @@ -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::(), 4); -- GitLab