-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance rand to support macos #159
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,6 +144,7 @@ mod tests { | |
let path = t.as_path(); | ||
assert!(path.exists()); | ||
assert!(path.is_dir()); | ||
#[cfg(not(target_os = "macos"))] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we instead check that the path is in the equivalent temp_dir for mac os? Otherwise this test is not very useful. |
||
assert!(path.starts_with(temp_dir())); | ||
} | ||
|
||
|
@@ -185,12 +186,14 @@ mod tests { | |
let path = t.as_path(); | ||
assert!(path.exists()); | ||
assert!(path.is_dir()); | ||
#[cfg(not(target_os = "macos"))] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add an equivalent check here instead? |
||
assert!(path.starts_with("/tmp/")); | ||
|
||
let t = TempDir::new_in(Path::new("/tmp")).unwrap(); | ||
let path = t.as_path(); | ||
assert!(path.exists()); | ||
assert!(path.is_dir()); | ||
#[cfg(not(target_os = "macos"))] | ||
assert!(path.starts_with("/tmp")); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be static?