From b08b5ae0ec22e67d1cab7495865a0b34d4e6c5a2 Mon Sep 17 00:00:00 2001 From: snf Date: Tue, 13 Mar 2018 03:41:45 -0700 Subject: try_reserve: disabling tests for asmjs, blocked by #48968 --- src/liballoc/tests/string.rs | 5 +++++ src/liballoc/tests/vec.rs | 7 ++++++- src/liballoc/tests/vec_deque.rs | 8 +++++++- 3 files changed, 18 insertions(+), 2 deletions(-) (limited to 'src/liballoc') diff --git a/src/liballoc/tests/string.rs b/src/liballoc/tests/string.rs index d1e746ea43b..9bbba4e22b0 100644 --- a/src/liballoc/tests/string.rs +++ b/src/liballoc/tests/string.rs @@ -9,8 +9,11 @@ // except according to those terms. use std::borrow::Cow; +#[cfg(not(target_arch = "asmjs"))] use std::collections::CollectionAllocErr::*; +#[cfg(not(target_arch = "asmjs"))] use std::mem::size_of; +#[cfg(not(target_arch = "asmjs"))] use std::{usize, isize}; pub trait IntoCow<'a, B: ?Sized> where B: ToOwned { @@ -532,6 +535,7 @@ fn test_reserve_exact() { assert!(s.capacity() >= 33) } +#[cfg(not(target_arch = "asmjs"))] #[test] fn test_try_reserve() { @@ -609,6 +613,7 @@ fn test_try_reserve() { } +#[cfg(not(target_arch = "asmjs"))] #[test] fn test_try_reserve_exact() { diff --git a/src/liballoc/tests/vec.rs b/src/liballoc/tests/vec.rs index 3c17a401bba..85e11d8b8ee 100644 --- a/src/liballoc/tests/vec.rs +++ b/src/liballoc/tests/vec.rs @@ -10,8 +10,11 @@ use std::borrow::Cow; use std::mem::size_of; -use std::{usize, isize, panic}; +use std::{usize, panic}; +#[cfg(not(target_arch = "asmjs"))] +use std::isize; use std::vec::{Drain, IntoIter}; +#[cfg(not(target_arch = "asmjs"))] use std::collections::CollectionAllocErr::*; struct DropCounter<'a> { @@ -991,6 +994,7 @@ fn test_reserve_exact() { assert!(v.capacity() >= 33) } +#[cfg(not(target_arch = "asmjs"))] #[test] fn test_try_reserve() { @@ -1093,6 +1097,7 @@ fn test_try_reserve() { } +#[cfg(not(target_arch = "asmjs"))] #[test] fn test_try_reserve_exact() { diff --git a/src/liballoc/tests/vec_deque.rs b/src/liballoc/tests/vec_deque.rs index fc1a0b624a5..9fd38ed6f6f 100644 --- a/src/liballoc/tests/vec_deque.rs +++ b/src/liballoc/tests/vec_deque.rs @@ -11,9 +11,13 @@ use std::collections::VecDeque; use std::fmt::Debug; use std::collections::vec_deque::{Drain}; +#[cfg(not(target_arch = "asmjs"))] use std::collections::CollectionAllocErr::*; +#[cfg(not(target_arch = "asmjs"))] use std::mem::size_of; -use std::{usize, isize}; +use std::isize; +#[cfg(not(target_arch = "asmjs"))] +use std::usize; use self::Taggy::*; use self::Taggypar::*; @@ -1049,6 +1053,7 @@ fn test_reserve_exact_2() { assert!(v.capacity() >= 48) } +#[cfg(not(target_arch = "asmjs"))] #[test] fn test_try_reserve() { @@ -1150,6 +1155,7 @@ fn test_try_reserve() { } +#[cfg(not(target_arch = "asmjs"))] #[test] fn test_try_reserve_exact() { -- cgit 1.4.1-3-g733a5