Add jsmoo tests for all implemented instructions
parent
a8736052d1
commit
555800dbd1
|
@ -1,17 +1,17 @@
|
||||||
use ferris_boi::{cpu::Processor, register};
|
use ferris_boi::{cpu::Processor, register};
|
||||||
|
|
||||||
macro_rules! assert_flags_eq {
|
macro_rules! assert_flags_eq {
|
||||||
($processor: expr, $(($flag: path, $value: expr)),+ $(,)?) => {
|
($processor: expr, $(($flag: path, $value: expr)),+ $(,)?) => {
|
||||||
$(
|
$(
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
$value,
|
$value,
|
||||||
$processor.registers.get_flag_bit($flag),
|
$processor.registers.get_flag_bit($flag),
|
||||||
"{:?} flag had unexpected value",
|
"{:?} flag had unexpected value",
|
||||||
$flag
|
$flag
|
||||||
);
|
);
|
||||||
)+
|
)+
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) use assert_flags_eq;
|
pub(crate) use assert_flags_eq;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue