Sha256: e90ef3d209ecb79b2f3d5568b62645a3341565168a7ba4a81770eea7b93a9d71

Contents?: true

Size: 721 Bytes

Versions: 30

Compression:

Stored size: 721 Bytes

Contents

use debugid::CodeId;

#[test]
fn test_new() {
    let id = CodeId::new("dfb8e43af2423d73a453aeb6a777ef75".into());
    assert_eq!(id.as_str(), "dfb8e43af2423d73a453aeb6a777ef75");
}

#[test]
fn test_pe() {
    // Code identifiers of PE files might have an odd length and contain upper case characters.
    let id = CodeId::new("5CCC38584b08000".into());
    assert_eq!(id.as_str(), "5ccc38584b08000");
}

#[test]
fn test_from_binary() {
    let binary = b"\xdf\xb8\xe4\x3a\xf2\x42\x3d\x73\xa4\x53\xae\xb6\xa7\x77\xef\x75";
    let id = CodeId::from_binary(&binary[..]);
    assert_eq!(id.as_str(), "dfb8e43af2423d73a453aeb6a777ef75");
}

#[test]
fn test_is_nil() {
    let id = CodeId::nil();
    assert!(id.is_nil());
}

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
wasmtime-28.0.0 ./ext/cargo-vendor/debugid-0.8.0/tests/test_codeid.rs
wasmtime-27.0.0 ./ext/cargo-vendor/debugid-0.8.0/tests/test_codeid.rs
wasmtime-26.0.0 ./ext/cargo-vendor/debugid-0.8.0/tests/test_codeid.rs
wasmtime-25.0.2 ./ext/cargo-vendor/debugid-0.8.0/tests/test_codeid.rs
wasmtime-25.0.1 ./ext/cargo-vendor/debugid-0.8.0/tests/test_codeid.rs
wasmtime-25.0.0 ./ext/cargo-vendor/debugid-0.8.0/tests/test_codeid.rs
wasmtime-24.0.0 ./ext/cargo-vendor/debugid-0.8.0/tests/test_codeid.rs
wasmtime-23.0.2 ./ext/cargo-vendor/debugid-0.8.0/tests/test_codeid.rs
wasmtime-22.0.0 ./ext/cargo-vendor/debugid-0.8.0/tests/test_codeid.rs
wasmtime-21.0.1 ./ext/cargo-vendor/debugid-0.8.0/tests/test_codeid.rs
wasmtime-20.0.2 ./ext/cargo-vendor/debugid-0.8.0/tests/test_codeid.rs
wasmtime-20.0.0 ./ext/cargo-vendor/debugid-0.8.0/tests/test_codeid.rs
wasmtime-18.0.3 ./ext/cargo-vendor/debugid-0.8.0/tests/test_codeid.rs
wasmtime-17.0.1 ./ext/cargo-vendor/debugid-0.8.0/tests/test_codeid.rs
wasmtime-17.0.0 ./ext/cargo-vendor/debugid-0.8.0/tests/test_codeid.rs
wasmtime-16.0.0 ./ext/cargo-vendor/debugid-0.8.0/tests/test_codeid.rs
wasmtime-15.0.1 ./ext/cargo-vendor/debugid-0.8.0/tests/test_codeid.rs
wasmtime-15.0.0 ./ext/cargo-vendor/debugid-0.8.0/tests/test_codeid.rs
wasmtime-14.0.4 ./ext/cargo-vendor/debugid-0.8.0/tests/test_codeid.rs
wasmtime-14.0.3 ./ext/cargo-vendor/debugid-0.8.0/tests/test_codeid.rs