about summary refs log tree commit diff
path: root/src/liballoc/tests
diff options
context:
space:
mode:
authorsnf <snf@noreply.github.com>2018-03-14 14:56:37 +0000
committersnf <snf@noreply.github.com>2018-03-15 17:43:05 +0000
commit9e64946bded0698c8c45d74526e6a8b5a514c4a1 (patch)
treeffa91b4434d6564e287874b8761acf583bfa00ab /src/liballoc/tests
parentff2d506c2c748bd218f74c6014abc4cecc8c74c4 (diff)
downloadrust-9e64946bded0698c8c45d74526e6a8b5a514c4a1.tar.gz
rust-9e64946bded0698c8c45d74526e6a8b5a514c4a1.zip
setting ABORTING_MALLOC for asmjs backend
Diffstat (limited to 'src/liballoc/tests')
-rw-r--r--src/liballoc/tests/string.rs5
-rw-r--r--src/liballoc/tests/vec.rs7
-rw-r--r--src/liballoc/tests/vec_deque.rs8
3 files changed, 2 insertions, 18 deletions
diff --git a/src/liballoc/tests/string.rs b/src/liballoc/tests/string.rs
index 9bbba4e22b0..d1e746ea43b 100644
--- a/src/liballoc/tests/string.rs
+++ b/src/liballoc/tests/string.rs
@@ -9,11 +9,8 @@
 // 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 {
@@ -535,7 +532,6 @@ fn test_reserve_exact() {
     assert!(s.capacity() >= 33)
 }
 
-#[cfg(not(target_arch = "asmjs"))]
 #[test]
 fn test_try_reserve() {
 
@@ -613,7 +609,6 @@ 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 85e11d8b8ee..3c17a401bba 100644
--- a/src/liballoc/tests/vec.rs
+++ b/src/liballoc/tests/vec.rs
@@ -10,11 +10,8 @@
 
 use std::borrow::Cow;
 use std::mem::size_of;
-use std::{usize, panic};
-#[cfg(not(target_arch = "asmjs"))]
-use std::isize;
+use std::{usize, isize, panic};
 use std::vec::{Drain, IntoIter};
-#[cfg(not(target_arch = "asmjs"))]
 use std::collections::CollectionAllocErr::*;
 
 struct DropCounter<'a> {
@@ -994,7 +991,6 @@ fn test_reserve_exact() {
     assert!(v.capacity() >= 33)
 }
 
-#[cfg(not(target_arch = "asmjs"))]
 #[test]
 fn test_try_reserve() {
 
@@ -1097,7 +1093,6 @@ 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 9fd38ed6f6f..fc1a0b624a5 100644
--- a/src/liballoc/tests/vec_deque.rs
+++ b/src/liballoc/tests/vec_deque.rs
@@ -11,13 +11,9 @@
 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::isize;
-#[cfg(not(target_arch = "asmjs"))]
-use std::usize;
+use std::{usize, isize};
 
 use self::Taggy::*;
 use self::Taggypar::*;
@@ -1053,7 +1049,6 @@ fn test_reserve_exact_2() {
     assert!(v.capacity() >= 48)
 }
 
-#[cfg(not(target_arch = "asmjs"))]
 #[test]
 fn test_try_reserve() {
 
@@ -1155,7 +1150,6 @@ fn test_try_reserve() {
 
 }
 
-#[cfg(not(target_arch = "asmjs"))]
 #[test]
 fn test_try_reserve_exact() {