Skip to content

Commit

Permalink
Fix new warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Luthaf committed Feb 13, 2024
1 parent b971d06 commit f17bbc3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions src/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ mod test {
}

#[test]
#[should_panic]
#[should_panic(expected = " out of bounds atomic index in `chfl_atom_from_frame`")]
fn out_of_bounds_atom() {
let mut frame = Frame::new();
frame.resize(22);
Expand All @@ -1001,7 +1001,7 @@ mod test {
}

#[test]
#[should_panic]
#[should_panic(expected = "out of bounds atomic index in `Frame::remove`")]
fn remove_out_of_bounds() {
let mut frame = Frame::new();
frame.resize(32);
Expand Down Expand Up @@ -1089,23 +1089,23 @@ mod test {
}

#[test]
#[should_panic]
#[should_panic(expected = "out of bounds atomic index in `Topology::add_bond`")]
fn out_of_bounds_bonds() {
let mut frame = Frame::new();
frame.resize(12);
frame.add_bond(300, 7);
}

#[test]
#[should_panic]
#[should_panic(expected = "out of bounds atomic index in `Topology::remove_bond`")]
fn out_of_bounds_remove_bond() {
let mut frame = Frame::new();
frame.resize(12);
frame.remove_bond(300, 7);
}

#[test]
#[should_panic]
#[should_panic(expected = "out of bounds atomic index in `Topology::add_bond`")]
fn out_of_bounds_bonds_with_order() {
let mut frame = Frame::new();
frame.resize(12);
Expand Down
4 changes: 2 additions & 2 deletions src/selection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,14 +355,14 @@ mod tests {
}

#[test]
#[should_panic]
#[should_panic(expected = "assertion failed: i < self.len()")]
fn out_of_bound() {
let m = Match::new(&[1, 2]);
let _ = m[2];
}

#[test]
#[should_panic]
#[should_panic(expected = "assertion failed: atoms.len() <= 4")]
fn too_big() {
let _ = Match::new(&[1, 2, 3, 5, 4]);
}
Expand Down
8 changes: 4 additions & 4 deletions src/topology.rs
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ mod test {
}

#[test]
#[should_panic]
#[should_panic(expected = "out of bounds atomic index in `Topology::remove`")]
fn out_of_bounds_remove() {
let mut topology = Topology::new();
topology.resize(18);
Expand Down Expand Up @@ -886,23 +886,23 @@ mod test {
}

#[test]
#[should_panic]
#[should_panic(expected = "out of bounds atomic index in `Topology::add_bond`")]
fn out_of_bounds_bonds() {
let mut topology = Topology::new();
topology.resize(12);
topology.add_bond(300, 7);
}

#[test]
#[should_panic]
#[should_panic(expected = "out of bounds atomic index in `Topology::remove_bond`")]
fn out_of_bounds_remove_bond() {
let mut topology = Topology::new();
topology.resize(12);
topology.remove_bond(300, 7);
}

#[test]
#[should_panic]
#[should_panic(expected = "out of bounds atomic index in `Topology::add_bond`")]
fn out_of_bounds_bonds_with_order() {
let mut topology = Topology::new();
topology.resize(12);
Expand Down

0 comments on commit f17bbc3

Please sign in to comment.