fn registers_eq(cpu: &mut CpuState, expected: &mut CpuState) {
        let cpu_reg = &*cpu.registers;
        let expected = &*expected.registers;
        assert!(
            (cpu_reg.len() == expected.len()) && cpu_reg.len() == 17,
            "Expect length of exactly 17 for the registers"
        );

        for (ind, &elem) in cpu_reg.iter().enumerate() {
            assert!(
                elem == expected[ind],
                "Register mismatch at index: {}, expected: {}, found: {}",
                ind,
                expected[ind],
                elem
            );
        }
    }
/// Asserts whether the two cpus' registers are equal
Asserts whether the two cpus' registers are equal
Asserts whether the two cpus ' registers are equal
fn registers_eq(cpu: &mut CpuState, expected: &mut CpuState) {
        let cpu_reg = &*cpu.registers;
        let expected = &*expected.registers;
        assert!(
            (cpu_reg.len() == expected.len()) && cpu_reg.len() == 17,
            "Expect length of exactly 17 for the registers"
        );
        for (ind, &elem) in cpu_reg.iter().enumerate() {
            assert!(
                elem == expected[ind],
                "Register mismatch at index: {}, expected: {}, found: {}",
                ind,
                expected[ind],
                elem
            );
        }
    }
fn registers_eq ( cpu : & mut CpuState , expected : & mut CpuState ) { let cpu_reg = & * cpu . registers ; let expected = & * expected . registers ; assert ! ( ( cpu_reg len ( ) expected len ( ) ) cpu_reg len ( ) 17 " " ) ; for ( ind , & elem ) in cpu_reg . iter ( ) . enumerate ( ) { assert ! ( elem expected [ ind ] " " ind expected [ ind ] elem ) ; } }
Asserts whether the two cpus' registers are equal
Asserts whether the two cpus ' registers are equal
cpu
&mut CpuState
expected
&mut CpuState