From 13f85e18a998443592c386f353da924718173b4a Mon Sep 17 00:00:00 2001 From: Joe Richey Date: Thu, 20 Jun 2024 05:22:47 -0700 Subject: [PATCH] Test fallback on Linux/Andorid Signed-off-by: Joe Richey --- src/use_file.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/use_file.rs b/src/use_file.rs index 4fdbe3d7..c5e81669 100644 --- a/src/use_file.rs +++ b/src/use_file.rs @@ -174,3 +174,9 @@ impl Drop for DropGuard { self.0() } } + +// We only need separate tests here when use_file is the fallback. +#[cfg(all(test, any(target_os = "android", target_os = "linux")))] +mod tests { + crate::tests::define_tests!(super::getrandom_inner); +}