Merge pull request #1390 from dtolnay/asmjs

Run test suite on asmjs
This commit is contained in:
David Tolnay 2018-09-15 15:50:11 -07:00 committed by GitHub
commit 48230890c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 3 deletions

View File

@ -272,7 +272,7 @@ declare_tests! {
0f32 => &[Token::F32(0.)], 0f32 => &[Token::F32(0.)],
0f64 => &[Token::F64(0.)], 0f64 => &[Token::F64(0.)],
} }
#[cfg(not(target_arch = "wasm32"))] #[cfg(not(any(target_arch = "asmjs", target_arch = "wasm32")))]
test_small_int_to_128 { test_small_int_to_128 {
1i128 => &[Token::I8(1)], 1i128 => &[Token::I8(1)],
1i128 => &[Token::I16(1)], 1i128 => &[Token::I16(1)],

View File

@ -618,7 +618,7 @@ fn test_enum_skipped() {
); );
} }
#[cfg(not(target_arch = "wasm32"))] #[cfg(not(any(target_arch = "asmjs", target_arch = "wasm32")))]
#[test] #[test]
fn test_integer128() { fn test_integer128() {
assert_ser_tokens_error(&1i128, &[], "i128 is not supported"); assert_ser_tokens_error(&1i128, &[], "i128 is not supported");

View File

@ -26,7 +26,7 @@ fn test_u32_to_enum() {
assert_eq!(E::B, e); assert_eq!(E::B, e);
} }
#[cfg(not(target_arch = "wasm32"))] #[cfg(not(any(target_arch = "asmjs", target_arch = "wasm32")))]
#[test] #[test]
fn test_integer128() { fn test_integer128() {
let de_u128 = IntoDeserializer::<value::Error>::into_deserializer(1u128); let de_u128 = IntoDeserializer::<value::Error>::into_deserializer(1u128);

View File

@ -53,6 +53,7 @@ elif [ -n "${EMSCRIPTEN}" ]; then
chmod +x ~/.cargo/bin/cargo-web chmod +x ~/.cargo/bin/cargo-web
cd "$DIR/test_suite" cd "$DIR/test_suite"
cargo web test --target=asmjs-unknown-emscripten --nodejs
cargo web test --target=wasm32-unknown-emscripten --nodejs cargo web test --target=wasm32-unknown-emscripten --nodejs
else else
CHANNEL=nightly CHANNEL=nightly