diff options
| author | Patrick Walton <[email protected]> | 2010-07-26 15:20:13 -0700 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2010-07-26 15:22:21 -0700 |
| commit | 4b97b4e79db70ca4ed6b9026c87858e97e92cc67 (patch) | |
| tree | 91e35aeb9f5d0f179d2af7e21894bd555a515f0a /src/test/run-pass/cast.rs | |
| parent | Note the typestate dataflow timing. The culprit is revealed. (diff) | |
| download | rust-4b97b4e79db70ca4ed6b9026c87858e97e92cc67.tar.xz rust-4b97b4e79db70ca4ed6b9026c87858e97e92cc67.zip | |
Move the test suite to the "as" form for casts. XFAIL a few tests for LLVM.
Diffstat (limited to 'src/test/run-pass/cast.rs')
| -rw-r--r-- | src/test/run-pass/cast.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/test/run-pass/cast.rs b/src/test/run-pass/cast.rs index ee2fb186..e04ad629 100644 --- a/src/test/run-pass/cast.rs +++ b/src/test/run-pass/cast.rs @@ -2,15 +2,15 @@ fn main() { - let int i = int('Q'); + let int i = 'Q' as int; check (i == 0x51); - let u32 u = u32(i); - check (u == u32(0x51)); - check (u == u32('Q')); - check (i8(i) == i8('Q')); - check (i8(u8(i)) == i8(u8('Q'))); - check (char(0x51) == 'Q'); + let u32 u = i as u32; + check (u == (0x51 as u32)); + check (u == ('Q' as u32)); + check ((i as u8) == ('Q' as u8)); + check (((i as u8) as i8) == (('Q' as u8) as i8)); + check ((0x51 as char) == 'Q'); - check (true == bool(1)); - check (u32(0) == u32(false)); + check (true == (1 as bool)); + check ((0 as u32) == (false as u32)); } |