/// Tests to make sure field_modes and field_widths return the same length arrays for all instructions
Tests to make sure field_modes and field_widths return the same length arrays for all instructions
Tests to make sure field_modes and field_widths return the same length arrays for all instructions
fn all_operand_list_lens_equal() {
        for i in 0..252 {
            let v = vec![i as u8];
            let iter = &mut (v.iter().map(|x| *x));
            if let Some(i) = InstructionType::from_instrid(iter) {
                if i.field_widths().len() != i.field_modes().len() {
                    panic!("Instruction {:?} has mismatched field modes/width lengths!", i);
                }
            }
        }
        for i in 252..256 {
            for j in 0..256 {
                let v = vec![i as u8, j as u8];
                let v = vec![i as u8];
                let iter = &mut (v.iter().map(|x| *x));
                if let Some(i) = InstructionType::from_instrid(iter) {
                    if i.field_widths().len() != i.field_modes().len() {
                        panic!("Instruction {:?} has mismatched field modes/width lengths!", i);
                    }
                }
            }
        }
    }
fn all_operand_list_lens_equal ( ) { for i in 0 .. 252 { let v = vec ! [ i as u8 ] ; let iter = & mut ( v . iter ( ) . map ( | x | * x ) ) ; if let Some ( i ) = InstructionType :: from_instrid ( iter ) { if i . field_widths ( ) . len ( ) != i . field_modes ( ) . len ( ) { panic ! ( " " i ) ; } } } for i in 252 .. 256 { for j in 0 .. 256 { let v = vec ! [ i as u8 j as u8 ] ; let v = vec ! [ i as u8 ] ; let iter = & mut ( v . iter ( ) . map ( | x | * x ) ) ; if let Some ( i ) = InstructionType :: from_instrid ( iter ) { if i . field_widths ( ) . len ( ) != i . field_modes ( ) . len ( ) { panic ! ( " " i ) ; } } } } }
Tests to make sure field_modes and field_widths return the same length arrays for all instructions
Tests to make sure field_modes and field_widths return the same length arrays for all instructions