aboutsummaryrefslogtreecommitdiff
path: root/tests/lib.rs
blob: 15477f7fde1c5996e77e902d7213ac3f486baf80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#![no_std]

use yaxpeax_arch::AddressBase;

#[test]
fn test_u16() {
    for l in 0..100 {
        for r in 0..=core::u16::MAX {
            assert_eq!(r.wrapping_offset(l.diff(&r).expect("u16 addresses always have valid diffs")), l);
        }
    }
}