2023-02-22 21:55:40 -05:00
|
|
|
#[macro_export]
|
|
|
|
macro_rules! assert_eq_u64 {
|
|
|
|
($a:expr, $b:expr) => {{
|
|
|
|
let are_equal = $a == $b;
|
|
|
|
let diff = $a ^ $b;
|
|
|
|
eprintln!("Comparing u64:");
|
|
|
|
let a_txt = format!("{:0>64b}", $a).replace('0', " ");
|
|
|
|
let b_txt = format!("{:0>64b}", $b).replace('0', " ");
|
|
|
|
let diff_txt = if diff == 0 {
|
|
|
|
String::from("NONE")
|
|
|
|
} else {
|
|
|
|
format!("{:0>64b}", diff)
|
|
|
|
.replace('0', " ")
|
|
|
|
.replace('1', "~")
|
|
|
|
};
|
|
|
|
eprintln!("\t{a_txt}.");
|
|
|
|
eprintln!("\t{b_txt}.");
|
|
|
|
eprintln!("Diff:\t{diff_txt}.");
|
2023-02-15 21:16:43 -05:00
|
|
|
|
2023-02-22 21:55:40 -05:00
|
|
|
// assert!(are_equal);
|
|
|
|
}};
|
|
|
|
}
|