diff options
| author | Luqman Aden <laden@csclub.uwaterloo.ca> | 2013-10-12 21:52:14 -0400 |
|---|---|---|
| committer | Luqman Aden <laden@csclub.uwaterloo.ca> | 2013-10-12 21:52:14 -0400 |
| commit | 95609699e3796f4911dc433e5a6edbe17847b0e1 (patch) | |
| tree | 695054234ecb8de30a62abcbbafb0753828021da | |
| parent | 4b4b2136e048c39c60c8289f4cd1c870d4aaaeb0 (diff) | |
Update test for packed structs to also test being placed in statics.
| -rw-r--r-- | src/test/run-pass/packed-struct-size.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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::<S4>(), 4); |
