Skip to content

Commit

Permalink
Ignore i128 test on asmjs
Browse files Browse the repository at this point in the history
  • Loading branch information
faern committed Jun 3, 2018
1 parent 7df0099 commit 8b5f962
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/test/run-pass/const-endianess.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@ use test::black_box as b;

const BE_U32: u32 = 55u32.to_be();
const LE_U32: u32 = 55u32.to_le();
const BE_U128: u128 = 999999u128.to_be();
const LE_I128: i128 = -999999i128.to_le();


fn main() {
assert_eq!(BE_U32, b(55u32).to_be());
assert_eq!(LE_U32, b(55u32).to_le());
assert_eq!(BE_U128, b(999999u128).to_be());
assert_eq!(LE_I128, b(-999999i128).to_le());

#[cfg(not(target_arch = "asmjs"))]
{
const BE_U128: u128 = 999999u128.to_be();
const LE_I128: i128 = -999999i128.to_le();
assert_eq!(BE_U128, b(999999u128).to_be());
assert_eq!(LE_I128, b(-999999i128).to_le());
}
}

0 comments on commit 8b5f962

Please sign in to comment.