Skip to content

Commit

Permalink
try_reserve: disabling tests for asmjs, blocked by rust-lang#48968
Browse files Browse the repository at this point in the history
  • Loading branch information
snf committed Mar 14, 2018
1 parent 92bfcd2 commit b08b5ae
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/liballoc/tests/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -532,6 +535,7 @@ fn test_reserve_exact() {
assert!(s.capacity() >= 33)
}

#[cfg(not(target_arch = "asmjs"))]
#[test]
fn test_try_reserve() {

Expand Down Expand Up @@ -609,6 +613,7 @@ fn test_try_reserve() {

}

#[cfg(not(target_arch = "asmjs"))]
#[test]
fn test_try_reserve_exact() {

Expand Down
7 changes: 6 additions & 1 deletion src/liballoc/tests/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down Expand Up @@ -991,6 +994,7 @@ fn test_reserve_exact() {
assert!(v.capacity() >= 33)
}

#[cfg(not(target_arch = "asmjs"))]
#[test]
fn test_try_reserve() {

Expand Down Expand Up @@ -1093,6 +1097,7 @@ fn test_try_reserve() {

}

#[cfg(not(target_arch = "asmjs"))]
#[test]
fn test_try_reserve_exact() {

Expand Down
8 changes: 7 additions & 1 deletion src/liballoc/tests/vec_deque.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down Expand Up @@ -1049,6 +1053,7 @@ fn test_reserve_exact_2() {
assert!(v.capacity() >= 48)
}

#[cfg(not(target_arch = "asmjs"))]
#[test]
fn test_try_reserve() {

Expand Down Expand Up @@ -1150,6 +1155,7 @@ fn test_try_reserve() {

}

#[cfg(not(target_arch = "asmjs"))]
#[test]
fn test_try_reserve_exact() {

Expand Down
4 changes: 4 additions & 0 deletions src/libstd/collections/hash/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2755,8 +2755,11 @@ mod test_map {
use cell::RefCell;
use rand::{thread_rng, Rng};
use panic;
#[cfg(not(target_arch = "asmjs"))]
use realstd::collections::CollectionAllocErr::*;
#[cfg(not(target_arch = "asmjs"))]
use realstd::mem::size_of;
#[cfg(not(target_arch = "asmjs"))]
use realstd::usize;

#[test]
Expand Down Expand Up @@ -3693,6 +3696,7 @@ mod test_map {
assert_eq!(hm.len(), 0);
}

#[cfg(not(target_arch = "asmjs"))]
#[test]
fn test_try_reserve() {

Expand Down

0 comments on commit b08b5ae

Please sign in to comment.