diff options
| author | John Clements <clements@racket-lang.org> | 2013-04-18 16:44:36 -0700 |
|---|---|---|
| committer | John Clements <clements@racket-lang.org> | 2013-04-30 16:31:55 -0700 |
| commit | d6bb587c12da816b2872db1c1f9154a58fc91006 (patch) | |
| tree | e71636b455df2519a4ccf501e3d733c7bc5ed40d | |
| parent | cc4e0186ac005768ebede5b6b858b223c33e4de3 (diff) | |
| download | rust-d6bb587c12da816b2872db1c1f9154a58fc91006.tar.gz rust-d6bb587c12da816b2872db1c1f9154a58fc91006.zip | |
with syntax fixes, this test case now appears to pass
| -rw-r--r-- | src/test/run-pass/tag-align-dyn-u64.rs | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/test/run-pass/tag-align-dyn-u64.rs b/src/test/run-pass/tag-align-dyn-u64.rs index a9c59de49ee..0fdf4e019a7 100644 --- a/src/test/run-pass/tag-align-dyn-u64.rs +++ b/src/test/run-pass/tag-align-dyn-u64.rs @@ -8,27 +8,25 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// xfail-test - -tag a_tag<A> { - a_tag(A); +enum a_tag<A> { + a_tag(A) } -type t_rec = { +struct t_rec { c8: u8, t: a_tag<u64> -}; +} fn mk_rec() -> t_rec { - return { c8:0u8, t:a_tag(0u64) }; + return t_rec { c8:0u8, t:a_tag(0u64) }; } -fn is_8_byte_aligned(&&u: a_tag<u64>) -> bool { +fn is_8_byte_aligned(u: &a_tag<u64>) -> bool { let p = ptr::to_unsafe_ptr(u) as uint; return (p & 7u) == 0u; } pub fn main() { let x = mk_rec(); - assert!(is_8_byte_aligned(x.t)); + assert!(is_8_byte_aligned(&x.t)); } |
