Sha256: 0ebc8f807b92e39452d35732988012cdca7ce96231c57eaac9c3f4217225ad39

Contents?: true

Size: 1.95 KB

Versions: 38

Compression:

Stored size: 1.95 KB

Contents

extern crate libloading;

#[cfg(test)]
fn assert_send<T: Send>() {}
#[cfg(test)]
fn assert_sync<T: Sync>() {}
#[cfg(test)]
fn assert_display<T: std::fmt::Display>() {}

#[test]
fn check_error_send() {
    assert_send::<libloading::Error>();
}

#[test]
fn check_error_sync() {
    assert_sync::<libloading::Error>();
}

#[test]
fn check_error_display() {
    assert_display::<libloading::Error>();
}

#[test]
fn check_library_send() {
    assert_send::<libloading::Library>();
}

#[cfg(unix)]
#[test]
fn check_unix_library_send() {
    assert_send::<libloading::os::unix::Library>();
}

#[cfg(windows)]
#[test]
fn check_windows_library_send() {
    assert_send::<libloading::os::windows::Library>();
}

#[test]
fn check_library_sync() {
    assert_sync::<libloading::Library>();
}

#[cfg(unix)]
#[test]
fn check_unix_library_sync() {
    assert_sync::<libloading::os::unix::Library>();
}

#[cfg(windows)]
#[test]
fn check_windows_library_sync() {
    assert_sync::<libloading::os::windows::Library>();
}

#[test]
fn check_symbol_send() {
    assert_send::<libloading::Symbol<fn() -> ()>>();
    // assert_not_send::<libloading::Symbol<*const ()>>();
}

#[cfg(unix)]
#[test]
fn check_unix_symbol_send() {
    assert_send::<libloading::os::unix::Symbol<fn() -> ()>>();
    // assert_not_send::<libloading::os::unix::Symbol<*const ()>>();
}

#[cfg(windows)]
#[test]
fn check_windows_symbol_send() {
    assert_send::<libloading::os::windows::Symbol<fn() -> ()>>();
}

#[test]
fn check_symbol_sync() {
    assert_sync::<libloading::Symbol<fn() -> ()>>();
    // assert_not_sync::<libloading::Symbol<*const ()>>();
}

#[cfg(unix)]
#[test]
fn check_unix_symbol_sync() {
    assert_sync::<libloading::os::unix::Symbol<fn() -> ()>>();
    // assert_not_sync::<libloading::os::unix::Symbol<*const ()>>();
}

#[cfg(windows)]
#[test]
fn check_windows_symbol_sync() {
    assert_sync::<libloading::os::windows::Symbol<fn() -> ()>>();
    // assert_not_sync::<libloading::os::windows::Symbol<*const ()>>();
}

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/libloading-0.8.6/tests/markers.rs
wasmtime-28.0.0 ./ext/cargo-vendor/libloading-0.8.6/tests/markers.rs
wasmtime-27.0.0 ./ext/cargo-vendor/libloading-0.8.5/tests/markers.rs
wasmtime-26.0.0 ./ext/cargo-vendor/libloading-0.8.5/tests/markers.rs
wasmtime-25.0.2 ./ext/cargo-vendor/libloading-0.8.5/tests/markers.rs
wasmtime-25.0.1 ./ext/cargo-vendor/libloading-0.8.5/tests/markers.rs
wasmtime-25.0.0 ./ext/cargo-vendor/libloading-0.8.5/tests/markers.rs
wasmtime-24.0.0 ./ext/cargo-vendor/libloading-0.8.5/tests/markers.rs
wasmtime-23.0.2 ./ext/cargo-vendor/libloading-0.8.1/tests/markers.rs
wasmtime-22.0.0 ./ext/cargo-vendor/libloading-0.8.1/tests/markers.rs
wasmtime-21.0.1 ./ext/cargo-vendor/libloading-0.8.1/tests/markers.rs
wasmtime-20.0.2 ./ext/cargo-vendor/libloading-0.8.1/tests/markers.rs
wasmtime-20.0.0 ./ext/cargo-vendor/libloading-0.8.1/tests/markers.rs
wasmtime-18.0.3 ./ext/cargo-vendor/libloading-0.8.1/tests/markers.rs
wasmtime-17.0.1 ./ext/cargo-vendor/libloading-0.8.1/tests/markers.rs
wasmtime-17.0.0 ./ext/cargo-vendor/libloading-0.8.1/tests/markers.rs
wasmtime-16.0.0 ./ext/cargo-vendor/libloading-0.8.1/tests/markers.rs
wasmtime-15.0.1 ./ext/cargo-vendor/libloading-0.8.1/tests/markers.rs
wasmtime-15.0.0 ./ext/cargo-vendor/libloading-0.8.1/tests/markers.rs
wasmtime-14.0.4 ./ext/cargo-vendor/libloading-0.7.4/tests/markers.rs