Skip to content

Commit

Permalink
Check first and then print.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseth committed Jan 24, 2024
1 parent 8c0c4b8 commit 570edb9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions backend/src/pilstark/json_exporter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,11 @@ mod test {

fn compare_export_file(file: &str) {
let (json_out, pilcom_parsed) = generate_json_pair(file);
// TODO: test fails because PILCOM "fileName" fields output the filename
// stripped of its path
assert_eq!(json_out, pilcom_parsed);
if json_out != pilcom_parsed {
// Computing the pretty diff can take minutes, so we are printing an error already here.
eprintln!("Exported json and file re-exported by pilcom differ:");
assert_eq!(json_out, pilcom_parsed);
}
}

/// Normalizes the json in that it replaces all idQ values by "99"
Expand Down

0 comments on commit 570edb9

Please sign in to comment.