Fix Matrix Debug test to match new format

This commit is contained in:
Owen Brooks 2022-06-15 20:15:00 +10:00
parent 97e2a8ff44
commit 9dffc5bdea
1 changed files with 4 additions and 6 deletions

View File

@ -78,16 +78,14 @@ fn iter() {
}
#[test]
fn debug_output_corresponds_to_data_container() {
fn debug_output_semicolon_delimited_rowwise() {
let m = Matrix2::new(1.0, 2.0, 3.0, 4.0);
let output_stable = "[[1, 3], [2, 4]]"; // Current output on the stable channel.
let output_nightly = "[[1.0, 3.0], [2.0, 4.0]]"; // Current output on the nightly channel.
let expected_output = "[1.0, 2.0; 3.0, 4.0]"; // Current output on the nightly channel.
let current_output = format!("{:?}", m);
dbg!(output_stable);
dbg!(output_nightly);
dbg!(expected_output);
dbg!(&current_output);
assert!(current_output == output_stable || current_output == output_nightly);
assert!(current_output == expected_output);
}
#[test]