summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/evil_mutex.rs2
-rwxr-xr-xtests/evil_rwlock.rs5
-rwxr-xr-xtests/evil_try_mutex.rs2
-rwxr-xr-xtests/evil_try_rwlock.rs2
-rwxr-xr-xtests/evil_unlock_mutex.rs2
-rwxr-xr-xtests/evil_unlock_rwlock.rs2
-rwxr-xr-xtests/forget.rs2
-rwxr-xr-xtests/retry.rs2
-rwxr-xr-xtests/retry_rw.rs2
9 files changed, 19 insertions, 2 deletions
diff --git a/tests/evil_mutex.rs b/tests/evil_mutex.rs
index ef6f31a..2eebb86 100755
--- a/tests/evil_mutex.rs
+++ b/tests/evil_mutex.rs
@@ -1,3 +1,5 @@
+#![cfg(feature = "std")]
+
use std::sync::Arc;
use happylock::collection::{BoxedLockCollection, RetryingLockCollection};
diff --git a/tests/evil_rwlock.rs b/tests/evil_rwlock.rs
index a57a27a..679928b 100755
--- a/tests/evil_rwlock.rs
+++ b/tests/evil_rwlock.rs
@@ -1,10 +1,11 @@
-use std::panic::AssertUnwindSafe;
-use std::sync::Arc;
+#![cfg(feature = "std")]
use happylock::collection::{BoxedLockCollection, RetryingLockCollection};
use happylock::rwlock::RwLock;
use happylock::ThreadKey;
use lock_api::{GuardNoSend, RawRwLock};
+use std::panic::AssertUnwindSafe;
+use std::sync::Arc;
struct EvilRwLock {
inner: parking_lot::RawRwLock,
diff --git a/tests/evil_try_mutex.rs b/tests/evil_try_mutex.rs
index 22834be..5978f02 100755
--- a/tests/evil_try_mutex.rs
+++ b/tests/evil_try_mutex.rs
@@ -1,3 +1,5 @@
+#![cfg(feature = "std")]
+
use std::sync::Arc;
use happylock::{
diff --git a/tests/evil_try_rwlock.rs b/tests/evil_try_rwlock.rs
index acba794..9b5db06 100755
--- a/tests/evil_try_rwlock.rs
+++ b/tests/evil_try_rwlock.rs
@@ -1,3 +1,5 @@
+#![cfg(feature = "std")]
+
use std::sync::Arc;
use happylock::collection::{BoxedLockCollection, RetryingLockCollection};
diff --git a/tests/evil_unlock_mutex.rs b/tests/evil_unlock_mutex.rs
index c21fc34..dc35d81 100755
--- a/tests/evil_unlock_mutex.rs
+++ b/tests/evil_unlock_mutex.rs
@@ -1,3 +1,5 @@
+#![cfg(feature = "std")]
+
use std::sync::Arc;
use happylock::collection::{BoxedLockCollection, RetryingLockCollection};
diff --git a/tests/evil_unlock_rwlock.rs b/tests/evil_unlock_rwlock.rs
index 577de85..550ebe3 100755
--- a/tests/evil_unlock_rwlock.rs
+++ b/tests/evil_unlock_rwlock.rs
@@ -1,3 +1,5 @@
+#![cfg(feature = "std")]
+
use std::sync::Arc;
use happylock::collection::{BoxedLockCollection, RetryingLockCollection};
diff --git a/tests/forget.rs b/tests/forget.rs
index 755bdb1..0c74c84 100755
--- a/tests/forget.rs
+++ b/tests/forget.rs
@@ -1,3 +1,5 @@
+#![cfg(feature = "std")]
+
use happylock::{Mutex, ThreadKey};
#[test]
diff --git a/tests/retry.rs b/tests/retry.rs
index 64e0918..f27bd5e 100755
--- a/tests/retry.rs
+++ b/tests/retry.rs
@@ -1,3 +1,5 @@
+#![cfg(feature = "std")]
+
use std::time::Duration;
use happylock::{collection::RetryingLockCollection, Mutex, ThreadKey};
diff --git a/tests/retry_rw.rs b/tests/retry_rw.rs
index 0a946b0..d95d001 100755
--- a/tests/retry_rw.rs
+++ b/tests/retry_rw.rs
@@ -1,3 +1,5 @@
+#![cfg(feature = "std")]
+
use std::time::Duration;
use happylock::{collection::RetryingLockCollection, RwLock, ThreadKey};