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