Update test for packed structs to also test being placed in statics.

This commit is contained in:
Luqman Aden 2013-10-12 21:52:14 -04:00
parent 4b4b2136e0
commit 95609699e3

View 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);