1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#[cfg(test)]
use mv_list::MoveVec;

#[cfg(test)]
pub fn assert_list_includes_moves(list: &MoveVec, moves: &[&'static str]) {
    for &m in moves.iter() {
        assert!(list.iter().map(|m| m.to_string()).any(|mv| mv == m));
    }
}

#[cfg(test)]
pub fn assert_list_excludes_moves(list: &MoveVec, moves: &[&'static str]) {
    for &m in moves.iter() {
        assert!(list.iter().map(|m| m.to_string()).all(|mv| mv != m));
    }
}