Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit a315864

Browse files
committed
fix path_test's portability
1 parent 19bdfbb commit a315864

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/dynamic_contract.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,16 @@ mod tests {
109109
use bincode::serialize;
110110
use hash::Hash;
111111
use signature::Signature;
112+
use std::path::Path;
112113

113114
#[test]
114115
fn test_create_library_path_1() {
115-
assert_eq!(
116-
"target/debug/deps/libfoo.dylib",
117-
create_library_path("foo").to_str().unwrap()
118-
);
116+
let path = create_library_path("noop");
117+
assert_eq!(true, Path::new(&path).exists());
118+
let path = create_library_path("print");
119+
assert_eq!(true, Path::new(&path).exists());
120+
let path = create_library_path("move_funds");
121+
assert_eq!(true, Path::new(&path).exists());
119122
}
120123

121124
#[test]

0 commit comments

Comments
 (0)