Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check first and then print pretty. #943

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading