Vendor things
This commit is contained in:
parent
5deceec006
commit
977e3c17e5
19434 changed files with 10682014 additions and 0 deletions
6
third-party/vendor/psm/tests/stack_direction.rs
vendored
Normal file
6
third-party/vendor/psm/tests/stack_direction.rs
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
extern crate psm;
|
||||
|
||||
#[test]
|
||||
fn always_equal() {
|
||||
assert_eq!(psm::StackDirection::new(), psm::StackDirection::new());
|
||||
}
|
||||
29
third-party/vendor/psm/tests/stack_direction_2.rs
vendored
Normal file
29
third-party/vendor/psm/tests/stack_direction_2.rs
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
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());
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue