1
0
Fork 0
firefox/third_party/rust/libloading/tests/library_filename.rs
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

17 lines
468 B
Rust

extern crate libloading;
use libloading::library_filename;
use std::path::Path;
#[cfg(target_os = "windows")]
const EXPECTED: &str = "audioengine.dll";
#[cfg(target_os = "linux")]
const EXPECTED: &str = "libaudioengine.so";
#[cfg(target_os = "macos")]
const EXPECTED: &str = "libaudioengine.dylib";
#[test]
fn test_library_filename() {
let name = "audioengine";
let resolved = library_filename(name);
assert!(Path::new(&resolved).ends_with(EXPECTED));
}