Sha256: f9191394de5b6381af6ba8223e7717230059dc335f639238c0ddbc7eb87bfc0e

Contents?: true

Size: 796 Bytes

Versions: 38

Compression:

Stored size: 796 Bytes

Contents

extern crate psm;

#[inline(never)]
fn test_direction(previous_sp: *mut u8) {
    let current_sp = psm::stack_pointer();
    match psm::StackDirection::new() {
        psm::StackDirection::Ascending => {
            assert!(
                current_sp > previous_sp,
                "the stack pointer is not ascending! current = {:p}, previous = {:p}",
                current_sp,
                previous_sp
            );
        }
        psm::StackDirection::Descending => {
            assert!(
                current_sp < previous_sp,
                "the stack pointer is not descending! current = {:p}, previous = {:p}",
                current_sp,
                previous_sp
            );
        }
    }
}

#[test]
fn direction_right() {
    test_direction(psm::stack_pointer());
}

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/psm-0.1.24/tests/stack_direction_2.rs
wasmtime-28.0.0 ./ext/cargo-vendor/psm-0.1.24/tests/stack_direction_2.rs
wasmtime-27.0.0 ./ext/cargo-vendor/psm-0.1.24/tests/stack_direction_2.rs
wasmtime-26.0.0 ./ext/cargo-vendor/psm-0.1.23/tests/stack_direction_2.rs
wasmtime-25.0.2 ./ext/cargo-vendor/psm-0.1.21/tests/stack_direction_2.rs
wasmtime-25.0.1 ./ext/cargo-vendor/psm-0.1.21/tests/stack_direction_2.rs
wasmtime-25.0.0 ./ext/cargo-vendor/psm-0.1.21/tests/stack_direction_2.rs
wasmtime-24.0.0 ./ext/cargo-vendor/psm-0.1.21/tests/stack_direction_2.rs
wasmtime-23.0.2 ./ext/cargo-vendor/psm-0.1.21/tests/stack_direction_2.rs
wasmtime-22.0.0 ./ext/cargo-vendor/psm-0.1.21/tests/stack_direction_2.rs
wasmtime-21.0.1 ./ext/cargo-vendor/psm-0.1.21/tests/stack_direction_2.rs
wasmtime-20.0.2 ./ext/cargo-vendor/psm-0.1.21/tests/stack_direction_2.rs
wasmtime-20.0.0 ./ext/cargo-vendor/psm-0.1.21/tests/stack_direction_2.rs
wasmtime-18.0.3 ./ext/cargo-vendor/psm-0.1.21/tests/stack_direction_2.rs
wasmtime-17.0.1 ./ext/cargo-vendor/psm-0.1.21/tests/stack_direction_2.rs
wasmtime-17.0.0 ./ext/cargo-vendor/psm-0.1.21/tests/stack_direction_2.rs
wasmtime-16.0.0 ./ext/cargo-vendor/psm-0.1.21/tests/stack_direction_2.rs
wasmtime-15.0.1 ./ext/cargo-vendor/psm-0.1.21/tests/stack_direction_2.rs
wasmtime-15.0.0 ./ext/cargo-vendor/psm-0.1.21/tests/stack_direction_2.rs
wasmtime-14.0.4 ./ext/cargo-vendor/psm-0.1.21/tests/stack_direction_2.rs