This commit is contained in:
numbers
2023-09-04 06:26:35 -04:00
commit a5fe71ebb3
26 changed files with 1186 additions and 0 deletions

15
tests/test_data.rs Normal file
View 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);
}