Skip to content

Commit

Permalink
enable more tests in Miri and fix sue of 'std' feature
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Dec 7, 2019
1 parent bb8ae2b commit e36401b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//! When this feature is enabled, `smallvec` depends on `std`.
//!
//! To depend on `smallvec` without `libstd`, use `default-features = false` in the `smallvec`
//! section of Cargo.toml to disable its `"std"` feature.
//! section of Cargo.toml to disable its `"write"` feature.
//!
//! ## `union` feature
//!
Expand Down Expand Up @@ -1984,7 +1984,6 @@ mod tests {
);
}

#[cfg(all(feature = "std", not(miri)))] // Miri currently does not support unwinding
#[test]
// https://github.com/servo/rust-smallvec/issues/96
fn test_insert_many_panic() {
Expand Down Expand Up @@ -2117,7 +2116,6 @@ mod tests {
assert!(c > b);
}

#[cfg(feature = "std")]
#[test]
fn test_hash() {
use std::collections::hash_map::DefaultHasher;
Expand Down Expand Up @@ -2381,10 +2379,10 @@ mod tests {
assert_eq!(v[..], [1, 0][..]);
}

#[cfg(feature = "std")]
#[cfg(feature = "write")]
#[test]
fn test_write() {
use io::Write;
use std::io::Write;

let data = [1, 2, 3, 4, 5];

Expand Down

0 comments on commit e36401b

Please sign in to comment.