mirror of
https://git.intege.rs/xlib/x.git
synced 2025-12-05 20:35:01 +00:00
initial
This commit is contained in:
15
tests/test_data.rs
Normal file
15
tests/test_data.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
|
||||
|
||||
|
||||
#[test]
|
||||
pub fn test_distance() {
|
||||
|
||||
|
||||
let a = [0u8,2,3];
|
||||
let p1 = &a[0];
|
||||
let p2 = &a[2];
|
||||
assert_eq!(x::distance(p1, p2), 2);
|
||||
assert_eq!(x::distance(p2, p1), 2);
|
||||
assert_eq!(x::distance(p1, p1), 0);
|
||||
}
|
||||
Reference in New Issue
Block a user